qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Not able to run "virsh qemu-agent-command" when socat is working
@ 2014-07-02  7:13 Puneet Bakshi
  2014-07-02 16:39 ` [Qemu-devel] [libvirt] " Eric Blake
  0 siblings, 1 reply; 3+ messages in thread
From: Puneet Bakshi @ 2014-07-02  7:13 UTC (permalink / raw)
  To: libvir-list, qemu-devel, qemu-discuss

[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]

Hi,

I am running qemu guest agent in Windows 2k8. I am able to execute
"qemu-agent-commands" using socat but not through "virsh
qemu-agent-command".


*Guest VM xml*

    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
    </controller>

    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/g06.agent'/>
      <target type='virtio' name='org.qemu.guest_agent.1'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>


*Guest win2k8 is running following command*

    C:\qemu-ga> qemu-ga.exe -t c:\qemu-ga -p
\\.Global\org.qemu.guest_agent.1


*Host CentOS system*

socat returns response appropriately.
    [root@sdsr720-14 ~]# echo "{'execute':'guest-ping'}" | socat
stdio,ignoreeof /var/lib/libvirt/qemu/g06.agent
    {"return": {}}

*"virsh qemu-agent-command" returns blank.*

    [root@sdsr720-14 ~]# virsh qemu-agent-command vm_win_06 '{ "execute":
"guest_ping"}'

    [root@sdsr720-14 ~]#


Why "virsh qemu-agent-command" is not working? Am I doing something wrong
here?

Regards,
~Puneet

[-- Attachment #2: Type: text/html, Size: 2746 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [libvirt] Not able to run "virsh qemu-agent-command" when socat is working
  2014-07-02  7:13 [Qemu-devel] Not able to run "virsh qemu-agent-command" when socat is working Puneet Bakshi
@ 2014-07-02 16:39 ` Eric Blake
  2014-07-05 17:53   ` Puneet Bakshi
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Blake @ 2014-07-02 16:39 UTC (permalink / raw)
  To: Puneet Bakshi, libvir-list, qemu-devel, qemu-discuss

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

On 07/02/2014 01:13 AM, Puneet Bakshi wrote:
> Hi,
> 
> I am running qemu guest agent in Windows 2k8. I am able to execute
> "qemu-agent-commands" using socat but not through "virsh
> qemu-agent-command".
> 

> *Host CentOS system*
> 
> socat returns response appropriately.
>     [root@sdsr720-14 ~]# echo "{'execute':'guest-ping'}" | socat
> stdio,ignoreeof /var/lib/libvirt/qemu/g06.agent
>     {"return": {}}

Note your spelling...

> 
> *"virsh qemu-agent-command" returns blank.*
> 
>     [root@sdsr720-14 ~]# virsh qemu-agent-command vm_win_06 '{ "execute":
> "guest_ping"}'

and compare it to here.  There is no guest_ping command, only
guest-ping.  It's a bug in libvirt that guest-agent-command doesn't
output a useful error message when attempting to run a non-existing
command, but you'll never hit that bug if you pass valid commands to the
agent in the first place.

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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [libvirt] Not able to run "virsh qemu-agent-command" when socat is working
  2014-07-02 16:39 ` [Qemu-devel] [libvirt] " Eric Blake
@ 2014-07-05 17:53   ` Puneet Bakshi
  0 siblings, 0 replies; 3+ messages in thread
From: Puneet Bakshi @ 2014-07-05 17:53 UTC (permalink / raw)
  To: Eric Blake; +Cc: libvir-list, qemu-devel, qemu-discuss

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

Sorry, that was a typo. But, it is still not working. (For some reason, I
had to move to Windows2012 with name vm_win_05).

[root@sdsr720-14 virtio-win]# echo "{'execute':'guest-ping'}" | socat
stdio,ignoreeof /var/lib/libvirt/qemu/g05.agent
{"return": {}}

[root@sdsr720-14 virtio-win]# virsh qemu-agent-command vm_win_05 '{
"execute":"guest-ping"}'

[root@sdsr720-14 virtio-win]#

Regards,
~Puneet


On Wed, Jul 2, 2014 at 10:09 PM, Eric Blake <eblake@redhat.com> wrote:

> On 07/02/2014 01:13 AM, Puneet Bakshi wrote:
> > Hi,
> >
> > I am running qemu guest agent in Windows 2k8. I am able to execute
> > "qemu-agent-commands" using socat but not through "virsh
> > qemu-agent-command".
> >
>
> > *Host CentOS system*
> >
> > socat returns response appropriately.
> >     [root@sdsr720-14 ~]# echo "{'execute':'guest-ping'}" | socat
> > stdio,ignoreeof /var/lib/libvirt/qemu/g06.agent
> >     {"return": {}}
>
> Note your spelling...
>
> >
> > *"virsh qemu-agent-command" returns blank.*
> >
> >     [root@sdsr720-14 ~]# virsh qemu-agent-command vm_win_06 '{
> "execute":
> > "guest_ping"}'
>
> and compare it to here.  There is no guest_ping command, only
> guest-ping.  It's a bug in libvirt that guest-agent-command doesn't
> output a useful error message when attempting to run a non-existing
> command, but you'll never hit that bug if you pass valid commands to the
> agent in the first place.
>
> --
> Eric Blake   eblake redhat com    +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
>

[-- Attachment #2: Type: text/html, Size: 2635 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-07-05 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-02  7:13 [Qemu-devel] Not able to run "virsh qemu-agent-command" when socat is working Puneet Bakshi
2014-07-02 16:39 ` [Qemu-devel] [libvirt] " Eric Blake
2014-07-05 17:53   ` Puneet Bakshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).