james harvey
2015-Aug-11 01:16 UTC
[libvirt-users] Do I need to enable qemu-ga's guest-suspend: hybrid/suspend-ram/disk/shutdown?
How do I "enable" qemu-ga on a guest to be able to (I think this means have a success-response:true) for: guest-suspend-hybrid; guest-suspend-ram; guest-suspend-disk; and guest-shutdown? At least I think that's my question. http://wiki.stoney-cloud.org/wiki/Qemu_Guest_Agent_Integration shows these same 4 as false, so I'm not sure if they're always supposed to be that way. My overall point is to be able to run dompmsuspend servo disk. After setting up qemu-ga as far as I have, it at least says: ====Domain <vmname> successfully suspended ====But, Using libvirt 1.2.18 (-1 Arch) and QEMU git-master (2.4.0.r40384.2d69736). pm-utils 1.4.1-6. acpid 2.0.23-4 Installed using Q35 chipset. ====={{{ domain xml file includes: }}} <pm> <suspend-to-mem enables='yes'/> <suspend-to-disk enables='yes'/> </pm> ... <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/<vmname>.org.qemu.guest_agent.0'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <address type='virtio-serial' controller='0' bus='0' port='2'/> </channel> ====client # qemu-ga --verbose debug: received EOF {{{ server: virsh # shutdown <vmname> --mode agent error: Failed to shutdown domain <vmname> error: internal error: unable to execute QEMU agent command 'guest-shutdown': child process has failed to shutdown }}} debug: read data, count: 59, data: {"execute":"guest-sync", "arguments":{"id":1439251067706}} debug: process_event: called debug: processing command debug: sending data, count: 26 debug: read data, count: 62, data: {"execute":"guest-shutdown","arguments":{"mode":"powerdown"}} debug: process_event: called debug: processing command debug: sending data, count: 85 ===={{{ server: virsh # qemu-agent-command <vmname> '{"execute":"guest-ping"}' {"return":{}} }}} debug: read data, count: 59, data: {"execute":"guest-sync", "arguments":{"id":1439251455241}} debug: process_event: called debug: processing command debug: sending data, count: 26 debug: read data, count: 25, data: {"execute":"guest-ping"} debug: process_event: called debug: processing command debug: sending data, count: 15 ===={{{ server - the json-type data is all on one line - i broke it up: virsh # qemu-agent-command servo '{"execute":"guest-info"}' {"return": {"version":"2.3.94","supported_commands": [{"enabled":true,"name":"guest-get-memory-block-info","success-response":true}, {"enabled":true,"name":"guest-set-memory-blocks","success-response":true}, {"enabled":true,"name":"guest-get-memory-blocks","success-response":true}, {"enabled":true,"name":"guest-set-user-password","success-response":true}, {"enabled":true,"name":"guest-get-fsinfo","success-response":true}, {"enabled":true,"name":"guest-set-vcpus","success-response":true}, {"enabled":true,"name":"guest-get-vcpus","success-response":true}, {"enabled":true,"name":"guest-network-get-interfaces","success-response":true}, {"enabled":true,"name":"guest-suspend-hybrid","success-response":*false*}, {"enabled":true,"name":"guest-suspend-ram","success-response":*false*}, {"enabled":true,"name":"guest-suspend-disk","success-response":*false*}, {"enabled":true,"name":"guest-fstrim","success-response":true}, {"enabled":true,"name":"guest-fsfreeze-thaw","success-response":true}, {"enabled":true,"name":"guest-fsfreeze-freeze-list","success-response":true}, {"enabled":true,"name":"guest-fsfreeze-freeze","success-response":true}, {"enabled":true,"name":"guest-fsfreeze-status","success-response":true}, {"enabled":true,"name":"guest-file-flush","success-response":true}, {"enabled":true,"name":"guest-file-seek","success-response":true}, {"enabled":true,"name":"guest-file-write","success-response":true}, {"enabled":true,"name":"guest-file-read","success-response":true}, {"enabled":true,"name":"guest-file-close","success-response":true}, {"enabled":true,"name":"guest-file-open","success-response":true}, {"enabled":true,"name":"guest-shutdown","success-response":*false*}, {"enabled":true,"name":"guest-info","success-response":true}, {"enabled":true,"name":"guest-set-time","success-response":true}, {"enabled":true,"name":"guest-get-time","success-response":true}, {"enabled":true,"name":"guest-ping","success-response":true}, {"enabled":true,"name":"guest-sync","success-response":true}, {"enabled":true,"name":"guest-sync-delimited","success-response":true}]}} }}} =====
Eric Blake
2015-Aug-11 03:48 UTC
Re: [libvirt-users] Do I need to enable qemu-ga's guest-suspend: hybrid/suspend-ram/disk/shutdown?
On 08/10/2015 07:16 PM, james harvey wrote:> How do I "enable" qemu-ga on a guest to be able to (I think this means have > a success-response:true) for: guest-suspend-hybrid; guest-suspend-ram; > guest-suspend-disk; and guest-shutdown? >"success-response":false has nothing to do with whether a guest-agent command is enabled, but rather whether you should expect a response from the agent itself when the command succeeds. For these commands, the answer is no, you do not get a response from the guest agent, because the action performed by the guest has shut things down to the point that it cannot reply; instead, to learn if the command was successful, you must listen to the ordinary QMP monitor for an event notification corresponding to the change in guest state. Libvirt already handles this interaction correctly. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
james harvey
2015-Aug-11 03:49 UTC
Re: [libvirt-users] Do I need to enable qemu-ga's guest-suspend: hybrid/suspend-ram/disk/shutdown?
{{{ domain xml file includes: }}}> <pm> > <suspend-to-mem enables='yes'/> > <suspend-to-disk enables='yes'/> > </pm> >FYI this is a typo in the email -- the file properly uses "enabled" not "enables"
james harvey
2015-Aug-11 03:51 UTC
Re: [libvirt-users] Do I need to enable qemu-ga's guest-suspend: hybrid/suspend-ram/disk/shutdown?
> > "success-response":false has nothing to do with whether a guest-agent > command is enabled, but rather whether you should expect a response from > the agent itself when the command succeeds. For these commands, the > answer is no, you do not get a response from the guest agent, because > the action performed by the guest has shut things down to the point that > it cannot reply; instead, to learn if the command was successful, you > must listen to the ordinary QMP monitor for an event notification > corresponding to the change in guest state. > > Libvirt already handles this interaction correctly. >Ahh, OK. Rats, was hoping I had found a lead to my "no matter what method I try, I can't have a graceful shutdown/suspend of my guest VM's if the host is shutting down/rebooting" problem.
Maybe Matching Threads
- Re: Do I need to enable qemu-ga's guest-suspend: hybrid/suspend-ram/disk/shutdown?
- managedsave/start causes IRQ and task blocked for more than 120 seconds errors
- backup-begin
- RE: guest-fsfreeze-freeze freezes all mounted block devices
- Issue with fsfreeze with qemu agent.