Re: qemu-monitor-command

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

 



Thanks guys.  I will check out the virDomainMemoryPeek api.  I am still
curious though as to how to get the monitor command to work.  I am running
it on the same physical host as the vm so it is not remote.  What would be
an example of a path that one of you has gotten to work?  I have tried many
path forms and get the same Could not open ... error message.

Thanks,
Shawn

-----Original Message-----
From: Eric Blake [mailto:eblake@xxxxxxxxxx] 
Sent: Tuesday, March 20, 2012 10:09 AM
To: Shawn Davis
Cc: libvirt-users@xxxxxxxxxx
Subject: Re: qemu-monitor-command

On 03/20/2012 07:30 AM, Shawn Davis wrote:
> Hello Everyone,
> 
> I am working on a grad school project for virtual introspection.  I 
> have a vm running (with 512mb of memory) and want to access the 
> pmemsave function through virsh with the qemu-monitor-command.

Why?  I would just access it through the public API virDomainMemoryPeek
instead, then you don't have to worry about the nuances.  Alas,
virDomainMemoryPeek has not yet been wired into virsh (patches welcome!), so
you'll have to access it through a custom C program, or through one of the
other language bindings such as python or perl.


> virsh qemu-monitor-command --hmp Shawn 'pmemsave 0 536870912 image.dump'
> 
> Shawn is the name of my vm and image.dump is the name of my output 
> file.  No matter what I do, I keep getting: Could not open 'image.dump'

That's because when you do raw pass-through like this, you are asking qemu
to open the relative pathname 'image.dump', relative to the current working
directory of qemu, which isn't necessarily the current working directory of
your virsh process.  Furthermore, if you are accessing a remote connection
(such as -c qemu+ssh://remote/system), the file name is relative to the
remote system, but you probably want the file to appear on the machine where
you are running virsh.  Finally, if SELinux is in effect, you have to ensure
that qemu has proper permissions, including SELinux label, to open() the
file; this is something that libvirt can do for you via the
virDomainMemoryPeek API, but if you go through qemu-monitor-command, you are
on your own.

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



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

  Powered by Linux