mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: XMLToNative: Don't open vhostfd
Just skip the vhost command line generation, since this won't work if attempting to run manually.
This commit is contained in:
parent
e8400564c8
commit
3b79321ad0
@ -7521,7 +7521,8 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
|
|||||||
virQEMUCapsPtr qemuCaps,
|
virQEMUCapsPtr qemuCaps,
|
||||||
int vlan,
|
int vlan,
|
||||||
int bootindex,
|
int bootindex,
|
||||||
enum virNetDevVPortProfileOp vmop)
|
enum virNetDevVPortProfileOp vmop,
|
||||||
|
bool standalone)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
char *nic = NULL, *host = NULL;
|
char *nic = NULL, *host = NULL;
|
||||||
@ -7579,10 +7580,11 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
|
if ((actualType == VIR_DOMAIN_NET_TYPE_NETWORK ||
|
||||||
actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
|
actualType == VIR_DOMAIN_NET_TYPE_BRIDGE ||
|
||||||
actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
|
actualType == VIR_DOMAIN_NET_TYPE_ETHERNET ||
|
||||||
actualType == VIR_DOMAIN_NET_TYPE_DIRECT) {
|
actualType == VIR_DOMAIN_NET_TYPE_DIRECT) &&
|
||||||
|
!standalone) {
|
||||||
/* Attempt to use vhost-net mode for these types of
|
/* Attempt to use vhost-net mode for these types of
|
||||||
network device */
|
network device */
|
||||||
vhostfdSize = net->driver.virtio.queues;
|
vhostfdSize = net->driver.virtio.queues;
|
||||||
@ -8759,7 +8761,8 @@ qemuBuildCommandLine(virConnectPtr conn,
|
|||||||
vlan = i;
|
vlan = i;
|
||||||
|
|
||||||
if (qemuBuildInterfaceCommandLine(cmd, driver, conn, def, net,
|
if (qemuBuildInterfaceCommandLine(cmd, driver, conn, def, net,
|
||||||
qemuCaps, vlan, bootNet, vmop) < 0)
|
qemuCaps, vlan, bootNet, vmop,
|
||||||
|
standalone) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
last_good_net = i;
|
last_good_net = i;
|
||||||
bootNet = 0;
|
bootNet = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user