Bug 808193 - g.launch() crashes on RHEL 5
g.launch() crashes on RHEL 5
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libguestfs (Show other bugs)
5.8
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
:
: 786604 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-29 15:09 EDT by Arun S A G
Modified: 2013-03-07 07:26 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-07 07:26:38 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output from libguestfs-test-tool (18.22 KB, text/plain)
2012-03-29 16:22 EDT, Arun S A G
no flags Details

  None (edit)
Description Arun S A G 2012-03-29 15:09:10 EDT
Description of problem:

Cannot open disk images, with libguestfs. 

[saga@gnubox-dr]$ sudo ./kvm-ok 
[sudo] password for saga: 
INFO: /dev/kvm exists
KVM acceleration can be used

[saga@gnubox-dr]$ file /var/cache/vm/vdisk/saga49-201203291426.qcow2
/var/cache/vm/vdisk/saga49-201203291426.qcow2: x86 boot sector; partition 1: ID=0x83, active, starthead 1, startsector 63, 530082 sectors; partition 2: ID=0x83, starthead 0, startsector 530145, 16241715 sectors, code offset 0x48



Version-Release number of selected component (if applicable):
[saga@gnubox-dr]$ rpm -q libvirt
libvirt-0.8.2-25.el5
[saga@gnubox-dr]$ rpm -q qemu
qemu-0.10.5-1.el5.2


How reproducible:
Always


Steps to Reproduce:
1. Python interpreter (sudo python)

2. Run the following commands 
import guestfs
g = guestfs.GuestFS() 
g.add_drive("/var/cache/vm/vdisk/saga49-201203291426.qcow2")
g.launch()

  
Actual results:
Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/var/cache/<ipython console> 

/usr/lib/python2.4/site-packages/guestfs.pyc in launch(self)
    149         adding drives) but before performing any actions.
    150         """
--> 151         return libguestfsmod.launch (self._o)
    152 
    153     def wait_ready (self):

RuntimeError: child process died unexpectedly

Expected results:
g.launch() works without crash

Additional info:
Comment 1 Richard W.M. Jones 2012-03-29 15:34:23 EDT
Please can you run:

libguestfs-test-tool

and attach the complete, unedited output to this bug.
Comment 2 Arun S A G 2012-03-29 16:22:11 EDT
Created attachment 573784 [details]
Output from libguestfs-test-tool
Comment 3 Richard W.M. Jones 2012-03-29 17:04:21 EDT
What version of libguestfs, and where did you get it from?

The error is:

guestfsd: error while loading shared libraries: libxml2.so.2: cannot open shared object file: No such file or directory

This shouldn't happen.  Have you updated any packages with
ones that aren't in RHEL 6, or removed any files by hand?

You could also try the RHEL 6.3 preview packages here:

http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/
Comment 4 Richard W.M. Jones 2012-03-29 17:04:50 EDT
(In reply to comment #3)
> What version of libguestfs, and where did you get it from?
> 
> The error is:
> 
> guestfsd: error while loading shared libraries: libxml2.so.2: cannot open
> shared object file: No such file or directory
> 
> This shouldn't happen.  Have you updated any packages with
> ones that aren't in RHEL 6, or removed any files by hand?
> 
> You could also try the RHEL 6.3 preview packages here:
> 
> http://people.redhat.com/~rjones/libguestfs-RHEL-6.3-preview/

Right, sorry, RHEL _5_, ignore all that.
Comment 5 Richard W.M. Jones 2012-03-29 17:05:39 EDT
If this is the EPEL package, the problem is that it needs
rebuilding.  What version of libguestfs are you trying and
where is it from?
Comment 6 Arun S A G 2012-03-30 00:15:18 EDT
[saga@gnubox-dr]$ rpm  -qfi /usr/bin/libguestfs-test-tool 
Name        : libguestfs                   Relocations: (not relocatable)
Version     : 1.2.14                            Vendor: Fedora Project
Release     : 7.el5                         Build Date: Tue 25 Oct 2011 12:19:34 AM IST
Install Date: Tue 27 Mar 2012 06:11:57 PM IST      Build Host: x86-02.phx2.fedoraproject.org
Group       : Development/Libraries         Source RPM: libguestfs-1.2.14-7.el5.src.rpm
Size        : 4993847                          License: LGPLv2+
Signature   : DSA/SHA1, Thu 27 Oct 2011 08:36:55 PM IST, Key ID 119cc036217521f6
Packager    : Fedora Project
URL         : http://libguestfs.org/
Summary     : Access and modify virtual machine disk images
Description :


Looks like it is from EPEL
Comment 7 Richard W.M. Jones 2012-03-30 04:04:56 EDT
Looks like Augeas has been updated to 0.10 in EPEL 5.
This new version requires libxml2, and the (ancient)
version of libguestfs doesn't know this.

Really EPEL 5 should be using a new version of libguestfs,
not an ancient one with known security issues.
Comment 8 Arun S A G 2012-03-30 05:49:44 EDT
(In reply to comment #7)
> Looks like Augeas has been updated to 0.10 in EPEL 5.
> This new version requires libxml2, and the (ancient)
> version of libguestfs doesn't know this.
> 
> Really EPEL 5 should be using a new version of libguestfs,
> not an ancient one with known security issues.

Will there be an update available?
Comment 9 Richard W.M. Jones 2012-03-30 06:42:25 EDT
Unfortunately this is much more complicated than
you think.  RHEL 5 doesn't have support for virtio-serial
which is required for modern libguestfs.

It's going to be simpler if you can update to RHEL 6
where we have proper, modern, fully supported libguestfs
and virt tools packages.
Comment 10 Arun S A G 2012-03-31 01:42:15 EDT
(In reply to comment #9)
> Unfortunately this is much more complicated than
> you think.  RHEL 5 doesn't have support for virtio-serial
> which is required for modern libguestfs.
> 
> It's going to be simpler if you can update to RHEL 6
> where we have proper, modern, fully supported libguestfs
> and virt tools packages.

We have both RHEL 5 and RHEL 6 boxes, I am trying to make my app that uses libguestfs to work on RHEL 5. Lot of our production machines are RHEL 5, unfortunately people will take their own time to move to RHEL 6.
Comment 11 Richard W.M. Jones 2012-04-01 15:43:16 EDT
*** Bug 786604 has been marked as a duplicate of this bug. ***
Comment 12 Arun S A G 2012-06-15 01:44:07 EDT
Any chance this will be fixed? Like backporting virtio-serial to RHEL 5 kvm?
Comment 13 Richard W.M. Jones 2012-06-15 03:36:30 EDT
No, there is zero chance that virtio-serial will be backported
to RHEL 5.  In fact since CVE-2012-2690 came up we have considered
blocking the EPEL 5 libguestfs package entirely.
Comment 15 Richard W.M. Jones 2012-06-25 13:02:43 EDT
If you want to follow progress on this bug, please watch:

libguestfs in EPEL 5 repository:
http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=shortlog;h=refs/heads/el5

libguestfs builds (only ones matching *.el5):
http://koji.fedoraproject.org/koji/packageinfo?packageID=8391

Upstream branch:
https://github.com/libguestfs/libguestfs/commits/oldlinux
Comment 16 Arun S A G 2012-06-26 02:55:58 EDT
Sure. Thanks Richard.
Comment 17 Richard W.M. Jones 2012-06-27 17:49:04 EDT
I have done a libguestfs build for EPEL 5.  This is modern libguestfs,
along the development branch (1.19.13) but it should be fully backwards
compatible with the old libguestfs.

Please read the release notes!  This is very important:

http://pkgs.fedoraproject.org/gitweb/?p=libguestfs.git;a=blob;f=README.EPEL-5;hb=refs/heads/el5

To give you an idea of the amount of work done (it took about
2 weeks in all), there are 20 EPEL-specific patches, and around
20 more patches upstream.  The system by which the library and
the appliance communicate was completely rewritten to avoid
virtio-serial, and many other changes were made and bugs fixed.
Comment 18 Richard W.M. Jones 2012-06-27 17:54:52 EDT
http://koji.fedoraproject.org/koji/buildinfo?buildID=327975
Comment 19 Arun S A G 2012-06-28 04:32:48 EDT
This is awesome. Thanks for all the hard work! I will test this package this weekend.
Comment 20 Arun S A G 2012-07-05 05:23:46 EDT
Tested the package,

sudo yum install libguestfs.x86_64 python-libguestfs --enablerepo=epel-testing

It works fine.
Comment 21 Richard W.M. Jones 2013-03-07 07:26:38 EST
Closing based on comment 20.

Note You need to log in before you can comment on or make changes to this bug.