提交 7d3dc7a0 编写于 作者: M Marc-André Lureau

qemu: add machine vmport argument

Fill qemu command line vmport argument as required.
上级 f5a5f2b7
...@@ -7316,6 +7316,7 @@ qemuBuildMachineArgStr(virCommandPtr cmd, ...@@ -7316,6 +7316,7 @@ qemuBuildMachineArgStr(virCommandPtr cmd,
obsoleteAccel = true; obsoleteAccel = true;
} else { } else {
virBuffer buf = VIR_BUFFER_INITIALIZER; virBuffer buf = VIR_BUFFER_INITIALIZER;
virTristateSwitch vmport = def->features[VIR_DOMAIN_FEATURE_VMPORT];
virCommandAddArg(cmd, "-machine"); virCommandAddArg(cmd, "-machine");
virBufferAdd(&buf, def->os.machine, -1); virBufferAdd(&buf, def->os.machine, -1);
...@@ -7333,6 +7334,19 @@ qemuBuildMachineArgStr(virCommandPtr cmd, ...@@ -7333,6 +7334,19 @@ qemuBuildMachineArgStr(virCommandPtr cmd,
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT)) if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_USB_OPT))
virBufferAddLit(&buf, ",usb=off"); virBufferAddLit(&buf, ",usb=off");
if (vmport) {
if (!virQEMUCapsSupportsVmport(qemuCaps, def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("vmport is not available "
"with this QEMU binary"));
virBufferFreeAndReset(&buf);
return -1;
}
virBufferAsprintf(&buf, ",vmport=%s",
virTristateSwitchTypeToString(vmport));
}
if (def->mem.dump_core) { if (def->mem.dump_core) {
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) { if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DUMP_GUEST_CORE)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册