Re: QemuAgentCommand API documents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22.08.2013 12:17, Praveen Kumar wrote:
> 
> 
> ----- Original Message -----
>> From: "Michal Privoznik" <mprivozn@xxxxxxxxxx>
>> To: "Praveen Kumar" <prkumar@xxxxxxxxxx>
>> Cc: libvirt-users@xxxxxxxxxx
>> Sent: Thursday, August 22, 2013 1:15:54 PM
>> Subject: Re:  QemuAgentCommand API documents
>>
>> The API you're looking for is the one you've found:
>> virDomainQemuAgentCommand. As the second argument it accepts qemu guest
>> agent commands described in [3]. I'd also recommend reading [4].
> 
> Thanks for command reference, I am able to figure out that along with libvirt, 
> libvirt_qemu also need to import because it will contain QmenuAgentCommand() function
> definition, but now I am confuse about the parameters. 
> 
> As per definition : def qemuAgentCommand(domain, cmd, timeout, flags), I passed below parameteres:
> domain : A active virDomain object
> command : 'guest-info'
> timeout : 10
> flags : 0

You need to wrap the command into JSON envelope:

command: '{"execute": "guest-info"}'

just exactly as you need to do for virsh:

virsh qemu-agent-command $dom '{"execute":"guest-info"}'

Michal

_______________________________________________
libvirt-users mailing list
libvirt-users@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvirt-users




[Index of Archives]     [Virt Tools]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux