mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +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",
|
||||
"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);
|
||||
|
Loading…
Reference in New Issue
Block a user