QEMU (quick emulator) is a virtualization software to emulate hardware of a computer.
apt install qemu-system
qemu-img create -f qcow2 debian10.qcow2 60G
The configuration is specified using command line interface (CLI) options.
There is no configuration file.
qemu-system-x86_64 \
-machine accel=kvm \
-m 2048 \
-cdrom debian-10.0.0-amd64-DVD-1.iso \
-display gtk,gl=on \
-vga virtio \
-audio pa,model=hda \
-nic user,model=e1000 \
debian10.qcow2
The kernel-based virtual machine (KVM) significantly accelerates the virtualization.
On the host, virtualization support needs to be enabled in BIOS settings.
-machine accel=kvm
-m
megs
-cdrom
file
-display
type
type | Description |
---|---|
none | Do not display video output |
gtk | Display video output in a GTK window |
sdl | Display video output via SDL |
egl-headless | Offload all OpenGL operations to a local DRI device |
curses | Display video output via curses |
spice-app | |
dbus |
-vga
type
type | Description | Comment |
---|---|---|
none | Disable VGA card | |
std | Standard VGA card with Bochs VBE extensions | Default; Works well for Windows XP and Windows 7 |
cirrus | Cirrus Logic GD5446 Video card | |
vmware | VMWare SVGA-II compatible adapter | |
qxl | QXL paravirtual graphic card | |
virtio | Virtio VGA card | Needed for GL acceleration; Works well for Linux |
-display gtk,gl=on -vga=virtio
-display gtk,gl=on
does not work with NVIDIA proprietary drivers.-display sdl,gl=on -vga=virtio
-audio driver=
driver
,model=
model
driver | Description | Comment |
---|---|---|
none | Discard all audio outputs | |
alsa | ALSA | Only on Linux |
oss | OSS | Available on Unix-like systems |
pa | PulseAudio | |
sdl | SDL | |
sndio | SNDIO | Available on OpenBSD |
spice | Send audio through SPICE | |
wav | Write a WAV file | |
dbus | ||
jack |
model | Description | Comment |
---|---|---|
ac97 | Intel 82801AA AC97 Audio | |
adlib | Yamaha YM3812 (OPL2) | |
cs4231a | CS4231A | |
es1370 | ENSONIQ AudioPCI ES1370 | Works well for Windows XP |
gus | Gravis Ultrasound GF1 | |
hda | Intel HD Audio | |
sb16 | Creative Sound Blaster 16 |
-nic user
Description | IPv4 |
---|---|
Guest | 10.0.2.15 |
Gateway / DHCP server | 10.0.2.2 |
DNS server | 10.0.2.3 |
SMB server (optional) | 10.0.2.4 |
-nic user,restrict=on
-nic user,smb=
dir
-nic user,hostfwd=tcp::
hostport
-:
guestport
-nic user,model=
modelname
modelname | Description | Comment |
---|---|---|
e1000 | Intel Gigabit Ethernet | Default |
e1000-82544gc | ||
e1000-82545em | ||
e1000e | ||
i82550 | Intel 8255x 10/100 Mbps Ethernet | |
i82551 | ||
i82557a | ||
i82557b | ||
i82557c | ||
i82558a | ||
i82558b | ||
i82559a | ||
i82559b | ||
i82559c | ||
i82559er | ||
i82562 | Intel Fast Ethernet Controller | |
i82801 | ||
ne2k_pci | NE2000 | Works well for Windows XP |
pcnet | AMD Ethernet Card | |
pvrdma | ||
rtl8139 | Realtek Fast Ethernet | Works well for Windows 7 |
rulip | ||
virtio-net-pci | ||
virtio-net-pci-non-transitional | ||
virtio-net-pci-transitional | ||
vmxnet3 |
-snapshot
Ctrl-Alt-g | Release mouse pointer |
Ctrl-Alt-f | Toggle full screen |
Ctrl-Alt-u | Restore the screen's unscaled size |
Ctrl-Alt-2 | Switch to QEMU console |
Ctrl-Alt-1 | Switch to guest display |