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. Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx> --- src/qemu/qemu_process.c | 5 +++++ src/qemu/qemu_process.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ac32dafcbe..40d35cbe6b 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -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) diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index 531c2a0cc7..07ce3a9915 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -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, -- 2.17.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list