1 # q35 - Emulated guest (graphical console)
2 # =========================================================
6 # $ qemu-system-x86_64 \
8 # -readconfig q35-emulated.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 emulated devices that
14 # closely resembles that of a physical machine, and will be
15 # 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 devices that
34 # are pretty much guaranteed to be present in every single
35 # physical machine based on q35, more specifically:
37 # 00:01.0 VGA compatible controller
38 # 00:19.0 Ethernet controller
39 # 00:1a.* USB controller (#2)
40 # 00:1b.0 Audio device
41 # 00:1c.* PCI bridge (PCI Express Root Ports)
42 # 00:1d.* USB Controller (#1)
43 # 00:1e.0 PCI bridge (legacy PCI bridge)
45 # More information about these devices is available below.
49 # =========================================================
51 # We use the q35 machine type and enable KVM acceleration
52 # for better performance.
54 # Using less than 1 GiB of memory is probably not going to
55 # yield good performance in the guest, and might even lead
56 # to obscure boot issues in some cases.
58 # Unfortunately, there is no way to configure the CPU model
59 # in this file, so it will have to be provided on the
70 # PCI bridge (PCI Express Root Ports)
71 # =========================================================
73 # We add four PCI Express Root Ports, all sharing the same
74 # slot on the PCI Express Root Bus. These ports support
77 [device "ich9-pcie-port-1"]
85 [device "ich9-pcie-port-2"]
93 [device "ich9-pcie-port-3"]
101 [device "ich9-pcie-port-4"]
110 # PCI bridge (legacy PCI bridge)
111 # =========================================================
113 # This bridge can be used to build an independent topology
114 # for legacy PCI devices. PCI Express devices should be
115 # plugged into PCI Express slots instead, so ideally there
116 # will be no devices connected to this bridge.
118 [device "ich9-pci-bridge"]
119 driver = "i82801b11-bridge"
125 # =========================================================
127 # An implicit SATA controller is created automatically for
128 # every single q35 guest; here we create a disk, backed by
129 # a qcow2 disk image on the host's filesystem, and attach
130 # it to that controller so that the guest can use it.
132 # We also create an optical disk, mostly for installation
133 # purposes: once the guest OS has been succesfully
134 # installed, the guest will no longer boot from optical
135 # media. If you don't want, or no longer want, to have an
136 # optical disk in the guest you can safely comment out
137 # all relevant sections below.
146 file = "guest.qcow2" # CHANGE ME
150 [device "sata-optical-disk"]
153 drive = "optical-disk"
156 [drive "optical-disk"]
157 file = "install.iso" # CHANGE ME
162 # USB controller (#1)
163 # =========================================================
165 # EHCI controller + UHCI companion controllers.
167 [device "ich9-ehci-1"]
168 driver = "ich9-usb-ehci1"
173 [device "ich9-uhci-1"]
174 driver = "ich9-usb-uhci1"
178 masterbus = "ich9-ehci-1.0"
181 [device "ich9-uhci-2"]
182 driver = "ich9-usb-uhci2"
186 masterbus = "ich9-ehci-1.0"
189 [device "ich9-uhci-3"]
190 driver = "ich9-usb-uhci3"
194 masterbus = "ich9-ehci-1.0"
198 # USB controller (#2)
199 # =========================================================
201 # EHCI controller + UHCI companion controllers.
203 [device "ich9-ehci-2"]
204 driver = "ich9-usb-ehci2"
209 [device "ich9-uhci-4"]
210 driver = "ich9-usb-uhci4"
214 masterbus = "ich9-ehci-2.0"
217 [device "ich9-uhci-5"]
218 driver = "ich9-usb-uhci5"
222 masterbus = "ich9-ehci-2.0"
225 [device "ich9-uhci-6"]
226 driver = "ich9-usb-uhci6"
230 masterbus = "ich9-ehci-2.0"
234 # Ethernet controller
235 # =========================================================
237 # We add a Gigabit Ethernet interface to the guest; on the
238 # host side, we take advantage of user networking so that
239 # the QEMU process doesn't require any additional
252 # VGA compatible controller
253 # =========================================================
255 # We use stdvga instead of Cirrus as it supports more video
256 # modes and is closer to what actual hardware looks like.
258 # If you're running the guest on a remote, potentially
259 # headless host, you will probably want to append something
262 # -display vnc=127.0.0.1:0
264 # to the command line in order to prevent QEMU from
265 # creating a graphical display window on the host and
266 # enable remote access instead.
275 # =========================================================
277 # The sound card is a legacy PCI device that is plugged
278 # directly into the PCI Express Root Bus.
280 [device "ich9-hda-audio"]
281 driver = "ich9-intel-hda"
285 [device "ich9-hda-duplex"]
286 driver = "hda-duplex"
287 bus = "ich9-hda-audio.0"