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:
Please can you run: libguestfs-test-tool and attach the complete, unedited output to this bug.
Created attachment 573784 [details] Output from libguestfs-test-tool
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/
(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.
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?
[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
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.
(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?
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.
(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.
*** Bug 786604 has been marked as a duplicate of this bug. ***
Any chance this will be fixed? Like backporting virtio-serial to RHEL 5 kvm?
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.
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
Sure. Thanks Richard.
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.
http://koji.fedoraproject.org/koji/buildinfo?buildID=327975
This is awesome. Thanks for all the hard work! I will test this package this weekend.
Tested the package, sudo yum install libguestfs.x86_64 python-libguestfs --enablerepo=epel-testing It works fine.
Closing based on comment 20.