Re: [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/6ca8a2db6d6f1028a35ece616af445... 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
I want to install libguestfs in Centos 5 Kernel version 2.6.18.8-xen. For this, I have sucessfully installed ocaml-3.12.1, findlib-1.2.7. Now when I am trying to install febootstrap-3.13 (another prereq for libguestfs), I am getting the following error during 'make'. [root@M febootstrap-3.13]# make make all-recursive make[1]: Entering directory `/home/pf/febootstrap-3.13' Making all in lib make[2]: Entering directory `/home/pf/febootstrap-3.13/lib' make all-recursive make[3]: Entering directory `/home/pf/febootstrap-3.13/lib' make[4]: Entering directory `/home/pf/febootstrap-3.13/lib' make[4]: Nothing to be done for `all-am'. make[4]: Leaving directory `/home/pf/febootstrap-3.13/lib' make[3]: Leaving directory `/home/pf/febootstrap-3.13/lib' make[2]: Leaving directory `/home/pf/febootstrap-3.13/lib' Making all in src make[2]: Entering directory `/home/pf/febootstrap-3.13/src' ocamlfind ocamlopt -warn-error CDEFLMPSUVXYZ -package unix,str -c febootstrap_cmdline.ml -o febootstrap_cmdline.cmx File "febootstrap_cmdline.ml", line 1, characters 0-1: Error: Could not find the .cmi file for interface febootstrap_cmdline.mli. make[2]: *** [febootstrap_cmdline.cmx] Error 2 make[2]: Leaving directory `/home/pf/febootstrap-3.13/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/pf/febootstrap-3.13' make: *** [all] Error 2 Does anyone have idea to fix it. --Irfan
On Fri, Feb 10, 2012 at 09:51:17AM -0800, Irfan Ahmed wrote:
I want to install libguestfs in Centos 5 Kernel version 2.6.18.8-xen. For this, I have sucessfully installed ocaml-3.12.1, findlib-1.2.7. Now when I am trying to install febootstrap-3.13 (another prereq for libguestfs), I am getting the following error during 'make'.
It's essentially very difficult to compile libguestfs for RHEL 5. We stopped supporting it some time ago, except for the old version of libguestfs that ships in RHEL 5 (1.2.something, about 2 years old). I'm not even sure what "2.6.18.8-xen" is. I don't think it's a kernel that Red Hat ship, and so it's not likely that it contains the bits required to run recent libguestfs (virtio-serial etc.). I would use RHEL 6 instead, which is supported and for which we even build packages for you: http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/ If you can't do that, then you can look here and try to make more recent versions of these: http://libguestfs.org/download/binaries/rhel5-packages/ but as I said above, this is going to be extremely hard work. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
participants (2)
-
Irfan Ahmed -
Richard W.M. Jones