Discussion:
[libvirt-users] Libvirt supported qemu-ga commands
procmem
2018-02-28 23:13:46 UTC
Permalink
Where can I find the full list of libvirt supported qemu-ga commands?
The docs [0] imply virDomainQemuAgentCommand bypasses libvirt and is not
recommended.

I am looking to pass suspend/resume events from the host to the guest
and then have the guest act on this internally. Your help is appreciated.


[0] https://wiki.libvirt.org/page/Qemu_guest_agent
procmem
2018-02-28 23:55:16 UTC
Permalink
Post by procmem
Where can I find the full list of libvirt supported qemu-ga commands?
The docs [0] imply virDomainQemuAgentCommand bypasses libvirt and is not
recommended.
I am looking to pass suspend/resume events from the host to the guest
and then have the guest act on this internally. Your help is appreciated.
[0] https://wiki.libvirt.org/page/Qemu_guest_agent
Did some RTFMing [1], I guess if I go by the shutdown example I can
suspend/resume via guest agent with these commands?

virsh suspend --mode=agent
virsh resume --mode=agent



[1]
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/virtualization_deployment_and_administration_guide/sect-using_the_qemu_guest_virtual_machine_agent_protocol_cli-libvirt_commands
Daniel P. Berrangé
2018-03-01 10:42:33 UTC
Permalink
Post by procmem
Where can I find the full list of libvirt supported qemu-ga commands?
The docs [0] imply virDomainQemuAgentCommand bypasses libvirt and is not
recommended.
I am looking to pass suspend/resume events from the host to the guest
and then have the guest act on this internally. Your help is appreciated.
By suspend/resume, do you mean ACPI S3 suspend-to-ram events ?

If so, that doesn't require guest agent involvement at all. Just requires

virsh dompmsuspend
virsh dompmwakeup

Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
procmem
2018-03-01 12:57:59 UTC
Permalink
Post by Daniel P. Berrangé
Post by procmem
Where can I find the full list of libvirt supported qemu-ga commands?
The docs [0] imply virDomainQemuAgentCommand bypasses libvirt and is not
recommended.
I am looking to pass suspend/resume events from the host to the guest
and then have the guest act on this internally. Your help is appreciated.
By suspend/resume, do you mean ACPI S3 suspend-to-ram events ?
If so, that doesn't require guest agent involvement at all. Just requires
virsh dompmsuspend
virsh dompmwakeup
Regards,
Daniel
I see. Thats simpler but will the guest be "sentient" about the fact
that it had just been resumed? I need it to know so that it triggers
specific events in this case.
Daniel P. Berrangé
2018-03-01 13:25:38 UTC
Permalink
Post by procmem
Post by Daniel P. Berrangé
Post by procmem
Where can I find the full list of libvirt supported qemu-ga commands?
The docs [0] imply virDomainQemuAgentCommand bypasses libvirt and is not
recommended.
I am looking to pass suspend/resume events from the host to the guest
and then have the guest act on this internally. Your help is appreciated.
By suspend/resume, do you mean ACPI S3 suspend-to-ram events ?
If so, that doesn't require guest agent involvement at all. Just requires
virsh dompmsuspend
virsh dompmwakeup
Regards,
Daniel
I see. Thats simpler but will the guest be "sentient" about the fact
that it had just been resumed? I need it to know so that it triggers
specific events in this case.
This works the same way as it does on physical hardware.


Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Loading...