run-moby 686 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. cd $(dirname $0)/../dist/moby
  3. if [ "1" == "2" ]; then
  4. linuxkit run -mem 2048 rancheros
  5. else
  6. qemu-system-x86_64 \
  7. -nographic \
  8. -kernel ./rancheros-kernel \
  9. -initrd ./rancheros-initrd.img \
  10. -m 2048 \
  11. -device virtio-rng-pci \
  12. -smp 1 \
  13. -enable-kvm \
  14. -machine q35,accel=kvm:tcg \
  15. -net nic,vlan=0,model=virtio \
  16. -net user,vlan=0,hostfwd=tcp::3333-:22,hostname=rancher-moby \
  17. -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'
  18. fi