[libvirt-users] qemu-monitor-command

Shawn Davis sdavis17 at hawk.iit.edu
Wed Mar 21 14:49:24 UTC 2012


Hi Michal, 

Thanks for testing that for me.

When I try to run the latter command which was:

virsh qemu-monitor-command Shawn '{"execute":"pmemsave", "arguments":
{"val":0, "size":536870912, "filename":"/tmp/testimage.dump"}}'

I get:

Unknown command: '{\"execute\":\"pmemsave\",'

Any ideas?

My versions are:

Compiled against library: libvir 0.9.2
Using library: libvir 0.9.2
Using API: QEMU 0.9.2
Running hypervisor: QEMU 0.14.1



-----Original Message-----
From: Michal Privoznik [mailto:mprivozn at redhat.com] 
Sent: Wednesday, March 21, 2012 3:21 AM
To: Shawn Davis
Cc: libvirt-users at redhat.com
Subject: Re: [libvirt-users] qemu-monitor-command

On 21.03.2012 04:43, Shawn Davis wrote:
> I understood what was said by the way about the permissions.  I 
> temporarily switched off SElinux.  I think I just may not be entering 
> the command correctly.  If I put home/testa/image.dump I get Could not
open 'image.dump'
> If I put /home/testa/image.dump I get Invalid char in expression from 
> the first slash.  Can someone who has gotten this to work please tell 
> me how they typed out the entire command in full detail?  I don't 
> really care where it saves it, I just need the dump of the memory.
> 

If qemu is running under non-root user I wouldn't expect it to be able to
access $HOME.
> I have tried this with various forms of the path:
> 
> sudo virsh qemu-monitor-command --hmp Shawn 'pmemsave 0 536870912 
> image.dump'

Although I must admit this doesn't play nice. I can get two different
results:

virsh # qemu-monitor-command --hmp f16 "pmemsave 0 1024 /tmp/dummy.img"
invalid char in expression

virsh # qemu-monitor-command f16 '{"execute":"pmemsave", "arguments":
{"val":0, "size":1024, "filename":"/tmp/dummy.img"}}'
{"return":{},"id":"libvirt-12"}

In the latter case image is successfully created. But I am not sure whose
bug is it - libvirt or qemu.

Michal




More information about the libvirt-users mailing list