libvirt/tests/qemuxml2argvdata/net-hostdev.args

32 lines
1019 B
Plaintext
Raw Normal View History

LC_ALL=C \
PATH=/bin \
HOME=/tmp/lib/domain--1-QEMUGuest1 \
USER=test \
LOGNAME=test \
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 \
QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-i386 \
-name QEMUGuest1 \
-S \
-machine pc,accel=tcg,usb=off,dump-guest-core=off \
-m 214 \
-realtime mlock=off \
-smp 1,sockets=1,cores=1,threads=1 \
-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
-display none \
-no-user-config \
-nodefaults \
-chardev socket,id=charmonitor,path=/tmp/lib/domain--1-QEMUGuest1/monitor.sock,\
server,nowait \
-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc \
-no-shutdown \
-no-acpi \
-usb \
-drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
-device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \
-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