Skip to content

Instantly share code, notes, and snippets.

@time-river
Created December 21, 2022 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save time-river/ef02f7593c56ff59d844a5b9af55d9e2 to your computer and use it in GitHub Desktop.
Save time-river/ef02f7593c56ff59d844a5b9af55d9e2 to your computer and use it in GitHub Desktop.
boot vm via qemu command line
qemu-system-x86_64 \
-name qemu \
-machine pc,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
-kernel vmlinuz \
-initrd initrd.img \
-append "root=/dev/vda1 ro debug loglevel=8 console=ttyS0" \
-cpu host \
-smp 4 \
-m 8192 \
-serial stdio \
-drive if=none,file=/home/me/data/img/ubuntu-22.04-minimal-cloudimg-amd64.img,format=raw,id=vda \
-device virtio-blk-pci,drive=vda \
-netdev bridge,id=net0,br=acrn-br0 \
-device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:2d:4f \
-device virtio-gpu-pci \
-device virtio-balloon-pci,id=balloon0 \
-device qemu-xhci,id=usb0 \
-device usb-kbd \
-device usb-mouse \
-device usb-tablet \
-display sdl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment