mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 18:03:50 +03:00
qemu: allow json in domxml-to-native
There is a little difference between the output of domxml-to-native and the actual commandline. No matter qemu is in control or readline mode, domxml-to-native always converts it to readline mode. That is because the parameter "monitor_json" for qemuBuildCommandLine() is always set to false in qemuDomainXMLToNative(). Signed-off-by: tangchen <tangchen@cn.fujitsu.com>
This commit is contained in:
parent
10d3272ec3
commit
755a09b579
@ -4511,6 +4511,7 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
||||
virDomainDefPtr def = NULL;
|
||||
virDomainChrSourceDef monConfig;
|
||||
virBitmapPtr qemuCaps = NULL;
|
||||
bool monitor_json = false;
|
||||
virCommandPtr cmd = NULL;
|
||||
char *ret = NULL;
|
||||
int i;
|
||||
@ -4608,11 +4609,13 @@ static char *qemuDomainXMLToNative(virConnectPtr conn,
|
||||
&qemuCaps) < 0)
|
||||
goto cleanup;
|
||||
|
||||
monitor_json = qemuCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON);
|
||||
|
||||
if (qemuProcessPrepareMonitorChr(driver, &monConfig, def->name) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!(cmd = qemuBuildCommandLine(conn, driver, def,
|
||||
&monConfig, false, qemuCaps,
|
||||
&monConfig, monitor_json, qemuCaps,
|
||||
NULL, -1, NULL, VIR_VM_OP_NO_OP)))
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user