Re: [Libguestfs] [EXTERNAL] - Re: LIBGUESTFS mount disk failure
Thanks for providing the libguestfs-test-tool output in a previous message. > While: guestfs_lanch error: > libguestfs: trace: set_verbose true > libguestfs: trace: set_verbose = 0 > libguestfs: trace: set_backend "direct" > libguestfs: trace: set_backend = 0 Here you're setting backend = "direct", and while that isn't necessarily a problem in itself, the libguestfs-test-tool output that you provided was for the (normal, for RHEL) libvirt backend. This could make a difference, so what's the output of: $ LIBGUESTFS_BACKEND=direct libguestfs-test-tool ? By the way, unless you have a specific reason to set 'LIBGUESTFS_BACKEND=direct' that you can articulate, it is best not to set this as it is less secure and less well tested. If you just copied that environment variable from somewhere without understanding why, then don't do that. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] [EXTERNAL] - Re: LIBGUESTFS mount disk failure
Hi, can you run: libguestfs-test-tool and send us the complete output. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] [EXTERNAL] - Re: LIBGUESTFS mount disk failure
@Raja Ram Sharma Can you please help here with the details requested by Rich. To answer this question Is this happening in a program you wrote? Yes, we had written our code to use libguestfs API in c++. We can have a short call and discuss with you or team, could you please help with the timings next week Monday or Tuesday. Thanks Teja Konapalli -Original Message- From: Richard W.M. Jones Sent: Saturday, September 16, 2023 9:39 PM To: Teja Konapalli Cc: libguestfs@redhat.com; Raja Ram Sharma ; Divyanshu Kumar Subject: [EXTERNAL] - Re: LIBGUESTFS mount disk failure CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. If you feel that the email is suspicious, please report it using PhishAlarm. On Sat, Sep 16, 2023 at 03:56:07PM +, Teja Konapalli wrote: > Hi Richard & Team, > > > > Could you please help here on the below failure of mounting disk using > libguestfs. > > > > OS version: RHEL 8.2 > > Libguestfs version: 1.38.0 stable > > > > > > Error logs: > > > > libguestfs: trace: add_drive_ro "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > libguestfs: trace: add_drive "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > "readonly:true" > libguestfs: creating COW overlay to protect original drive content > libguestfs: trace: disk_create "/tmp/libguestfsCpl8My/overlay3.qcow2" "qcow2" > -1 "backingfile:/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > libguestfs: command: run: qemu-img > libguestfs: command: run: \ create > libguestfs: command: run: \ -f qcow2 > libguestfs: command: run: \ -o backing_file=/var/opt/tmp/GRE//RAJA/ > RAJAT-flat.vmdk > libguestfs: command: run: \ /tmp/libguestfsCpl8My/overlay3.qcow2 > Formatting '/tmp/libguestfsCpl8My/overlay3.qcow2', fmt=qcow2 > size=21474836480 backing_file=/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk > cluster_size=65536 lazy_refcounts=off refcount_bits=16 > libguestfs: trace: disk_create = -1 (error) ^^ There should be an error message between this two lines. Without seeing what the error is, it's hard to know what the problem is. Is this happening in a program you wrote? If so you probably want to read the bit about how to handle error messages: https://urldefense.com/v3/__https://libguestfs.org/guestfs.3.html*error-handling__;Iw!!Obbck6kTJA!a2FcI3CQ6qa1neQWz3uUdjBa4wFqY7ucZ6acLCMnK_P1JEntcQxfaY-P2KOkpYWBt4wXOD0RBiF0T-D7hw$ Rich. > libguestfs: trace: add_drive = -1 (error) > libguestfs: trace: add_drive_ro = -1 (error) > libguestfs: trace: close > libguestfs: closing guestfs handle 0x1e89340 (state 0) > libguestfs: command: run: rm > libguestfs: command: run: \ -rf /tmp/libguestfsCpl8My > -- Richard Jones, Virtualization Group, Red Hat https://urldefense.com/v3/__http://people.redhat.com/*rjones__;fg!!Obbck6kTJA!a2FcI3CQ6qa1neQWz3uUdjBa4wFqY7ucZ6acLCMnK_P1JEntcQxfaY-P2KOkpYWBt4wXOD0RBiH8yx7oyA$ Read my programming and virtualization blog: https://urldefense.com/v3/__http://rwmj.wordpress.com__;!!Obbck6kTJA!a2FcI3CQ6qa1neQWz3uUdjBa4wFqY7ucZ6acLCMnK_P1JEntcQxfaY-P2KOkpYWBt4wXOD0RBiEeYKbusQ$ virt-builder quickly builds VMs from scratch https://urldefense.com/v3/__http://libguestfs.org/virt-builder.1.html__;!!Obbck6kTJA!a2FcI3CQ6qa1neQWz3uUdjBa4wFqY7ucZ6acLCMnK_P1JEntcQxfaY-P2KOkpYWBt4wXOD0RBiGXgRfjPQ$ ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
Re: [Libguestfs] LIBGUESTFS mount disk failure
On Sat, Sep 16, 2023 at 03:56:07PM +, Teja Konapalli wrote: > Hi Richard & Team, > > > > Could you please help here on the below failure of mounting disk using > libguestfs. > > > > OS version: RHEL 8.2 > > Libguestfs version: 1.38.0 stable > > > > > > Error logs: > > > > libguestfs: trace: add_drive_ro "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > libguestfs: trace: add_drive "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > "readonly:true" > libguestfs: creating COW overlay to protect original drive content > libguestfs: trace: disk_create "/tmp/libguestfsCpl8My/overlay3.qcow2" "qcow2" > -1 "backingfile:/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" > libguestfs: command: run: qemu-img > libguestfs: command: run: \ create > libguestfs: command: run: \ -f qcow2 > libguestfs: command: run: \ -o backing_file=/var/opt/tmp/GRE//RAJA/ > RAJAT-flat.vmdk > libguestfs: command: run: \ /tmp/libguestfsCpl8My/overlay3.qcow2 > Formatting '/tmp/libguestfsCpl8My/overlay3.qcow2', fmt=qcow2 size=21474836480 > backing_file=/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk cluster_size=65536 > lazy_refcounts=off refcount_bits=16 > libguestfs: trace: disk_create = -1 (error) ^^ There should be an error message between this two lines. Without seeing what the error is, it's hard to know what the problem is. Is this happening in a program you wrote? If so you probably want to read the bit about how to handle error messages: https://libguestfs.org/guestfs.3.html#error-handling Rich. > libguestfs: trace: add_drive = -1 (error) > libguestfs: trace: add_drive_ro = -1 (error) > libguestfs: trace: close > libguestfs: closing guestfs handle 0x1e89340 (state 0) > libguestfs: command: run: rm > libguestfs: command: run: \ -rf /tmp/libguestfsCpl8My > -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs
[Libguestfs] LIBGUESTFS mount disk failure
Hi Richard & Team, Could you please help here on the below failure of mounting disk using libguestfs. OS version: RHEL 8.2 Libguestfs version: 1.38.0 stable Error logs: libguestfs: trace: add_drive_ro "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" libguestfs: trace: add_drive "/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" "readonly:true" libguestfs: creating COW overlay to protect original drive content libguestfs: trace: disk_create "/tmp/libguestfsCpl8My/overlay3.qcow2" "qcow2" -1 "backingfile:/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk" libguestfs: command: run: qemu-img libguestfs: command: run: \ create libguestfs: command: run: \ -f qcow2 libguestfs: command: run: \ -o backing_file=/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk libguestfs: command: run: \ /tmp/libguestfsCpl8My/overlay3.qcow2 Formatting '/tmp/libguestfsCpl8My/overlay3.qcow2', fmt=qcow2 size=21474836480 backing_file=/var/opt/tmp/GRE//RAJA/RAJAT-flat.vmdk cluster_size=65536 lazy_refcounts=off refcount_bits=16 libguestfs: trace: disk_create = -1 (error) libguestfs: trace: add_drive = -1 (error) libguestfs: trace: add_drive_ro = -1 (error) libguestfs: trace: close libguestfs: closing guestfs handle 0x1e89340 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsCpl8My ___ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs