mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: qemuDomainPMSuspendForDuration: Check availability of agent
It requires a guest agent configured and running in the domain's guest OS, So check qemu agent during qemuDomainPMSuspendForDuration(). Signed-off-by: Lin Ma <lma@suse.de> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6de6d6c771
commit
308ec831bb
@ -16820,6 +16820,9 @@ qemuDomainPMSuspendForDuration(virDomainPtr dom,
|
||||
if (virDomainPMSuspendForDurationEnsureACL(dom->conn, vm->def) < 0)
|
||||
goto cleanup;
|
||||
|
||||
if (!qemuDomainAgentAvailable(vm, true))
|
||||
goto cleanup;
|
||||
|
||||
/*
|
||||
* The case we want to handle here is when QEMU has the API (i.e.
|
||||
* QEMU_CAPS_QUERY_CURRENT_MACHINE is set). Otherwise, do not interfere
|
||||
|
Loading…
x
Reference in New Issue
Block a user