1
# q35 - VirtIO guest (graphical console)
2
# =========================================================
6
# $ qemu-system-x86_64 \
8
# -readconfig q35-virtio-graphical.cfg
10
# You will probably need to tweak the lines marked as
11
# CHANGE ME before being able to use this configuration!
13
# The guest will have a selection of VirtIO devices
14
# tailored towards optimal performance with modern guests,
15
# and will be accessed through a graphical console.
17
# ---------------------------------------------------------
19
# Using -nodefaults is required to have full control over
20
# the virtual hardware: when it's specified, QEMU will
21
# populate the board with only the builtin peripherals
22
# plus a small selection of core PCI devices and
23
# controllers; the user will then have to explicitly add
26
# The core PCI devices show up in the guest as:
29
# 00:1f.0 ISA bridge / LPC
30
# 00:1f.2 SATA (AHCI) controller
31
# 00:1f.3 SMBus controller
33
# This configuration file adds a number of other useful
34
# devices, more specifically:
36
# 00:01.0 VGA compatible controller
38
# 00.1c.* PCI bridge (PCI Express Root Ports)
39
# 01:00.0 SCSI storage controller
40
# 02:00.0 Ethernet controller
41
# 03:00.0 USB controller
43
# More information about these devices is available below.
47
# =========================================================
49
# We use the q35 machine type and enable KVM acceleration
50
# for better performance.
52
# Using less than 1 GiB of memory is probably not going to
53
# yield good performance in the guest, and might even lead
54
# to obscure boot issues in some cases.
66
# PCI bridge (PCI Express Root Ports)
67
# =========================================================
69
# We create eight PCI Express Root Ports, and we plug them
70
# all into separate functions of the same slot. Some of
71
# them will be used by devices, the rest will remain
72
# available for hotplug.
75
driver = "pcie-root-port"
83
driver = "pcie-root-port"
90
driver = "pcie-root-port"
97
driver = "pcie-root-port"
104
driver = "pcie-root-port"
111
driver = "pcie-root-port"
118
driver = "pcie-root-port"
125
driver = "pcie-root-port"
132
# SCSI storage controller (and storage)
133
# =========================================================
135
# We use virtio-scsi here so that we can (hot)plug a large
136
# number of disks without running into issues; a SCSI disk,
137
# backed by a qcow2 disk image on the host's filesystem, is
140
# We also create an optical disk, mostly for installation
141
# purposes: once the guest OS has been successfully
142
# installed, the guest will no longer boot from optical
143
# media. If you don't want, or no longer want, to have an
144
# optical disk in the guest you can safely comment out
145
# all relevant sections below.
148
driver = "virtio-scsi-pci"
159
file = "guest.qcow2" # CHANGE ME
163
[device "scsi-optical-disk"]
166
drive = "optical-disk"
169
[drive "optical-disk"]
170
file = "install.iso" # CHANGE ME
176
# =========================================================
178
# We use virtio-net for improved performance over emulated
179
# hardware; on the host side, we take advantage of user
180
# networking so that the QEMU process doesn't require any
181
# additional privileges.
187
driver = "virtio-net-pci"
193
# USB controller (and input devices)
194
# =========================================================
196
# We add a virtualization-friendly USB 3.0 controller and
197
# a USB tablet so that graphical guests can be controlled
198
# appropriately. A USB keyboard is not needed, as q35
199
# guests get a PS/2 one added automatically.
202
driver = "nec-usb-xhci"
207
driver = "usb-tablet"
211
# VGA compatible controller
212
# =========================================================
214
# We plug the QXL video card directly into the PCI Express
215
# Root Bus as it is a legacy PCI device; this way, we can
216
# reduce the number of PCI Express controllers in the
219
# If you're running the guest on a remote, potentially
220
# headless host, you will probably want to append something
223
# -display vnc=127.0.0.1:0
225
# to the command line in order to prevent QEMU from
226
# creating a graphical display window on the host and
227
# enable remote access instead.
236
# =========================================================
238
# Like the video card, the sound card is a legacy PCI
239
# device and as such can be plugged directly into the PCI
243
driver = "ich9-intel-hda"
248
driver = "hda-duplex"
251
audiodev = "audiodev0"
253
[audiodev "audiodev0"]
254
driver = "none" # CHANGE ME