Hi Richard, I am a user of LibguestFS. I have a problem in using LibguestFS to get the OS type of the virtual machine with Xenserver virtual environment. But when I use the command in Linux likes the figure1. I know that this disk file could add in libguestfish. My code is in the figure2. I can't get the OS info from GuestFs. Could you give me some suggests? James --------------------------------------------------------------------------------------------------- Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful.If you have received this communication in error,please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. --------------------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/libguestfs/attachments/20121121/db7f9bbf/attachment.htm> -------------- next part -------------- A non-text attachment was scrubbed... Name: 1.png Type: application/octet-stream Size: 9223 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20121121/db7f9bbf/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 2.png Type: application/octet-stream Size: 40885 bytes Desc: not available URL: <http://listman.redhat.com/archives/libguestfs/attachments/20121121/db7f9bbf/attachment-0001.obj>
On Wed, Nov 21, 2012 at 06:59:52PM +0800, ?? wrote:> Hi Richard, > I am a user of LibguestFS. > > I have a problem in using LibguestFS to get the OS type of the > virtual machine with Xenserver virtual environment. > > But when I use the command in Linux likes the figure1. I know that > this disk file could add in libguestfish.It looks OK, except that guestfish is printing a UTF-8 progress bar which your terminal doesn't understand. guestfish uses the following test to decide whether or not it can output a UTF-8 progress bar: bar->utf8_mode = STREQ (nl_langinfo (CODESET), "UTF-8"); You can use 'guestfish --no-progress-bars' to disable progress bars.> My code is in the figure2. I can't get the OS info from GuestFs.The code looks OK.> Could you give me some suggests?It seems you might be using a vhd-format disk image. It seems most likely that qemu is having some problems decoding this format. After adding the disk (in guestfish) and using 'run', do general commands like 'list-filesystems' or 'list-partitions' work? If you add '-v' option, does qemu give any error messages? If you convert the image to raw format, does it then work? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#) http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora