]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemuxml2argvmock: Use real FDs for interface tests
authorPeter Krempa <pkrempa@redhat.com>
Tue, 19 May 2026 16:06:31 +0000 (18:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 25 May 2026 11:28:59 +0000 (13:28 +0200)
Similarly to previous commits use real FDs so that we don't risk
collisions.

Note that for the test cases passing multiple tap and vhost FDs the
helpers which stabilize the output don't actually work, as the FDs are
concatenated. For now we'll not deal with this and simply leave them
censored by the 'XXXXXXX' string.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
20 files changed:
tests/qemuxml2argvmock.c
tests/qemuxmlconfdata/downscript.x86_64-latest.args
tests/qemuxmlconfdata/graphics-spice-timeout.x86_64-latest.args
tests/qemuxmlconfdata/net-bandwidth.x86_64-latest.args
tests/qemuxmlconfdata/net-bandwidth2.x86_64-latest.args
tests/qemuxmlconfdata/net-coalesce.x86_64-latest.args
tests/qemuxmlconfdata/net-eth-hostip.x86_64-latest.args
tests/qemuxmlconfdata/net-eth-ifname.x86_64-latest.args
tests/qemuxmlconfdata/net-eth-names.x86_64-latest.args
tests/qemuxmlconfdata/net-eth-unmanaged-tap.x86_64-latest.args
tests/qemuxmlconfdata/net-eth.x86_64-latest.args
tests/qemuxmlconfdata/net-isolated-port.x86_64-latest.args
tests/qemuxmlconfdata/net-midonet.x86_64-latest.args
tests/qemuxmlconfdata/net-mtu.x86_64-latest.args
tests/qemuxmlconfdata/net-openvswitch.x86_64-latest.args
tests/qemuxmlconfdata/net-virtio-network-portgroup.x86_64-latest.args
tests/qemuxmlconfdata/net-virtio-teaming-network.x86_64-latest.args
tests/qemuxmlconfdata/net-virtio-vhost.x86_64-latest.args
tests/qemuxmlconfdata/tap-vhost-incorrect.x86_64-latest.args
tests/qemuxmlconfdata/user-aliases.x86_64-latest.args

index de101173309752bda027d937f79708e2f4ea53c0..0440bb15e214020d1f594e99d2fe78bbd90af490 100644 (file)
@@ -105,22 +105,21 @@ virNetDevTapCreate(char **ifname,
 {
     size_t i;
 
-    for (i = 0; i < tapfdSize; i++)
-        tapfd[i] = 2900 + i;
-
-    if (STREQ_NULLABLE(*ifname, "mytap0")) {
-        return 0;
-    } else {
+    if (STRNEQ_NULLABLE(*ifname, "mytap0")) {
         VIR_FREE(*ifname);
         *ifname = g_strdup("vnet0");
-        return 0;
     }
+
+    for (i = 0; i < tapfdSize; i++)
+        tapfd[i] = virTestMakeDummyFD(g_strdup_printf("@tap-%s-fd@", *ifname));
+
+    return 0;
 }
 
 
 int
 virDomainInterfaceBridgeConnect(virDomainDef *def G_GNUC_UNUSED,
-                                virDomainNetDef *net G_GNUC_UNUSED,
+                                virDomainNetDef *net,
                                 int *tapfd,
                                 size_t *tapfdSize,
                                 bool privileged G_GNUC_UNUSED,
@@ -131,7 +130,7 @@ virDomainInterfaceBridgeConnect(virDomainDef *def G_GNUC_UNUSED,
     size_t i;
 
     for (i = 0; i < *tapfdSize; i++)
-        tapfd[i] = 2800 + i;
+        tapfd[i] = virTestMakeDummyFD(g_strdup_printf("@iface-%s-fd@", net->info.alias));
 
     return 0;
 }
@@ -235,7 +234,7 @@ qemuInterfaceOpenVhostNet(virDomainObj *vm G_GNUC_UNUSED,
 
     for (i = 0; i < vhostfdSize; i++) {
         g_autofree char *name = g_strdup_printf("vhostfd-%s%zu", net->info.alias, i);
-        int fd = 2200 + i;
+        int fd = virTestMakeDummyFD(g_strdup_printf("@vhostfd-%s-fd@", net->info.alias));
 
         netpriv->vhostfds = g_slist_prepend(netpriv->vhostfds, qemuFDPassDirectNew(name, &fd));
     }
index d0054089b6ecbbfad5bbdfd3dec6d2ec9a51bc43..d3b1b8ec23780a2eda14a0ad8a606c7eee7c906a 100644 (file)
@@ -34,7 +34,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"virtio-9p-pci","id":"fs0","fsdev":"fsdev-fs0","mount_tag":"fs1","bus":"pci.0","addr":"0x3"}' \
 -fsdev local,security_model=mapped,id=fsdev-fs1,path=/export/fs2 \
 -device '{"driver":"virtio-9p-pci","id":"fs1","fsdev":"fsdev-fs1","mount_tag":"fs2","bus":"pci.0","addr":"0x4"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:f6:66:88","bus":"pci.0","addr":"0xb"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0xc"}' \
index cd5c91f9c45eb7a534fa4b0cbd5b5dea6d9c8dd6..841a161654a862e51cfe4532b0e2e6f79565fa7f 100644 (file)
@@ -27,7 +27,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-f14/.config \
 -boot menu=on,strict=on \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:71:70:89","bus":"pci.0","addr":"0x7"}' \
 -device '{"driver":"usb-tablet","id":"input0","bus":"usb.0","port":"1"}' \
 -audiodev '{"id":"audio1","driver":"spice"}' \
index 210ae98d3c7c0889929460711b67064d1c93fe30..e1d4e5c902c70e785b26945bfefda494e7da72cb 100644 (file)
@@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.config \
 -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \
 -blockdev '{"driver":"file","filename":"/home/zippy/tmp/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","read-only":true}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-storage","id":"ide0-1-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:24:a5:9f","bus":"pci.0","addr":"0x7"}' \
 -chardev pty,id=charserial0 \
 -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
index 573c24ba17f69ab031a53cb5bf0beeb230faba56..edcdaa997e1c781ad149571a6e8a5ded4f0fbceb 100644 (file)
@@ -30,7 +30,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-f14-60/.config \
 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/f14-6.img","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
 -blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage"}' \
 -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x4","drive":"libvirt-1-format","id":"virtio-disk0","bootindex":2}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"52:54:00:24:a5:9f","bus":"pci.0","addr":"0x7"}' \
 -chardev pty,id=charserial0 \
 -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
index 9c061e4e6f3c288f0daf0e220abed492fdd9e8d6..26c174778af54f8d79d1ae34bbcd9f676d706e68 100644 (file)
@@ -33,11 +33,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
 -device '{"driver":"virtio-blk-pci","event_idx":true,"bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \
 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","read-only":true}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-storage","id":"ide0-1-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@iface-net1-fd@","vhost":true,"vhostfd":"@vhostfd-net1-fd@","id":"hostnet1"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet2"}' \
+-netdev '{"type":"tap","fd":"@iface-net2-fd@","vhost":true,"vhostfd":"@vhostfd-net2-fd@","id":"hostnet2"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet2","id":"net2","mac":"52:54:00:e5:48:60","bus":"pci.0","addr":"0x5"}' \
 -chardev pty,id=charserial0 \
 -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
index 6a9b53ca5250d73903b3aa68d73d5bb97325d9a6..2bea0659df418bb4205d123b59d004d6035b4d07 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index 6a9b53ca5250d73903b3aa68d73d5bb97325d9a6..2bea0659df418bb4205d123b59d004d6035b4d07 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index 70845d070afd40d0091c36b7151d80f8cfeb6148..4e7109e54a8851f233bcf9c6e81eaefe2f10502d 100644 (file)
@@ -29,9 +29,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet1"}' \
 -device '{"driver":"e1000","netdev":"hostnet1","id":"net1","mac":"00:11:22:33:44:56","bus":"pci.0","addr":"0x3"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x4"}' \
index 2c441611caae5b46eb184debbbb58dddac3b76f0..695a08b9a988de6cd6be0b590c55f0c873705a7a 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-mytap0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"fe:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index 6a9b53ca5250d73903b3aa68d73d5bb97325d9a6..2bea0659df418bb4205d123b59d004d6035b4d07 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
index 20f83c0f163b8cbf1c337e426ae6f1ee2c87803f..d76c6fa4acb8de94714301ba2fbf5a4c1775e8bb 100644 (file)
@@ -32,7 +32,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-q35-test/.config \
 -device '{"driver":"qemu-xhci","id":"usb","bus":"pci.2","addr":"0x0"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","drive":"libvirt-1-storage","id":"sata0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"52:54:00:d6:c0:0b","bus":"pci.1","addr":"0x0"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"qxl-vga","id":"video0","max_outputs":1,"ram_size":67108864,"vram_size":33554432,"vram64_size_mb":0,"vgamem_mb":8,"bus":"pcie.0","addr":"0x1"}' \
index f5bac0b91cb0a1f4e4a216905120c7639c5ecdb4..e98688963c8ff3ccb950966de248add20ae94068 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
index ce88e8b1ba1021d284f93cbc413c9e78b524338c..0479462ebb028193a8817f2246d9269a62b81e0d 100644 (file)
@@ -33,9 +33,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
 -device '{"driver":"virtio-blk-pci","event_idx":true,"bus":"pci.0","addr":"0x4","drive":"libvirt-2-format","id":"virtio-disk0","bootindex":2}' \
 -blockdev '{"driver":"file","filename":"/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso","node-name":"libvirt-1-storage","read-only":true}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"drive":"libvirt-1-storage","id":"ide0-1-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","host_mtu":1500,"netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","sndbuf":1600,"id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@iface-net1-fd@","vhost":true,"vhostfd":"@vhostfd-net1-fd@","sndbuf":1600,"id":"hostnet1"}' \
 -device '{"driver":"virtio-net-pci","host_mtu":9000,"netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \
 -chardev pty,id=charserial0 \
 -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
index 31cc8cbbf372c8d955a41fbac670ad4bb312420a..813b0509d69a11a281d694a7f9089fac1a99bc55 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x3"}' \
index c01bc60976707fa26e3098f8e4e38dd6bc380075..7c0e901f1d688ead8ae6eab348cbd07deefbe55c 100644 (file)
@@ -29,11 +29,11 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","vhost":true,"vhostfd":"@vhostfd-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet0","id":"net0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@iface-net1-fd@","id":"hostnet1"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet1","id":"net1","mac":"10:11:22:33:44:55","bus":"pci.0","addr":"0x3"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet2"}' \
+-netdev '{"type":"tap","fd":"@iface-net2-fd@","id":"hostnet2"}' \
 -device '{"driver":"rtl8139","netdev":"hostnet2","id":"net2","mac":"22:11:22:33:44:55","bus":"pci.0","addr":"0x4"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","addr":"0x5"}' \
index 2c2c219ba4986ff21d8aa986c4f9143639f83a0a..0a55473d1257f9a67eb25de7fade3444ee96032f 100644 (file)
@@ -29,7 +29,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1","node-name":"libvirt-1-storage","read-only":false}' \
 -device '{"driver":"ide-hd","bus":"ide.0","unit":0,"drive":"libvirt-1-storage","id":"ide0-0-0","bootindex":1}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostua-backup0"}' \
+-netdev '{"type":"tap","fd":"@iface-ua-backup0-fd@","vhost":true,"vhostfd":"@vhostfd-ua-backup0-fd@","id":"hostua-backup0"}' \
 -device '{"driver":"virtio-net-pci","failover":true,"netdev":"hostua-backup0","id":"ua-backup0","mac":"00:11:22:33:44:55","bus":"pci.0","addr":"0x2"}' \
 -audiodev '{"id":"audio1","driver":"none"}' \
 -device '{"driver":"vfio-pci","host":"0000:06:12.2","id":"hostdev0","failover_pair_id":"ua-backup0","bus":"pci.0","addr":"0x3"}' \
index c77cbd2a71c4582aef3728f1223f835f344d6a35..acbb8a53ecdf726b14c57baddfcb1cc0393b2ef8 100644 (file)
@@ -30,7 +30,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
 -device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \
 -netdev '{"type":"tap","fds":"XXXXXXX","vhost":true,"vhostfds":"XXXXXXX","id":"hostnet0"}' \
 -device '{"driver":"virtio-net-pci","mq":true,"vectors":12,"netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","vhost":true,"vhostfd":"@vhostfd-net1-fd@","id":"hostnet1"}' \
 -device '{"driver":"virtio-net-pci","ioeventfd":true,"netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \
 -netdev '{"type":"tap","fds":"XXXXXXX","vhost":true,"vhostfds":"XXXXXXX","id":"hostnet2"}' \
 -device '{"driver":"virtio-net-pci","ioeventfd":true,"mq":true,"vectors":12,"netdev":"hostnet2","id":"net2","mac":"52:54:00:e5:48:5a","bus":"pci.0","addr":"0x4"}' \
index 9e0df73d757e3a58530aa0fc0e5805bebea05c2d..156683c5a0c22c257c63398a0f427ddb01654082 100644 (file)
@@ -28,9 +28,9 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-test/.config \
 -boot menu=on,strict=on \
 -device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0x2"}' \
 -device '{"driver":"virtio-serial-pci","id":"virtio-serial0","bus":"pci.0","addr":"0x6"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","id":"hostnet0"}' \
+-netdev '{"type":"tap","fd":"@iface-net0-fd@","id":"hostnet0"}' \
 -device '{"driver":"e1000","netdev":"hostnet0","id":"net0","mac":"52:54:00:e5:48:58","bus":"pci.0","addr":"0x2"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostnet1"}' \
+-netdev '{"type":"tap","fd":"@iface-net1-fd@","vhost":true,"vhostfd":"@vhostfd-net1-fd@","id":"hostnet1"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostnet1","id":"net1","mac":"52:54:00:e5:48:59","bus":"pci.0","addr":"0x3"}' \
 -chardev pty,id=charserial0 \
 -device '{"driver":"isa-serial","chardev":"charserial0","id":"serial0","index":0}' \
index f5ca356773c47f59f8efe9f4fa2b4a7678a0278a..bd48634c40e6364fbeb97863d68f406075a9584c 100644 (file)
@@ -49,7 +49,7 @@ XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain--1-gentoo/.config \
 -device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x7","drive":"libvirt-2-format","id":"ua-myEncryptedDisk1"}' \
 -blockdev '{"driver":"file","filename":"/home/zippy/tmp/install-amd64-minimal-20140619.iso","node-name":"libvirt-1-storage","read-only":true,"cache":{"direct":true,"no-flush":false}}' \
 -device '{"driver":"ide-cd","bus":"ide.1","unit":0,"share-rw":true,"drive":"libvirt-1-storage","id":"ua-WhatAnAwesomeCDROM","bootindex":2,"write-cache":"on"}' \
--netdev '{"type":"tap","fd":"XXXXXXX","vhost":true,"vhostfd":"XXXXXXX","id":"hostua-CheckoutThisNIC"}' \
+-netdev '{"type":"tap","fd":"@tap-vnet0-fd@","vhost":true,"vhostfd":"@vhostfd-ua-CheckoutThisNIC-fd@","id":"hostua-CheckoutThisNIC"}' \
 -device '{"driver":"virtio-net-pci","netdev":"hostua-CheckoutThisNIC","id":"ua-CheckoutThisNIC","mac":"52:54:00:d6:c0:0b","bus":"pci.0","addr":"0x3"}' \
 -netdev '{"type":"socket","listen":"127.0.0.1:1234","id":"hostua-WeCanAlsoDoServerMode"}' \
 -device '{"driver":"rtl8139","netdev":"hostua-WeCanAlsoDoServerMode","id":"ua-WeCanAlsoDoServerMode","mac":"52:54:00:22:c9:42","bus":"pci.0","addr":"0x9"}' \