@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 <rjones(a)redhat.com>
Sent: Saturday, September 16, 2023 9:39 PM
To: Teja Konapalli <tkonapalli(a)opentext.com>
Cc: libguestfs(a)redhat.com; Raja Ram Sharma <rsharma6(a)opentext.com>; Divyanshu Kumar
<dkumar3(a)opentext.com>
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 +0000, 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-h...
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!!Obbck6...
Read my programming and virtualization blog:
https://urldefense.com/v3/__http://rwmj.wordpress.com__;!!Obbck6kTJA!a2Fc...
virt-builder quickly builds VMs from scratch
https://urldefense.com/v3/__http://libguestfs.org/virt-builder.1.html__;!...