罗思标
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/
Richard W.M. Jones
2016-Feb-22 15:46 UTC
Re: [Libguestfs] Reply:Re: how to compile my own libguestfs with the ntfs support ?
On Mon, Feb 22, 2016 at 11:00:53PM +0800, 罗思标 wrote:> 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 ) ,Yes, this patch to disable functionality only applies to RHEL, not to Fedora and not to upstream. (It only applies "accidentally" to CentOS, since CentOS compiles the same RHEL package, including this patch).> which option need to enable windows VM ntfs and guestmount command > support when i make configure to compile with the upstream source > code ?There's no special ./configure option to enable ntfs-3g in the upstream code. What happens is that when the supermin appliance is built (see https://github.com/libguestfs/libguestfs/tree/master/appliance), if the ntfs-3g package is installed, then ntfs-3g features are enabled.> 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 ?It can handle both partition formats. See next question.> 2. how about the VM image has multi partitions and LVM? it's support > according to my try, but still need your further confirms.It can handle multiple partitions, and all LVM configuration. There are some limits on the number of partitions: http://libguestfs.org/guestfs.3.html#maximum-number-of-partitions-per-disk That limit applies to virtio-blk. It's a good question whether virtio-scsi (which we now use by default almost everywhere) still has that limit. I don't know the answer, but it'll certainly be at least 15 partitions.> 3. what is the maximum number of guestmount support at the same > time, does it only restrict by the host Memory and CPU resource ?If you are using libvirt, then libvirt has a maximum number of anonymous clients (max_anonymous_clients = 20). You can raise this by editing `/etc/libvirt/libvirtd.conf'. libguestfs has no limits, except host memory/CPU. FUSE or the fuse.ko kernel module might have its own limits. I don't think we have ever found what they are. During the automated test suite, we test 12 parallel FUSE mounts: https://github.com/libguestfs/libguestfs/blob/master/tests/mount-local/test-parallel-mount-local.c#L48 You could try raising that number, but note that you will hit the libvirt limit (20) unless you either disable libvirt (LIBGUESTFS_BACKEND=direct) or raise the limit in the libvirtd.conf. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
罗思标
2016-Feb-23 15:00 UTC
[Libguestfs] 回复: Re: Reply:Re: how to compile my own libguestfs with the ntfs support ?
thx a lot. 发自 网易邮箱大师 在2016年02月22日 23:46 ,Richard W.M. Jones写道: On Mon, Feb 22, 2016 at 11:00:53PM +0800, 罗思标 wrote:> 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 ) ,Yes, this patch to disable functionality only applies to RHEL, not to Fedora and not to upstream. (It only applies "accidentally" to CentOS, since CentOS compiles the same RHEL package, including this patch).> which option need to enable windows VM ntfs and guestmount command > support when i make configure to compile with the upstream source > code ?There's no special ./configure option to enable ntfs-3g in the upstream code. What happens is that when the supermin appliance is built (see https://github.com/libguestfs/libguestfs/tree/master/appliance), if the ntfs-3g package is installed, then ntfs-3g features are enabled.> 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 ?It can handle both partition formats. See next question.> 2. how about the VM image has multi partitions and LVM? it's support > according to my try, but still need your further confirms.It can handle multiple partitions, and all LVM configuration. There are some limits on the number of partitions: http://libguestfs.org/guestfs.3.html#maximum-number-of-partitions-per-disk That limit applies to virtio-blk. It's a good question whether virtio-scsi (which we now use by default almost everywhere) still has that limit. I don't know the answer, but it'll certainly be at least 15 partitions.> 3. what is the maximum number of guestmount support at the same > time, does it only restrict by the host Memory and CPU resource ?If you are using libvirt, then libvirt has a maximum number of anonymous clients (max_anonymous_clients = 20). You can raise this by editing `/etc/libvirt/libvirtd.conf'. libguestfs has no limits, except host memory/CPU. FUSE or the fuse.ko kernel module might have its own limits. I don't think we have ever found what they are. During the automated test suite, we test 12 parallel FUSE mounts: https://github.com/libguestfs/libguestfs/blob/master/tests/mount-local/test-parallel-mount-local.c#L48 You could try raising that number, but note that you will hit the libvirt limit (20) unless you either disable libvirt (LIBGUESTFS_BACKEND=direct) or raise the limit in the libvirtd.conf. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Possibly Parallel Threads
- Reply:Re: how to compile my own libguestfs with the ntfs support ?
- how to compile my own libguestfs with the ntfs support ?
- Re: how to compile my own libguestfs with the ntfs support ?
- Re: Missing libguestfs-winsupport in EL7
- Re: virt-sparsify for ntfs (libguestfs-tools-c)