Tag Archives: rhel

libguestfs on RHEL 5

I’ve spent the past couple of weeks [sic] getting a modern libguestfs into RHEL 5. RHEL 5 was first released in March 2007 and is thus over 5 years old.

It’s hard work.

Firstly RHEL 5 lacks virtio-serial, which is the mechanism used by the library to talk to the appliance. We used to use a TCP connection, but we gave that up since it’s slow, awkward and possibly insecure. To get RHEL 5 going again, I had to forward port the old TCP code into a modern branch of libguestfs.

Secondly RHEL 5 lacks a lot of features that libguestfs presents through the API. I got most of them working by carefully fixing and rewriting code, but some of them are impossible to do (eg. btrfs support).

Altogether I wrote about 30 patches, with about half going upstream, and the other half sitting in an “old Linux”-only side branch.

The release notes are attached below, and the packages should be available in EPEL 5 in a few days.

libguestfs for EPEL 5
by Richard W.M. Jones

This package contains modern libguestfs for EPEL 5. Although libguestfs is supplied in RHEL 5, the version supplied is very old and is only intended to be used with virt-v2v from RHEL 5. It is only available in the RHEL-5-V2V channel.

Therefore there exists a need for a modern libguestfs for RHEL 5 users. This package supplies this through the community-supported EPEL repository.

(1) Installation

After enabling the EPEL repository, install libguestfs in the normal way using yum. No post-installation configuration should be needed.

You must have a non-Xen kernel installed on the host. Note that the non-Xen kernel just needs to be installed, it does *not* need to be running (you can run libguestfs under Xen if you want). The non-Xen kernel is used to boot the libguestfs appliance.

You must use this package together with the version of qemu-kvm from RHEL 5 (usually called kvm-83-NNN.el5). Alternate versions of qemu, KVM, using $LIBGUESTFS_QEMU or QEMU wrappers, will probably not work.

Hardware virtualization will greatly improve the performance of libguestfs, but it is not required. libguestfs cannot use hardware virtualization when run in a Xen domain (not even dom0). For more performance tips, read guestfs-performance(1).

(2) Getting help

This package is supported voluntarily by the EPEL community and by the upstream libguestfs maintainers.

It is not supported by Red Hat.

It cannot be used with the virt-v2v package from RHEL 5. If you need to use virt-v2v on RHEL 5, use the libguestfs package from the same RHN channel. However we would advise you to use RHEL 6 or later because that version of virt-v2v is substantially more powerful.

To get help with this package, contact the libguestfs maintainers. See http://libguestfs.org for links to the mailing list, IRC, and how to file bugs.

(3) Features not available

The following features are not compatible with RHEL 5 and have been removed completely:

  • PHP bindings
  • GObject, GObject introspection, anything that uses GObject Introspection such as the Javascript bindings
  • Erlang bindings
  • The btrfs filesystem.
  • guestfs_fstrim
  • guestfs_wipefs
  • Various APIs that take UUIDs (eg. guestfs_mkswap_U)
  • virtio-scsi
  • Internationalization of any non-C programs.

(4) Features that may not work

The following features may not work in this version of libguestfs:

  • LUKS (encrypted filesystems within guests)
  • MD (RAID devices within guests)
  • FUSE, guestmount, the mount-local API. These appear to have some problems because of the older version of FUSE in RHEL 5.
  • virt-sysprep --script option (because it requires FUSE).
  • The ntfsclone_* APIs only partially work. In particular, the metadataonly flag is not working, and maybe other parts of this API won’t work.
  • guestfs_vfs_label cannot read labels from NTFS filesystems.
  • guestfs_blkid may return fewer fields than expected on a more modern Linux system.
  • guestfs_txz_in and guestfs_txz_out don’t work.
  • guestfs_utimens doesn’t let you set the time on a symbolic link (this is a limitation of the RHEL 5 kernel).
  • guestfs_mkswap_label followed by guestfs_swapon_label does not work. The reasons are not well understood.
  • Adding drives using non-virtio-blk interfaces.

(5) Other notes

An artificial pause of 1 second has been added after unmounting any filesystem.

*Without* the 1 second pause, the following test case will fail sometimes:

  guestfish <<EOF
  sparse test1.img 1G
  part-disk /dev/sda mbr
  mkfs msdos /dev/sda1
  mount /dev/sda1 /
  touch /foo
  umount /
  mkfs ntfs /dev/sda1
  # Next command would fail:
  mount /dev/sda1 /
  vfs-type /dev/sda1 -x

With the 1 second pause, this case passes. The reason is not understood.

Leave a comment

Filed under Uncategorized

libguestfs 1.16.15 preview packages for RHEL 6.2

I’ve updated the libguestfs preview packages for RHEL 6.2/6.3. These contain many new features and bug fixes compared to RHEL 6.2.

An easy way to use these packages is to run this command, which creates a yum repository pointing to the preview packages:

# cat <<EOF > /etc/yum.repos.d/libguestfs-RHEL-6.3-preview.repo
name=libguestfs RHEL 6.3 preview - x86_64

Leave a comment

Filed under Uncategorized

libguestfs RHEL 6.3 preview packages updated

I’ve updated the libguestfs RHEL 6.3 preview packages to libguestfs 1.16.4. Barring any bugs that we find over the next few months, these should be close to what we ship in RHEL 6.3.


You can install these on RHEL 6.2, but make sure you read the README file first.

Leave a comment

Filed under Uncategorized

libguestfs RHEL 6.3 new preview packages available



These are based on libguestfs 1.16.1 1.16.2.

Leave a comment

Filed under Uncategorized

libguestfs preview packages for RHEL 6.3

In Red Hat Enterprise Linux 6.3 we are rebasing libguestfs to 1.14.x, plus putting out new versions of hivex and febootstrap.

You can now download preview packages here:


These are in very rough shape at the moment. In particular we may remove a few things, depending on which features we think will be supportable for RHEL. Probably live support will be dropped, and maybe some new tools if they aren’t polished enough.

Read the README file before installing them.

Leave a comment

Filed under Uncategorized

RHEL virtualization getting started guide

The new Red Hat Enterprise Linux Virtualization Getting Started Guide, which I worked on, is essential reading if you want to find out how to start out using KVM on RHEL 6.


Filed under Uncategorized

libguestfs preview packages for RHEL 6.2

For RHEL 6.0 we delivered an old, very safe version of libguestfs (1.2). Even before RHEL 6.0 was out, we knew we wanted to radically update libguestfs because we had many major new features, and we had improved the speed of libguestfs by 4 or 5 times. Thus the RHEL 6.0 → 6.1 rebase was substantial.

For RHEL 6.2 we are not planning any big changes, but nevertheless we are going to pull in over 100 upstream patches and fix dozens of bugs.

RHEL 6.2 libguestfs will have the same official version 1.7.17 but in reality it will be very similar to the upstream stable branch version 1.8.11, the package which has been getting a lot of testing and feedback in Fedora 14.

If you are using libguestfs in RHEL 6.1 now and you want try out libguestfs as it will look in RHEL 6.2, have a look at these preview packages:


Leave a comment

Filed under Uncategorized