QEMU/KVM Shorter Command Line

I keep reading overcomplicated QEMU/KVM command lines, when really, to start a VirtIO disk and bridged VirtIO NIC virtual machine, only this command is needed:

$ sudo qemu-system-x86_64 -enable-kvm -m 1024 -cpu host -daemonize \
  -drive file=mydisk.img,if=virtio \
  -net nic,model=virtio -net tap,ifname=tap0
  • drive type is virtio
  • nic model is virtio and the interface is of tap type, this will summon /etc/qemu-ifup to attach the interface to your bridge.

Depending on your QEMU installation, either this will fire up a window showing your virtual machine booting, or start a VNC server on port 5900.