DevOps Buzz
Search…
Bash / Shell
Bitbucket
Distros
Elasticsearch
General
Guidelines / Standards
microk8s
Prometheus
RabbitMQ
VirtualBox
Qemu

Install

1
brew install qemu
Copied!

Cheat Sheet

1
# List available machines
2
qemu-system-x86_64 -machine help
3
4
# List available accelerators
5
qemu-system-x86_64 -accel help
Copied!

Create VM

Create disk

1
qemu-img create -f qcow2 disk.qcow2 50G
Copied!

Intel Host -> x86_64 guest

1
qemu-system-x86_64 \
2
-machine type=q35,accel=hvf \
3
-smp 2 \
4
-hda disk.qcow2 \
5
-cdrom ~/Downloads/Ubuntu.iso \
6
-m 4G \
7
-vga virtio \
8
-usb \
9
-device usb-tablet \
10
-display default,show-cursor=on \
11
-cpu host \
12
-full-screen
Copied!

M1 Host ->x86_64 guest

1
qemu-system-x86_64 \
2
-machine type=q35,accel=tcg \
3
-smp 2 \
4
-hda disk.qcow2 \
5
-cdrom ~/Downloads/Ubuntu.iso \
6
-m 4G \
7
-vga virtio \
8
-usb \
9
-device usb-tablet \
10
-display default,show-cursor=on \
11
-full-screen
Copied!

References