mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
qemu: don't use chardev FD passing with standalone args
When using domxml-to-native, we must generate CLI args that can be used
in a standalone scenario. This means no FD passing can be used. To
achieve this we must clear the QEMU_CAPS_CHARDEV_FD_PASS capability bit.
Reviewed-by: John Ferlan <jferlan@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit 7ac08cc929
)
This commit is contained in:
parent
6a32f5b89d
commit
3818514602
@ -5124,6 +5124,9 @@ qemuProcessInit(virQEMUDriverPtr driver,
|
||||
vm->def->os.machine)))
|
||||
goto cleanup;
|
||||
|
||||
if (flags & VIR_QEMU_PROCESS_START_STANDALONE)
|
||||
virQEMUCapsClear(priv->qemuCaps, QEMU_CAPS_CHARDEV_FD_PASS);
|
||||
|
||||
if (qemuDomainUpdateCPU(vm, updatedCPU, &origCPU) < 0)
|
||||
goto cleanup;
|
||||
|
||||
@ -6632,6 +6635,8 @@ qemuProcessCreatePretendCmd(virQEMUDriverPtr driver,
|
||||
|
||||
flags |= VIR_QEMU_PROCESS_START_PRETEND;
|
||||
flags |= VIR_QEMU_PROCESS_START_NEW;
|
||||
if (standalone)
|
||||
flags |= VIR_QEMU_PROCESS_START_STANDALONE;
|
||||
|
||||
if (qemuProcessInit(driver, vm, NULL, QEMU_ASYNC_JOB_NONE,
|
||||
!!migrateURI, flags) < 0)
|
||||
|
@ -81,6 +81,8 @@ typedef enum {
|
||||
VIR_QEMU_PROCESS_START_PRETEND = 1 << 3,
|
||||
VIR_QEMU_PROCESS_START_NEW = 1 << 4, /* internal, new VM is starting */
|
||||
VIR_QEMU_PROCESS_START_GEN_VMID = 1 << 5, /* Generate a new VMID */
|
||||
VIR_QEMU_PROCESS_START_STANDALONE = 1 << 6, /* Require CLI args to be usable standalone,
|
||||
ie no FD passing and the like */
|
||||
} qemuProcessStartFlags;
|
||||
|
||||
int qemuProcessStart(virConnectPtr conn,
|
||||
|
Loading…
Reference in New Issue
Block a user