mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +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…
Reference in New Issue
Block a user