2015-11-06 13:20:06 +00:00
|
|
|
LC_ALL=C \
|
|
|
|
PATH=/bin \
|
2019-03-06 12:29:01 +00:00
|
|
|
HOME=/tmp/lib/domain--1-QEMUGuest1 \
|
2015-11-06 13:20:06 +00:00
|
|
|
USER=test \
|
|
|
|
LOGNAME=test \
|
2019-03-08 11:15:07 +00:00
|
|
|
XDG_DATA_HOME=/tmp/lib/domain--1-QEMUGuest1/.local/share \
|
|
|
|
XDG_CACHE_HOME=/tmp/lib/domain--1-QEMUGuest1/.cache \
|
|
|
|
XDG_CONFIG_HOME=/tmp/lib/domain--1-QEMUGuest1/.config \
|
2015-11-06 13:20:06 +00:00
|
|
|
QEMU_AUDIO_DRV=none \
|
2019-11-29 16:33:37 +00:00
|
|
|
/usr/bin/qemu-system-i386 \
|
2015-11-06 14:29:41 +00:00
|
|
|
-name QEMUGuest1 \
|
2015-11-06 13:20:06 +00:00
|
|
|
-S \
|
2018-03-29 10:51:55 +00:00
|
|
|
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
|
2015-11-06 13:20:06 +00:00
|
|
|
-m 214 \
|
2019-04-12 08:03:36 +00:00
|
|
|
-realtime mlock=off \
|
2016-06-23 11:29:16 +00:00
|
|
|
-smp 1,sockets=1,cores=1,threads=1 \
|
2015-11-06 14:29:52 +00:00
|
|
|
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
|
2018-03-29 10:51:55 +00:00
|
|
|
-display none \
|
2018-03-29 10:51:55 +00:00
|
|
|
-no-user-config \
|
2015-11-06 13:20:06 +00:00
|
|
|
-nodefaults \
|
2017-06-26 14:40:39 +00:00
|
|
|
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
|
|
|
|
server,nowait \
|
2018-03-28 22:04:58 +00:00
|
|
|
-mon chardev=charmonitor,id=monitor,mode=control \
|
2018-03-29 10:51:55 +00:00
|
|
|
-rtc base=utc \
|
2018-03-29 10:51:55 +00:00
|
|
|
-no-shutdown \
|
2015-11-06 13:20:06 +00:00
|
|
|
-no-acpi \
|
|
|
|
-usb \
|
2015-12-28 14:13:52 +00:00
|
|
|
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
|
2019-01-28 13:44:57 +00:00
|
|
|
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
|
2019-08-12 14:47:14 +00:00
|
|
|
-device vfio-pci,host=0000:03:07.1,id=hostdev0,bus=pci.0,addr=0x3 \
|
qemu: support type='hostdev' network devices at domain start
This patch makes sure that each network device ("interface") of
type='hostdev' appears on both the hostdevs list and the nets list of
the virDomainDef, and it modifies the qemu driver startup code so that
these devices will be presented to qemu on the commandline as hostdevs
rather than as network devices.
It does not add support for hotplug of these type of devices, or code
to honor the <mac address> or <virtualport> given in the config (both
of those will be done in separate patches).
Once each device is placed on both lists, much of what this patch does
is modify places in the code that traverse all the device lists so
that these hybrid devices are only acted on once - either along with
the other hostdevs, or along with the other network interfaces. (In
many cases, only one of the lists is traversed / a specific operation
is performed on only one type of device. In those instances, the code
can remain unchanged.)
There is one special case - when building the commandline, interfaces
are allowed to proceed all the way through
networkAllocateActualDevice() before deciding to skip the rest of
netdev-specific processing - this is so that (once we have support for
networks with pools of hostdev devices) we can get the actual device
allocated, then rely on the loop processing all hostdevs to generate
the correct commandline.
(NB: <interface type='hostdev'> is only supported for PCI network
devices that are SR-IOV Virtual Functions (VF). Standard PCI[e] and
USB devices, and even the Physical Functions (PF) of SR-IOV devices
can only be assigned to a guest using the more basic <hostdev> device
entry. This limitation is mostly due to the fact that non-SR-IOV
ethernet devices tend to lose mac address configuration whenever the
card is reset, which happens when a card is assigned to a guest;
SR-IOV VFs fortunately don't suffer the same problem.)
2012-02-23 15:45:35 +00:00
|
|
|
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
|