[Libguestfs] how to compile my own libguestfs with the ntfs support ?

Richard W.M. Jones rjones at redhat.com
Mon Feb 22 10:15:20 UTC 2016


On Sun, Feb 21, 2016 at 09:42:34AM +0800, 罗思标 wrote:
> I get that libguest not supported mount windows VM image from
> rhel7.2 now, could you help point that how to compile my own
> libguestfs with the ntfs support, which option to enable it when
> make configure with the code ? Thx a lot.
> http://www.libguestfs.org/guestfs-faq.1.html#mount:-unsupported-filesystem-type-with-ntfs-in-rhel-7.2

First of all, learn about rebuilding RHEL RPMs from source RPMs.
There are a few guides to do this on the internet (these are in
English -- there may be better Chinese language ones):

  https://wiki.centos.org/HowTos/RebuildSRPM

  https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch11s03.html

  http://repoforge.org/package/rebuild.html

Now download the libguestfs source RPM:

If you want the version for RHEL 7.2, then they are now published in
the following CentOS git repository (actually not as a .src.rpm, but
with the spec file and patches extracted, which is more convenient):

  https://git.centos.org/tree/rpms!libguestfs/refs!heads!c7

If you want the source of the preview packages for RHEL 7.3, it is
available here:

  https://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview/
  https://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview/libguestfs-1.32.2-6.el7.src.rpm

Make sure you can recompile the source RPM normally.  You *must not*
recompile any RPMs, and especially not the libguestfs RPMs, as root.

Once you are able to recompile the libguestfs RPM normally, you should
now examine the list of patches in the libguestfs.spec file.  In the
RHEL 7.2 version of the spec file, there are 236 patches.  The patch
which you want is called
`XXXX-RHEL-7-Reject-use-of-libguestfs-winsupport-features-.patch' (for
some number `XXXX', which changes with each version).  You should just
be able to comment out this patch line, and recompile.  You might also
need to modify the `Release:' line, in order to give your package a
distinctive build number so you know whether you are using the
official package or your patched package.

Red Hat won't support any packages that you modify in this way.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list