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.
71 # PCI bridge (PCI Express Root Ports)
72 # =========================================================
74 # We create eight PCI Express Root Ports, and we plug them
75 # all into separate functions of the same slot. Some of
76 # them will be used by devices, the rest will remain
77 # available for hotplug.
80 driver = "pcie-root-port"
88 driver = "pcie-root-port"
95 driver = "pcie-root-port"
102 driver = "pcie-root-port"
109 driver = "pcie-root-port"
116 driver = "pcie-root-port"
123 driver = "pcie-root-port"
130 driver = "pcie-root-port"
137 # SCSI storage controller (and storage)
138 # =========================================================
140 # We use virtio-scsi here so that we can (hot)plug a large
141 # number of disks without running into issues; a SCSI disk,
142 # backed by a qcow2 disk image on the host's filesystem, is
145 # We also create an optical disk, mostly for installation
146 # purposes: once the guest OS has been successfully
147 # installed, the guest will no longer boot from optical
148 # media. If you don't want, or no longer want, to have an
149 # optical disk in the guest you can safely comment out
150 # all relevant sections below.
153 driver = "virtio-scsi-pci"
164 file = "guest.qcow2" # CHANGE ME
168 [device "scsi-optical-disk"]
171 drive = "optical-disk"
174 [drive "optical-disk"]
175 file = "install.iso" # CHANGE ME
180 # Ethernet controller
181 # =========================================================
183 # We use virtio-net for improved performance over emulated
184 # hardware; on the host side, we take advantage of user
185 # networking so that the QEMU process doesn't require any
186 # additional privileges.
192 driver = "virtio-net-pci"