[libvirt-users] qemu-monitor-command

Michal Privoznik mprivozn at redhat.com
Wed Mar 21 08:20:57 UTC 2012


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