mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
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: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
c7543a7286
commit
b98add7571
@ -100,7 +100,8 @@ VIR_ENUM_IMPL(virDomainTaint, VIR_DOMAIN_TAINT_LAST,
|
|||||||
"host-cpu",
|
"host-cpu",
|
||||||
"hook-script",
|
"hook-script",
|
||||||
"cdrom-passthrough",
|
"cdrom-passthrough",
|
||||||
"custom-dtb");
|
"custom-dtb",
|
||||||
|
"custom-ga-command");
|
||||||
|
|
||||||
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
|
VIR_ENUM_IMPL(virDomainVirt, VIR_DOMAIN_VIRT_LAST,
|
||||||
"none",
|
"none",
|
||||||
|
@ -2456,6 +2456,7 @@ typedef enum {
|
|||||||
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
|
VIR_DOMAIN_TAINT_HOOK, /* Domain (possibly) changed via hook script */
|
||||||
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
|
VIR_DOMAIN_TAINT_CDROM_PASSTHROUGH,/* CDROM passthrough */
|
||||||
VIR_DOMAIN_TAINT_CUSTOM_DTB, /* Custom device tree blob was specified */
|
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
|
VIR_DOMAIN_TAINT_LAST
|
||||||
} virDomainTaintFlags;
|
} virDomainTaintFlags;
|
||||||
|
@ -18737,6 +18737,8 @@ qemuDomainQemuAgentCommand(virDomainPtr domain,
|
|||||||
if (!qemuDomainAgentAvailable(vm, true))
|
if (!qemuDomainAgentAvailable(vm, true))
|
||||||
goto endjob;
|
goto endjob;
|
||||||
|
|
||||||
|
qemuDomainObjTaint(driver, vm, VIR_DOMAIN_TAINT_CUSTOM_GA_COMMAND, NULL);
|
||||||
|
|
||||||
agent = qemuDomainObjEnterAgent(vm);
|
agent = qemuDomainObjEnterAgent(vm);
|
||||||
ret = qemuAgentArbitraryCommand(agent, cmd, &result, timeout);
|
ret = qemuAgentArbitraryCommand(agent, cmd, &result, timeout);
|
||||||
qemuDomainObjExitAgent(vm, agent);
|
qemuDomainObjExitAgent(vm, agent);
|
||||||
|
Loading…
Reference in New Issue
Block a user