From: Cole Robinson Date: Thu, 13 Mar 2014 19:10:09 +0000 (-0400) Subject: qemu: XMLToNative: Don't open vhostfd X-Git-Tag: v1.2.3-rc1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b79321ad0f06220d7c13a1d73e83a76049e8dbc;p=thirdparty%2Flibvirt.git qemu: XMLToNative: Don't open vhostfd Just skip the vhost command line generation, since this won't work if attempting to run manually. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 3e6a172729..778d0510a3 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;