Hi Richard,
Thank you for the reply, I hope this mail finds you well.
We resolved guestfs_add_drive failure, now guestfs_add_drive is adding disk successfully
after adding "format:raw".
But guestfs_launch is failing Kindly help me to troubleshoot or to find any workaround.
Error_callback is in-place, it return guestfs_last_error()
guestfs_last_error():
[ 2023-09-16 17:24:20 ] errno: ( 10 ) : command: waitpid: No child processes
[ 2023-09-16 17:24:20 ] errno: ( 10 ) : command: waitpid: No child processes
While: guestfs_lanch error:
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_backend "direct"
libguestfs: trace: set_backend = 0
libguestfs: create: flags = 0, handle = 0xbb0a70, program = greagent.exe
libguestfs: trace: add_drive
"/var/opt/omni/tmp/GRE/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/2023/09/16-3/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/Datastore2-9166/RAJATEST/RAJATEST_1-flat.vmdk"
"format:raw"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive
"/var/opt/omni/tmp/GRE/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/2023/09/16-3/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/Datastore2-9166/RAJATEST/RAJATEST_2-flat.vmdk"
"format:raw"
libguestfs: trace: add_drive = 0
libguestfs: trace: add_drive
"/var/opt/omni/tmp/GRE/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/2023/09/16-3/5029f5c4-e08d-23e1-07d3-96c5c7ffeeac/Datastore2-9166/RAJATEST/RAJATEST-flat.vmdk"
"format:raw"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: max_disks
libguestfs: trace: max_disks = 255
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: version
libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 38, release:
4, extra: rhel=8,release=15.module+el8.2.0+5297+222a20af,libvirt, >
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=greagent.exe
libguestfs: launch: version=1.38.4rhel=8,release=15.module+el8.2.0+5297+222a20af,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsMzD9Rl
libguestfs: launch: umask=0002
libguestfs: launch: euid=0
libguestfs: is_openable: /dev/kvm: No such file or directory
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: begin building supermin appliance
libguestfs: run supermin
libguestfs: command: run: /usr/bin/supermin
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.19
supermin: rpm: detected RPM version 4.14
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: if-newer: output does not need rebuilding
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0xbb0a70 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsMzD9Rl
Thanks
RR
-----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!cv1K...
virt-builder quickly builds VMs from scratch
https://urldefense.com/v3/__http://libguestfs.org/virt-builder.1.html__;!...