DevOps Buzz
Search…
⌃K

Qemu

Install

brew install qemu

Cheat Sheet

# List available machines
qemu-system-x86_64 -machine help
# List available accelerators
qemu-system-x86_64 -accel help

Create VM

Create disk

qemu-img create -f qcow2 disk.qcow2 50G

Intel Host -> x86_64 guest

qemu-system-x86_64 \
-machine type=q35,accel=hvf \
-smp 2 \
-hda disk.qcow2 \
-cdrom ~/Downloads/Ubuntu.iso \
-m 4G \
-vga virtio \
-usb \
-device usb-tablet \
-display default,show-cursor=on \
-cpu host \
-full-screen

M1 Host ->x86_64 guest

qemu-system-x86_64 \
-machine type=q35,accel=tcg \
-smp 2 \
-hda disk.qcow2 \
-cdrom ~/Downloads/Ubuntu.iso \
-m 4G \
-vga virtio \
-usb \
-device usb-tablet \
-display default,show-cursor=on \
-full-screen

References