2017-05-03 05:40:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd $(dirname $0)/../dist/moby
|
2017-05-04 01:54:16 +00:00
|
|
|
|
2017-07-13 10:06:34 +00:00
|
|
|
if [ "1" == "2" ]; then
|
2017-05-04 01:54:16 +00:00
|
|
|
linuxkit run -mem 2048 rancheros
|
|
|
|
else
|
|
|
|
qemu-system-x86_64 \
|
2017-05-03 05:40:30 +00:00
|
|
|
-nographic \
|
|
|
|
-kernel ./rancheros-kernel \
|
|
|
|
-initrd ./rancheros-initrd.img \
|
|
|
|
-m 2048 \
|
2017-07-13 10:06:34 +00:00
|
|
|
-device virtio-rng-pci \
|
|
|
|
-smp 1 \
|
|
|
|
-enable-kvm \
|
|
|
|
-machine q35,accel=kvm:tcg \
|
2017-05-03 05:40:30 +00:00
|
|
|
-net nic,vlan=0,model=virtio \
|
|
|
|
-net user,vlan=0,hostfwd=tcp::3333-:22,hostname=rancher-moby \
|
|
|
|
-append 'printk.devkmsg=on rancher.debug=true rancher.password=rancher console=ttyS0 rancher.autologin=ttyS0 console=tty0 rancher.autologin=tty0 console=tty1 rancher.autologin=tty1 rancher.state.dev=LABEL=RANCHER_STATE rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.rm_usr'
|
2017-05-04 01:54:16 +00:00
|
|
|
fi
|