create vm

qemu-img create -f qcow2 <filename> 4g
  • create [-f FMT] filename [size]
    • size is disk image size in bytes

install system

qemu-system-x86_64 -m 1g -cdrom /path/to/iso -boot order=d -drive file=<filename>,format=qcow2

start system

qemu-system-x86_64 <filename>

ssh

  • start system with port
    qemu-system-x86_64 <filename> -nic user,hostfwd=tcp::8888-:22
  • from host
    ssh <user>@127.0.0.1 -p 8888
  • from guest
    ssh <user>@192.168.0.3 # or whatever the local ip is