1 # q35 - VirtIO guest (serial console)
2 # =========================================================
6 # $ qemu-system-x86_64 \
8 # -readconfig q35-virtio-serial.cfg \
9 # -display none -serial mon:stdio
11 # You will probably need to tweak the lines marked as
12 # CHANGE ME before being able to use this configuration!
14 # The guest will have a selection of VirtIO devices
15 # tailored towards optimal performance with modern guests,
16 # and will be accessed through the serial console.
18 # ---------------------------------------------------------
20 # Using -nodefaults is required to have full control over
21 # the virtual hardware: when it's specified, QEMU will
22 # populate the board with only the builtin peripherals
23 # plus a small selection of core PCI devices and
24 # controllers; the user will then have to explicitly add
27 # The core PCI devices show up in the guest as:
30 # 00:1f.0 ISA bridge / LPC
31 # 00:1f.2 SATA (AHCI) controller
32 # 00:1f.3 SMBus controller
34 # This configuration file adds a number of other useful
35 # devices, more specifically:
37 # 00.1c.* PCI bridge (PCI Express Root Ports)
38 # 01:00.0 SCSI storage controller
39 # 02:00.0 Ethernet controller
41 # More information about these devices is available below.
43 # We use '-display none' to prevent QEMU from creating a
44 # graphical display window, which would serve no use in
45 # this specific configuration, and '-serial mon:stdio' to
46 # multiplex the guest's serial console and the QEMU monitor
47 # to the host's stdio; use 'Ctrl+A h' to learn how to
48 # switch between the two and more.
52 # =========================================================
54 # We use the q35 machine type and enable KVM acceleration
55 # for better performance.
57 # Using less than 1 GiB of memory is probably not going to
58 # yield good performance in the guest, and might even lead
59 # to obscure boot issues in some cases.
69 # PCI bridge (PCI Express Root Ports)
70 # =========================================================
72 # We create eight PCI Express Root Ports, and we plug them
73 # all into separate functions of the same slot. Some of
74 # them will be used by devices, the rest will remain
75 # available for hotplug.
78 driver = "pcie-root-port"
86 driver = "pcie-root-port"
93 driver = "pcie-root-port"
100 driver = "pcie-root-port"
107 driver = "pcie-root-port"
114 driver = "pcie-root-port"
121 driver = "pcie-root-port"
128 driver = "pcie-root-port"
135 # SCSI storage controller (and storage)
136 # =========================================================
138 # We use virtio-scsi here so that we can (hot)plug a large
139 # number of disks without running into issues; a SCSI disk,
140 # backed by a qcow2 disk image on the host's filesystem, is
143 # We also create an optical disk, mostly for installation
144 # purposes: once the guest OS has been successfully
145 # installed, the guest will no longer boot from optical
146 # media. If you don't want, or no longer want, to have an
147 # optical disk in the guest you can safely comment out
148 # all relevant sections below.
151 driver = "virtio-scsi-pci"
162 file = "guest.qcow2" # CHANGE ME
166 [device "scsi-optical-disk"]
169 drive = "optical-disk"
172 [drive "optical-disk"]
173 file = "install.iso" # CHANGE ME
178 # Ethernet controller
179 # =========================================================
181 # We use virtio-net for improved performance over emulated
182 # hardware; on the host side, we take advantage of user
183 # networking so that the QEMU process doesn't require any
184 # additional privileges.
190 driver = "virtio-net-pci"