On 07/10/2014 02:54 AM, Hong-Hua.Yin(a)freescale.com wrote:
Hi,
I tried to run domsuspend command on my PowerPC board but failed.
# virsh dompmsuspend sdk --target mem
error: Domain sdk could not be suspended
error: argument unsupported: QEMU guest agent is not configured
It seemed that support suspend-to-mem only from capabilities.
Whoops, you are mixing up who is getting suspended.
# virsh capabilities
<capabilities>
<host>
<power_management>
<suspend_mem/>
</power_management>
That says that 'virsh nodesuspend' will be able to suspend the HOST to
memory, but nothing about what guests will support (and therefore,
nothing about whether 'virsh dompmsuspend' will work).
I read from some document about qemu guest agent but still don't
know how to config it as daemon in guest domain.
Hooking up the qemu-guest-agent requires two parts. On the host, you
must add a <channel> to your domain XML, per
http://libvirt.org/formatdomain.html#elementCharChannel (modern
virt-install and virt-manager do this for you when creating a new
guest). Then, in the guest, you must install the agent as a service.
On Fedora-based guests, this is as simple as installing the
qemu-guest-agent package, which automatically sets itself up to run as a
service if the virtual hardware is detected, and that will be the case
if the channel designation was listed in the domain XML. On other Linux
guests, you'll have to figure out if your distro of choice has made it
as easy as Fedora-based guests. On Windows guests, there are steps to
do it, but I don't personally have experience doing it myself, so you
may have better luck searching the archives here or on the qemu mailing
lists. For any other guest OS, you'd first have to port the
qemu-guest-agent code to your guest OS.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org