On Thu, Feb 09, 2012 at 03:17:22PM -0800, Irfan Ahmed wrote:
I am using Xen and want to access the page file contents of windows
XP SP2 virtual machine from dom0. Is it possible to read the page
file of live Windows XP virtual machine using libguestfs. I have a C
program and want to extend its functionality using
libguestfs. Please help me how this can be done.
Yes; this can be done by reading the file through libguestfs, which is
what 'virt-cat' (a C program) does.
I would suggest you start with these two examples:
http://libguestfs.org/guestfs-examples.3.html
https://github.com/libguestfs/libguestfs/blob/6ca8a2db6d6f1028a35ece616af...
If you need to locate the page file (ie. it's not in a default
location) then you will have to read that from the registry, which
libguestfs can also do.
If the guest is live you won't simply be able to keep a handle open
and re-read the file. You might need to map the file to disk blocks
and read them directly. (This is a bit more experimental)
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top