提交 b98add75 编写于 作者: P Pavel Hrdina

qemu: taint domain if virDomainQemuAgentCommand API is used

This is similar to the virDomainQemuMonitorCommand API, it can change
the domain state in a way that libvirt may not understand.
Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
上级 c7543a72
......@@ -100,7 +100,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
"host-cpu",
"hook-script",
"cdrom-passthrough",
"custom-dtb");
"custom-dtb",
"custom-ga-command");
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
"none",
......
......@@ -2456,6 +2456,7 @@ typedef enum {
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specified */
VIR_DOMAIN_TAINT_CUSTOM_GA_COMMAND, /* Custom guest agent command */
VIR_DOMAIN_TAINT_LAST
} virDomainTaintFlags;
......
......@@ -18737,6 +18737,8 @@ qemuDomainQemuAgentCommand(virDomainPtr domain,
if (!qemuDomainAgentAvailable(vm, true))
goto endjob;
qemuDomainObjTaint(driver, vm, VIR_DOMAIN_TAINT_CUSTOM_GA_COMMAND, NULL);
agent = qemuDomainObjEnterAgent(vm);
ret = qemuAgentArbitraryCommand(agent, cmd, &result, timeout);
qemuDomainObjExitAgent(vm, agent);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册