[PATCH v2 2/3] qemu: XMLToNative: Don't open vhostfd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just skip the vhost command line generation, since this won't work if
attempting to run manually.
---
v2:
    s/forXMLToArgv/standalone/g

 src/qemu/qemu_command.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 3e6a172..778d051 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
                               virQEMUCapsPtr qemuCaps,
                               int vlan,
                               int bootindex,
-                              enum virNetDevVPortProfileOp vmop)
+                              enum virNetDevVPortProfileOp vmop,
+                              bool standalone)
 {
     int ret = -1;
     char *nic = NULL, *host = NULL;
@@ -7579,10 +7580,11 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
             goto cleanup;
     }
 
-    if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
-        actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
-        actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
-        actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {
+    if ((actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
+         actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
+         actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
+         actualType == VIR_DOMAIN_NET_TYPE_DIRECT) &&
+        !standalone) {
         /* Attempt to use vhost-net mode for these types of
            network device */
         vhostfdSize = net->driver.virtio.queues;
@@ -8759,7 +8761,8 @@ qemuBuildCommandLine(virConnectPtr conn,
                 vlan = i;
 
             if (qemuBuildInterfaceCommandLine(cmd, driver, conn, def, net,
-                                              qemuCaps, vlan, bootNet, vmop) < 0)
+                                              qemuCaps, vlan, bootNet, vmop,
+                                              standalone) < 0)
                 goto error;
             last_good_net = i;
             bootNet = 0;
-- 
1.8.5.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]