Skip to contentSkip to conversation

qemu-ga command listing

Qemu-devel Eric Blake 2 participants 3 messages Dec 31, 2012 – Jan 2, 2013

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

Is there a guest-agent command for querying the list of available commands for a given guest agent? If not, should there be? In other words, I'm looking for the counterpart to QMP {"execute":"query-commands"}.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#1 lore raw
Quoted 4 lines · Eric Blake

Is there a guest-agent command for querying the list of available commands for a given guest agent? If not, should there be? In other words, I'm looking for the counterpart to QMP {"execute":"query-commands"}.

Hi Eric,

There is guest-info ({"execute": "guest-info"}), which returns a list of supported commands, and whether or not that command is enabled or disabled (e.g. it may be blacklisted). Here is an example of the output, with guest-file-* operations blacklisted (formatted slightly for better readability):

{"return":

    {"version": "1.0", "supported_commands": 
        [{"enabled": true, "name": "guest-network-get-interfaces"}, 
         {"enabled": true, "name": "guest-suspend-hybrid"}, 
         {"enabled": true, "name": "guest-suspend-ram"}, 
         {"enabled": true, "name": "guest-suspend-disk"},
         {"enabled": true, "name": "guest-fsfreeze-thaw"}, 
         {"enabled": true, "name": "guest-fsfreeze-freeze"}, 
         {"enabled": true, "name": "guest-fsfreeze-status"}, 
         {"enabled": false, "name": "guest-file-flush"}, 
         {"enabled": false, "name": "guest-file-seek"},
         {"enabled": false, "name": "guest-file-write"}, 
         {"enabled": false, "name": "guest-file-read"}, 
         {"enabled": false, "name": "guest-file-close"}, 
         {"enabled": false, "name": "guest-file-open"},
         {"enabled": true, "name": "guest-shutdown"}, 
         {"enabled": true, "name": "guest-info"}, 
         {"enabled": true, "name": "guest-ping"}, 
         {"enabled": true, "name": "guest-sync"}, 
         {"enabled": true, "name": "guest-sync-delimited"}]}}

Jeff

author
#2 lore raw
Quoted 14 lines · Jeff Cody
Quoted 4 lines · Eric Blake

Is there a guest-agent command for querying the list of available commands for a given guest agent? If not, should there be? In other words, I'm looking for the counterpart to QMP {"execute":"query-commands"}.

Hi Eric,

There is guest-info ({"execute": "guest-info"}), which returns a list of supported commands, and whether or not that command is enabled or disabled (e.g. it may be blacklisted). Here is an example of the output, with guest-file-* operations blacklisted (formatted slightly for better readability):

Quoted 3 lines

{"return":

    {"version": "1.0", "supported_commands": 
        [{"enabled": true, "name": "guest-network-get-interfaces"}, 

Thanks, that's mostly what I wanted. Still missing is the ability to tell if a command is expected to return a value on success, though.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org