罗思标
2016-Feb-21 01:42 UTC
[Libguestfs] how to compile my own libguestfs with the ntfs support ?
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
Richard W.M. Jones
2016-Feb-22 10:15 UTC
Re: [Libguestfs] how to compile my own libguestfs with the ntfs support ?
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.2First 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/
罗思标
2016-Feb-22 15:00 UTC
[Libguestfs] Reply:Re: how to compile my own libguestfs with the ntfs support ?
Hi rjones, Good catch, thanks a lot. Does it only disable from official rhel/centos RPM with `XXXX-RHEL-7-Reject-use-of-libguestfs-winsupport-features-.patch' in libguestfs while it still work in upstream source code ( e.g. rhel-7.2 branch in https://github.com/libguestfs/libguestfs ) , which option need to enable windows VM ntfs and guestmount command support when i make configure to compile with the upstream source code ? I just work for QEMU and Openstack community and need to modidy the VM image(e.g. make initrd for linux and modify windows regedit) to improve the success rate of VM image 2V2 from VMware to KVM/Xen environment, and find this powerful and amazing tool. some question still need your confirms: 1. does libguestfs support to mount the MBR and GPT VM image, is there any limitation about it ? 2. how about the VM image has multi partitions and LVM? it's support according to my try, but still need your further confirms. 3. what is the maximum number of guestmount support at the same time, does it only restrict by the host Memory and CPU resource ? Thank you very much. 在 2016-02-22 18:15:20,"Richard W.M. Jones" <rjones@redhat.com> 写道:>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/
Seemingly Similar Threads
- Reply:Re: how to compile my own libguestfs with the ntfs support ?
- how to compile my own libguestfs with the ntfs support ?
- Re: Reply:Re: how to compile my own libguestfs with the ntfs support ?
- Libguestfs & ubuntu 11.10 problems
- [virtual interface] detach interface during boot succeed with no changes