Irfan Ahmed
2012-Feb-09 23:26 UTC
[Libguestfs] want to access the page file of VM from host on Xen platform using libguestfs
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. Any idea how this can be done using libguestfs. --Irfan -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20120209/bebeae8c/attachment.htm>
Richard W.M. Jones
2012-Feb-10 08:46 UTC
[Libguestfs] want to access the page file of VM from host on Xen platform using libguestfs
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/6ca8a2db6d6f1028a35ece616af44538074483fc/cat/virt-cat.c#L273 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