On Mon, Aug 29, 2016 at 08:24:43PM +0800, Baochuan Wu wrote:
Hello everyone,
I am using libguestfs on CentOS 7.2. I am trying to modify Red Hat 5.4 disks. I am using C/C++. I found the process gets stuck inside guestfs_launch:
Thread 1 (Thread 0x7fe3aa6148c0 (LWP 1265)): #0 0x00007fe3a9032c20 in __poll_nocancel () from /lib64/libc.so.6 #1 0x00007fe3aa1e5ea4 in read_data () from /lib64/libguestfs.so.0 #2 0x00007fe3aa20af0c in guestfs_int_recv_from_daemon () from /lib64/libguestfs.so.0 #3 0x00007fe3aa204ae0 in launch_libvirt () from /lib64/libguestfs.so.0 #4 0x00007fe3aa1fab2b in guestfs_impl_launch () from /lib64/libguestfs.so.0 #5 0x00007fe3aa196b4d in guestfs_launch () from /lib64/libguestfs.so.0 #6 0x00000000004116f8 in main ()
Before you call guestfs_launch(), call: guestfs_set_verbose (1); guestfs_set_trace (1); That should print (on stderr) a lot more information about what is going on. (http://libguestfs.org/guestfs-faq.1.html#how-do-i-debug-when-using-the-api) If printing on stderr is not convenient from your program, then you can also set up logging. See the example here: https://github.com/libguestfs/libguestfs/blob/master/examples/debug-logging.... The libguestfs-test-tool output looks fine BTW. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v