Re: [Libguestfs] Virt-v2v conversion issue
[Please keep replies on the list] On Mon, Oct 13, 2014 at 07:47:34AM +0000, VONDRA Alain wrote:
I give you some news about the conversion issue, I don't have the same problem, but I can't finalize the conversion, the process freezes randomly, sometimes during the conversion of the first disk or the third...
Can you run virt-v2v with the -x and -v options and post the complete output. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Hi, Here is the log file, I saw just ioctl warnings. Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : lundi 13 octobre 2014 11:06 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue [Please keep replies on the list] On Mon, Oct 13, 2014 at 07:47:34AM +0000, VONDRA Alain wrote:
I give you some news about the conversion issue, I don't have the same problem, but I can't finalize the conversion, the process freezes randomly, sometimes during the conversion of the first disk or the third...
Can you run virt-v2v with the -x and -v options and post the complete output. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
Richard, After un moment I have to force the unmount volume on /tmp umount -f /tmp/v2v.Nj0eik and I have this message : qemu-img: error while writing sector 246526903: Input/output error virt-v2v: error: qemu-img command failed, see earlier errors Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : libguestfs-bounces@redhat.com [mailto:libguestfs-bounces@redhat.com] De la part de VONDRA Alain Envoyé : lundi 13 octobre 2014 14:22 À : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue Hi, Here is the log file, I saw just ioctl warnings. Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : lundi 13 octobre 2014 11:06 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue [Please keep replies on the list] On Mon, Oct 13, 2014 at 07:47:34AM +0000, VONDRA Alain wrote:
I give you some news about the conversion issue, I don't have the same problem, but I can't finalize the conversion, the process freezes randomly, sometimes during the conversion of the first disk or the third...
Can you run virt-v2v with the -x and -v options and post the complete output. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Mon, Oct 13, 2014 at 04:34:31PM +0000, VONDRA Alain wrote:
Richard, After un moment I have to force the unmount volume on /tmp umount -f /tmp/v2v.Nj0eik and I have this message :
qemu-img: error while writing sector 246526903: Input/output error
virt-v2v: error: qemu-img command failed, see earlier errors
Also make sure the target NFS export storage domain has plenty of free space for the guest. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-top is 'top' for virtual machines. Tiny program with many powerful monitoring features, net stats, disk stats, logging, etc. http://people.redhat.com/~rjones/virt-top
On Mon, Oct 13, 2014 at 12:22:27PM +0000, VONDRA Alain wrote:
Hi, Here is the log file, I saw just ioctl warnings. Alain
I really need to see virt-v2v with -x *and* -v options. The errors seem to be happening in the 'qemu-img convert' stage which just copies from the source to the target. Is the source a local disk image? 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
Sorry I forgot the -v options. The source is a local disk image. Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : lundi 13 octobre 2014 23:09 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Mon, Oct 13, 2014 at 12:22:27PM +0000, VONDRA Alain wrote:
Hi, Here is the log file, I saw just ioctl warnings. Alain
I really need to see virt-v2v with -x *and* -v options. The errors seem to be happening in the 'qemu-img convert' stage which just copies from the source to the target. Is the source a local disk image? 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
The ioctl failure is not an error, but it's unexpected, and maybe hints at something deeper. What version of libguestfs-winsupport is installed? It should be 7.1-3.el7 (assuming this is RHEL 7), which has support for fstrim of aligned NTFS partitions. - - - Now on to the real problem ... 'qemu-img convert' is running, and then fails. Does it hang or crash? I would enable core dumps and capture one, since there's obviously a bug in qemu-img: (1) As root do: echo core.%p > /proc/sys/kernel/core_pattern (2) Before running virt-v2v, do: ulimited -c unlimited and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace: gdb /usr/bin/qemu-img core.XYZ (gdb) t a a bt It's very unexpected for qemu-img convert to fail, especially from a raw format local disk. But bugs can happen ... If qemu-img is hanging, not crashing, then you can attach gdb directly to the process and get a stack trace that way. What version of qemu-kvm-rhev is this? - - - If fstrim is successful then it should greatly reduce the amount of data to copy, both saving you lots of time and making the 'qemu-img convert' bug harder to hit. 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/
The version libguestfs-winsupport installed is well 7.1-3.el7 and the qemu-kvm-rhev is 2.1.2-2.el7 In fact the qemu-img convert hangs. Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 08:44 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue The ioctl failure is not an error, but it's unexpected, and maybe hints at something deeper. What version of libguestfs-winsupport is installed? It should be 7.1-3.el7 (assuming this is RHEL 7), which has support for fstrim of aligned NTFS partitions. - - - Now on to the real problem ... 'qemu-img convert' is running, and then fails. Does it hang or crash? I would enable core dumps and capture one, since there's obviously a bug in qemu-img: (1) As root do: echo core.%p > /proc/sys/kernel/core_pattern (2) Before running virt-v2v, do: ulimited -c unlimited and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace: gdb /usr/bin/qemu-img core.XYZ (gdb) t a a bt It's very unexpected for qemu-img convert to fail, especially from a raw format local disk. But bugs can happen ... If qemu-img is hanging, not crashing, then you can attach gdb directly to the process and get a stack trace that way. What version of qemu-kvm-rhev is this? - - - If fstrim is successful then it should greatly reduce the amount of data to copy, both saving you lots of time and making the 'qemu-img convert' bug harder to hit. 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/
On Tue, Oct 14, 2014 at 07:56:22AM +0000, VONDRA Alain wrote:
The version libguestfs-winsupport installed is well 7.1-3.el7 and the qemu-kvm-rhev is 2.1.2-2.el7 In fact the qemu-img convert hangs.
You'll have to attach gdb to it and find out why it hangs. It is likely to be a bug in qemu of some kind. 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/
I am waiting the process hangs, now the conversion is still running... Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 11:09 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 07:56:22AM +0000, VONDRA Alain wrote:
The version libguestfs-winsupport installed is well 7.1-3.el7 and the qemu-kvm-rhev is 2.1.2-2.el7 In fact the qemu-img convert hangs.
You'll have to attach gdb to it and find out why it hangs. It is likely to be a bug in qemu of some kind. 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/
Rich, The conversion did'nt finish, and I don't have any core dump. The qemu-img seems to hang, but doesn't crash... Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : libguestfs-bounces@redhat.com [mailto:libguestfs-bounces@redhat.com] De la part de VONDRA Alain Envoyé : mardi 14 octobre 2014 11:30 À : Richard W.M. Jones Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue I am waiting the process hangs, now the conversion is still running... Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 11:09 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 07:56:22AM +0000, VONDRA Alain wrote:
The version libguestfs-winsupport installed is well 7.1-3.el7 and the qemu-kvm-rhev is 2.1.2-2.el7 In fact the qemu-img convert hangs.
You'll have to attach gdb to it and find out why it hangs. It is likely to be a bug in qemu of some kind. 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/ _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
On Tue, Oct 14, 2014 at 02:43:31PM +0000, VONDRA Alain wrote:
Rich, The conversion did'nt finish, and I don't have any core dump. The qemu-img seems to hang, but doesn't crash...
Please connect gdb to the hung process and get a stack trace to find out where it's hanging. 'strace -p ...' output might also be enlightening, if it is not hung but doing "something" (albeit not making progress). I should also note that if qemu-img convert hits a lot of zeroes in the source (possible, because fstrim wasnt successful), then it will consume CPU skipping them, but won't write anything for a while. 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
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake : (1) As root do: echo core.%p > /proc/sys/kernel/core_pattern -> OK (2) Before running virt-v2v, do: ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace: gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ??? (gdb) t a a bt Thanks Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 16:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 02:43:31PM +0000, VONDRA Alain wrote:
Rich, The conversion did'nt finish, and I don't have any core dump. The qemu-img seems to hang, but doesn't crash...
Please connect gdb to the hung process and get a stack trace to find out where it's hanging. 'strace -p ...' output might also be enlightening, if it is not hung but doing "something" (albeit not making progress). I should also note that if qemu-img convert hits a lot of zeroes in the source (possible, because fstrim wasnt successful), then it will consume CPU skipping them, but won't write anything for a while. 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
On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote:
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake :
(1) As root do:
echo core.%p > /proc/sys/kernel/core_pattern -> OK
(2) Before running virt-v2v, do:
ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK
and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace:
gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ???
Yes, you have to wait for qemu-img to crash before there will be a core dump. If it's not crashing, then connect to qemu-img directly, something like this: gdb /usr/bin/qemu-img `pidof qemu-img` and run this command:
(gdb) t a a bt
to show the stack trace in all threads. If qemu-img is consuming CPU then it's probably not hung. I'm still interested to find out why fstrim didn't work. Can you run: guestfish --ro -d unc-srv-qual03
<fs> run <fs> part-list /dev/sda <fs> part-list /dev/sdb <fs> part-list /dev/sdc <fs> part-list /dev/sdd (etc)
I'd be interested to see if the partitions are unaligned, which is the only reason why fstrim should fail on NTFS. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
<fs> part-list /dev/sda [0] = {
<fs> part-list /dev/sdb [0] = {
<fs> part-list /dev/sdc [0] = {
<fs> part-list /dev/sdd [0] = {
<fs> part-list /dev/sdf [0] = {
<fs> part-list /dev/sdg [0] = {
<fs> part-list /dev/sdh [0] = {
<fs> part-list /dev/sdi [0] = {
Rich, The results of the guestfish command : part_num: 1 part_start: 1048576 part_end: 85906685951 part_size: 85905637376 } part_num: 1 part_start: 32256 part_end: 322126640639 part_size: 322126608384 } part_num: 1 part_start: 32256 part_end: 32210196479 part_size: 32210164224 } part_num: 1 part_start: 32256 part_end: 32210196479 part_size: 32210164224 } part_num: 1 part_start: 32256 part_end: 21476206079 part_size: 21476173824 } part_num: 1 part_start: 32256 part_end: 42952412159 part_size: 42952379904 } part_num: 1 part_start: 32256 part_end: 214745610239 part_size: 214745577984 } part_num: 1 part_start: 32256 part_end: 32224857087 part_size: 32224824832 } Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 22:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote:
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake :
(1) As root do:
echo core.%p > /proc/sys/kernel/core_pattern -> OK
(2) Before running virt-v2v, do:
ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK
and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace:
gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ???
Yes, you have to wait for qemu-img to crash before there will be a core dump. If it's not crashing, then connect to qemu-img directly, something like this: gdb /usr/bin/qemu-img `pidof qemu-img` and run this command:
(gdb) t a a bt
to show the stack trace in all threads. If qemu-img is consuming CPU then it's probably not hung. I'm still interested to find out why fstrim didn't work. Can you run: guestfish --ro -d unc-srv-qual03
<fs> run <fs> part-list /dev/sda <fs> part-list /dev/sdb <fs> part-list /dev/sdc <fs> part-list /dev/sdd (etc)
I'd be interested to see if the partitions are unaligned, which is the only reason why fstrim should fail on NTFS. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
On Wed, Oct 15, 2014 at 12:03:26PM +0000, VONDRA Alain wrote:
Rich, The results of the guestfish command :
<fs> part-list /dev/sda [0] = { part_num: 1 part_start: 1048576 part_end: 85906685951 part_size: 85905637376 } <fs> part-list /dev/sdb [0] = { part_num: 1 part_start: 32256 part_end: 322126640639 part_size: 322126608384 } [etc]
Ah .. this does explain why the fstrim failed on every disk apart from /dev/sda. My patches to implement fstrim in NTFS give up unless the partition is aligned sufficiently: http://comments.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/1074 /dev/sda is sufficiently aligned, but the other 8 disks are not. This is rather unfortunate for you because fstrim would undoubtedly have saved network bandwidth as well as making qemu-img do less. At least that mystery is solved. 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/
So, what action can I do to pass this problem ?? How can I make a better alignment of these partitions ? Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mercredi 15 octobre 2014 14:09 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Wed, Oct 15, 2014 at 12:03:26PM +0000, VONDRA Alain wrote:
Rich, The results of the guestfish command :
<fs> part-list /dev/sda [0] = { part_num: 1 part_start: 1048576 part_end: 85906685951 part_size: 85905637376 } <fs> part-list /dev/sdb [0] = { part_num: 1 part_start: 32256 part_end: 322126640639 part_size: 322126608384 } [etc]
Ah .. this does explain why the fstrim failed on every disk apart from /dev/sda. My patches to implement fstrim in NTFS give up unless the partition is aligned sufficiently: http://comments.gmane.org/gmane.comp.file-systems.ntfs-3g.devel/1074 /dev/sda is sufficiently aligned, but the other 8 disks are not. This is rather unfortunate for you because fstrim would undoubtedly have saved network bandwidth as well as making qemu-img do less. At least that mystery is solved. 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/
Now, the conversion hangs on the first disk at 54,03/100%, here is the gdb result : (gdb) t a a bt Thread 2 (Thread 0x7f0f3cea9700 (LWP 9583)): #0 sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:101 #1 0x00007f0f45b765e7 in qemu_sem_timedwait () #2 0x00007f0f45b0750c in worker_thread () #3 0x00007f0f4203bdf3 in start_thread (arg=0x7f0f3cea9700) at pthread_create.c:308 #4 0x00007f0f41d6901d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113 Thread 1 (Thread 0x7f0f45aa88c0 (LWP 9582)): #0 0x00007f0f41d5eb0f in __GI_ppoll (fds=0x7f0f470d7a00, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56 #1 0x00007f0f45b146db in qemu_poll_ns () #2 0x00007f0f45b15430 in aio_poll () #3 0x00007f0f45b0eedd in bdrv_prwv_co () #4 0x00007f0f45b0efd3 in bdrv_rw_co () #5 0x00007f0f45b05b35 in img_convert () #6 0x00007f0f41c94af5 in __libc_start_main (main=0x7f0f45b01e80 <main>, argc=10, ubp_av=0x7fff19cb3ab8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff19cb3aa8) at libc-start.c:274 #7 0x00007f0f45b022ed in _start () Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 22:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote:
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake :
(1) As root do:
echo core.%p > /proc/sys/kernel/core_pattern -> OK
(2) Before running virt-v2v, do:
ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK
and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace:
gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ???
Yes, you have to wait for qemu-img to crash before there will be a core dump. If it's not crashing, then connect to qemu-img directly, something like this: gdb /usr/bin/qemu-img `pidof qemu-img` and run this command:
(gdb) t a a bt
to show the stack trace in all threads. If qemu-img is consuming CPU then it's probably not hung. I'm still interested to find out why fstrim didn't work. Can you run: guestfish --ro -d unc-srv-qual03
<fs> run <fs> part-list /dev/sda <fs> part-list /dev/sdb <fs> part-list /dev/sdc <fs> part-list /dev/sdd (etc)
I'd be interested to see if the partitions are unaligned, which is the only reason why fstrim should fail on NTFS. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
On Wed, Oct 15, 2014 at 12:23:17PM +0000, VONDRA Alain wrote:
Now, the conversion hangs on the first disk at 54,03/100%, here is the gdb result :
OK I just talked to Paolo about this, and it's fairly serious. Can you get a core dump from this? You will need to set up the ulimit etc as outlined in the previous email: https://www.redhat.com/archives/libguestfs/2014-October/msg00102.html then run the conversion until it hangs, then 'killall -BUS qemu-img' which should cause qemu-img to drop a core dump file. You can send me (privately) the core dump and I will open a BZ about this and ensure that the necessary people see this. Thanks, Rich.
(gdb) t a a bt
Thread 2 (Thread 0x7f0f3cea9700 (LWP 9583)): #0 sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:101 #1 0x00007f0f45b765e7 in qemu_sem_timedwait () #2 0x00007f0f45b0750c in worker_thread () #3 0x00007f0f4203bdf3 in start_thread (arg=0x7f0f3cea9700) at pthread_create.c:308 #4 0x00007f0f41d6901d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Thread 1 (Thread 0x7f0f45aa88c0 (LWP 9582)): #0 0x00007f0f41d5eb0f in __GI_ppoll (fds=0x7f0f470d7a00, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56 #1 0x00007f0f45b146db in qemu_poll_ns () #2 0x00007f0f45b15430 in aio_poll () #3 0x00007f0f45b0eedd in bdrv_prwv_co () #4 0x00007f0f45b0efd3 in bdrv_rw_co () #5 0x00007f0f45b05b35 in img_convert () #6 0x00007f0f41c94af5 in __libc_start_main (main=0x7f0f45b01e80 <main>, argc=10, ubp_av=0x7fff19cb3ab8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff19cb3aa8) at libc-start.c:274 #7 0x00007f0f45b022ed in _start ()
Alain
-----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 22:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue
On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote:
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake :
(1) As root do:
echo core.%p > /proc/sys/kernel/core_pattern -> OK
(2) Before running virt-v2v, do:
ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK
and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace:
gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ???
Yes, you have to wait for qemu-img to crash before there will be a core dump. If it's not crashing, then connect to qemu-img directly, something like this:
gdb /usr/bin/qemu-img `pidof qemu-img`
and run this command:
(gdb) t a a bt
to show the stack trace in all threads.
If qemu-img is consuming CPU then it's probably not hung.
I'm still interested to find out why fstrim didn't work. Can you run:
guestfish --ro -d unc-srv-qual03
<fs> run <fs> part-list /dev/sda <fs> part-list /dev/sdb <fs> part-list /dev/sdc <fs> part-list /dev/sdd (etc)
I'd be interested to see if the partitions are unaligned, which is the only reason why fstrim should fail on NTFS.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
-- 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
Killall does nothing the process is still alive... If I do kill -9, do I get a core dump ? Each time I got this hang, I find only umount -f /tmp/xxxx to force qemu-img to stop. Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mercredi 15 octobre 2014 14:41 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Wed, Oct 15, 2014 at 12:23:17PM +0000, VONDRA Alain wrote:
Now, the conversion hangs on the first disk at 54,03/100%, here is the gdb result :
OK I just talked to Paolo about this, and it's fairly serious. Can you get a core dump from this? You will need to set up the ulimit etc as outlined in the previous email: https://www.redhat.com/archives/libguestfs/2014-October/msg00102.html then run the conversion until it hangs, then 'killall -BUS qemu-img' which should cause qemu-img to drop a core dump file. You can send me (privately) the core dump and I will open a BZ about this and ensure that the necessary people see this. Thanks, Rich.
(gdb) t a a bt
Thread 2 (Thread 0x7f0f3cea9700 (LWP 9583)): #0 sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S:101 #1 0x00007f0f45b765e7 in qemu_sem_timedwait () #2 0x00007f0f45b0750c in worker_thread () #3 0x00007f0f4203bdf3 in start_thread (arg=0x7f0f3cea9700) at pthread_create.c:308 #4 0x00007f0f41d6901d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
Thread 1 (Thread 0x7f0f45aa88c0 (LWP 9582)): #0 0x00007f0f41d5eb0f in __GI_ppoll (fds=0x7f0f470d7a00, nfds=1, timeout=<optimized out>, sigmask=0x0) at ../sysdeps/unix/sysv/linux/ppoll.c:56 #1 0x00007f0f45b146db in qemu_poll_ns () #2 0x00007f0f45b15430 in aio_poll () #3 0x00007f0f45b0eedd in bdrv_prwv_co () #4 0x00007f0f45b0efd3 in bdrv_rw_co () #5 0x00007f0f45b05b35 in img_convert () #6 0x00007f0f41c94af5 in __libc_start_main (main=0x7f0f45b01e80 <main>, argc=10, ubp_av=0x7fff19cb3ab8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff19cb3aa8) at libc-start.c:274 #7 0x00007f0f45b022ed in _start ()
Alain
-----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 22:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue
On Tue, Oct 14, 2014 at 03:40:22PM +0000, VONDRA Alain wrote:
Rich, I've followed your instructions to trace, but I am not very skilful with gdb, maybe I made a mistake :
(1) As root do:
echo core.%p > /proc/sys/kernel/core_pattern -> OK
(2) Before running virt-v2v, do:
ulimited -c unlimited -> I think it's ulimit -c unlimited -> -> OK
and you should get a core.* file in the current directory when qemu-img segfaults. Attach that file to gdb to get a stack trace:
gdb /usr/bin/qemu-img core.XYZ -> Do I need to wait the crash becase I don't have any core ???
Yes, you have to wait for qemu-img to crash before there will be a core dump. If it's not crashing, then connect to qemu-img directly, something like this:
gdb /usr/bin/qemu-img `pidof qemu-img`
and run this command:
(gdb) t a a bt
to show the stack trace in all threads.
If qemu-img is consuming CPU then it's probably not hung.
I'm still interested to find out why fstrim didn't work. Can you run:
guestfish --ro -d unc-srv-qual03
<fs> run <fs> part-list /dev/sda <fs> part-list /dev/sdb <fs> part-list /dev/sdc <fs> part-list /dev/sdd (etc)
I'd be interested to see if the partitions are unaligned, which is the only reason why fstrim should fail on NTFS.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
-- 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
On Wed, Oct 15, 2014 at 01:49:55PM +0000, VONDRA Alain wrote:
If I do kill -9, do I get a core dump ?
I'm not sure, but ...
Killall does nothing the process is still alive... Each time I got this hang, I find only umount -f /tmp/xxxx to force qemu-img to stop.
Are you sure this couldn't be an NFS server problem? Any message or errors in 'dmesg'? Any kernel threads (see top) which are consuming time or stuck in 'D' state? I've been playing around with various test scripts (see attached) to see if I could reproduce this problem, but I couldn't reproduce it yet on RHEL 7.1 or Fedora 21. 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/
I see only qemu-img consumming some CPU and MEM : 25897 qemu 20 0 5825976 2,429g 4368 S 5,6 32,2 603:09.34 qemu-kvm I have indeed, some nfs errors : [475747.296041] nfs: server 192.203.100.247 not responding, still trying [475747.772022] nfs: server 192.203.100.247 not responding, still trying [475747.848023] nfs: server 192.203.100.247 not responding, still trying [475747.849014] nfs: server 192.203.100.247 not responding, still trying [475748.270030] nfs: server 192.203.100.247 not responding, still trying [475748.270038] nfs: server 192.203.100.247 not responding, still trying [475748.273016] nfs: server 192.203.100.247 not responding, still trying [475748.274016] nfs: server 192.203.100.247 not responding, still trying [475748.461023] nfs: server 192.203.100.247 not responding, still trying [475748.461028] nfs: server 192.203.100.247 not responding, still trying [475748.461031] nfs: server 192.203.100.247 not responding, still trying [475748.461034] nfs: server 192.203.100.247 not responding, still trying And a lot of : [785084.263606] kvm [12719]: vcpu0 unhandled rdmsr: 0x345 [785084.269594] kvm [12719]: vcpu0 unhandled wrmsr: 0x40 data 0 [785084.269999] kvm [12719]: vcpu0 unhandled wrmsr: 0x60 data 0 [785084.270406] kvm [12719]: vcpu0 unhandled wrmsr: 0x41 data 0 [785084.270826] kvm [12719]: vcpu0 unhandled wrmsr: 0x61 data 0 [785084.271231] kvm [12719]: vcpu0 unhandled wrmsr: 0x42 data 0 [785084.271633] kvm [12719]: vcpu0 unhandled wrmsr: 0x62 data 0 [785084.272023] kvm [12719]: vcpu0 unhandled wrmsr: 0x43 data 0 [785084.272410] kvm [12719]: vcpu0 unhandled wrmsr: 0x63 data 0 Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mercredi 15 octobre 2014 15:59 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Wed, Oct 15, 2014 at 01:49:55PM +0000, VONDRA Alain wrote:
If I do kill -9, do I get a core dump ?
I'm not sure, but ...
Killall does nothing the process is still alive... Each time I got this hang, I find only umount -f /tmp/xxxx to force qemu-img to stop.
Are you sure this couldn't be an NFS server problem? Any message or errors in 'dmesg'? Any kernel threads (see top) which are consuming time or stuck in 'D' state? I've been playing around with various test scripts (see attached) to see if I could reproduce this problem, but I couldn't reproduce it yet on RHEL 7.1 or Fedora 21. 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/
On Wed, Oct 15, 2014 at 03:23:39PM +0000, VONDRA Alain wrote:
I see only qemu-img consumming some CPU and MEM :
25897 qemu 20 0 5825976 2,429g 4368 S 5,6 32,2 603:09.34 qemu-kvm
That's qemu, not qemu-img.
I have indeed, some nfs errors :
[475747.296041] nfs: server 192.203.100.247 not responding, still trying [475747.772022] nfs: server 192.203.100.247 not responding, still trying [475747.848023] nfs: server 192.203.100.247 not responding, still trying [475747.849014] nfs: server 192.203.100.247 not responding, still trying [475748.270030] nfs: server 192.203.100.247 not responding, still trying [475748.270038] nfs: server 192.203.100.247 not responding, still trying [475748.273016] nfs: server 192.203.100.247 not responding, still trying [475748.274016] nfs: server 192.203.100.247 not responding, still trying [475748.461023] nfs: server 192.203.100.247 not responding, still trying [475748.461028] nfs: server 192.203.100.247 not responding, still trying [475748.461031] nfs: server 192.203.100.247 not responding, still trying [475748.461034] nfs: server 192.203.100.247 not responding, still trying
These are a problem, if they are coincident with qemu-img hanging. Use 'dmesg -w' to check.
And a lot of : [785084.263606] kvm [12719]: vcpu0 unhandled rdmsr: 0x345 [785084.269594] kvm [12719]: vcpu0 unhandled wrmsr: 0x40 data 0 [785084.269999] kvm [12719]: vcpu0 unhandled wrmsr: 0x60 data 0 [785084.270406] kvm [12719]: vcpu0 unhandled wrmsr: 0x41 data 0 [785084.270826] kvm [12719]: vcpu0 unhandled wrmsr: 0x61 data 0 [785084.271231] kvm [12719]: vcpu0 unhandled wrmsr: 0x42 data 0 [785084.271633] kvm [12719]: vcpu0 unhandled wrmsr: 0x62 data 0 [785084.272023] kvm [12719]: vcpu0 unhandled wrmsr: 0x43 data 0 [785084.272410] kvm [12719]: vcpu0 unhandled wrmsr: 0x63 data 0
You can ignore this warning. It is meaningless for the end user and doesn't matter. 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
The script as worked perfectly : + size=100G + virt-builder fedora-20 --size 100G -o /tmp/in.img gpg: Signature faite le mar. 08 juil. 2014 11:11:00 CEST avec la clef RSA d'identifiant E1B768A0 gpg: Bonne signature de « Richard W.M. Jones <rjones@redhat.com> » gpg: alias « Richard W.M. Jones <rich@annexia.org> » gpg: Attention : cette clef n'est pas certifiée avec une signature de confiance. gpg: Rien n'indique que la signature appartient à son propriétaire. Empreinte de clef principale : F777 4FB1 AD07 4A7E 8C87 67EA 9173 8F73 E1B7 68A0 [ 1,0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz ######################################################################## 100,0% [ 718,0] Planning how to build this image [ 718,0] Uncompressing [ 737,0] Resizing (using virt-resize) to expand the disk to 100,0G [ 786,0] Opening the new disk [ 792,0] Setting a random seed [ 792,0] Setting passwords [ 794,0] Finishing off Output file: /tmp/in.img Output size: 100,0G Output format: raw Total usable space: 97,7G Free space: 97,0G (99%) + guestfish -a /tmp/in.img -i + qemu-img create -q -f qcow2 -b /tmp/in.img -o compat=1.1,backing_fmt=raw /tmp/overlay.qcow2 + truncate -s 100G /tmp/out.img + qemu-img convert -p -n -f qcow2 /tmp/overlay.qcow2 -O raw /tmp/out.img (100.00/100%) real 2m50.364s user 0m36.146s sys 2m3.548s I run again a conversion to try to catch a core dump... Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mercredi 15 octobre 2014 17:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Wed, Oct 15, 2014 at 03:23:39PM +0000, VONDRA Alain wrote:
I see only qemu-img consumming some CPU and MEM :
25897 qemu 20 0 5825976 2,429g 4368 S 5,6 32,2 603:09.34 qemu-kvm
That's qemu, not qemu-img.
I have indeed, some nfs errors :
[475747.296041] nfs: server 192.203.100.247 not responding, still trying [475747.772022] nfs: server 192.203.100.247 not responding, still trying [475747.848023] nfs: server 192.203.100.247 not responding, still trying [475747.849014] nfs: server 192.203.100.247 not responding, still trying [475748.270030] nfs: server 192.203.100.247 not responding, still trying [475748.270038] nfs: server 192.203.100.247 not responding, still trying [475748.273016] nfs: server 192.203.100.247 not responding, still trying [475748.274016] nfs: server 192.203.100.247 not responding, still trying [475748.461023] nfs: server 192.203.100.247 not responding, still trying [475748.461028] nfs: server 192.203.100.247 not responding, still trying [475748.461031] nfs: server 192.203.100.247 not responding, still trying [475748.461034] nfs: server 192.203.100.247 not responding, still trying
These are a problem, if they are coincident with qemu-img hanging. Use 'dmesg -w' to check.
And a lot of : [785084.263606] kvm [12719]: vcpu0 unhandled rdmsr: 0x345 [785084.269594] kvm [12719]: vcpu0 unhandled wrmsr: 0x40 data 0 [785084.269999] kvm [12719]: vcpu0 unhandled wrmsr: 0x60 data 0 [785084.270406] kvm [12719]: vcpu0 unhandled wrmsr: 0x41 data 0 [785084.270826] kvm [12719]: vcpu0 unhandled wrmsr: 0x61 data 0 [785084.271231] kvm [12719]: vcpu0 unhandled wrmsr: 0x42 data 0 [785084.271633] kvm [12719]: vcpu0 unhandled wrmsr: 0x62 data 0 [785084.272023] kvm [12719]: vcpu0 unhandled wrmsr: 0x43 data 0 [785084.272410] kvm [12719]: vcpu0 unhandled wrmsr: 0x63 data 0
You can ignore this warning. It is meaningless for the end user and doesn't matter. 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
On Wed, Oct 15, 2014 at 04:32:38PM +0000, VONDRA Alain wrote:
The script as worked perfectly :
For me too. However you could try changing the location of the output file (/tmp/out.img) so it writes to your NFS server instead. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
I was hoping that it works, but the conversion hanged at the 7th /9 disk 57,03% since 1.30 AM... [19351,0] Copying disk 7/9 to /tmp/v2v.UgUPSx/0a6404e0-2857-45e4-9322-c1ada5ae13fb/images/0123ddcd-f88d-43d0-b836-2cabe57beac3/d0fe6d79-b846-41ca-ac94-835b97488685 (raw) target_file = /tmp/v2v.UgUPSx/0a6404e0-2857-45e4-9322-c1ada5ae13fb/images/0123ddcd-f88d-43d0-b836-2cabe57beac3/d0fe6d79-b846-41ca-ac94-835b97488685 target_format = raw target_estimated_size = 42968862720 target_overlay = /var/tmp/v2vovle2fd4a.qcow2 target_overlay.ov_source = /data/big_export/IMAGES/UNC-SRV-QUAL03-6.img qemu-img convert -p -n -f qcow2 -O 'raw' '/var/tmp/v2vovle2fd4a.qcow2' '/tmp/v2v.UgUPSx/0a6404e0-2857-45e4-9322-c1ada5ae13fb/images/0123ddcd-f88d-43d0-b836-2cabe57beac3/d0fe6d79-b846-41ca-ac94-835b97488685' (57.03/100%) The qemu-img idles : 23338 root 20 0 227300 7332 3868 S 0,0 0,1 0:48.29 qemu-img I have no errors in dmesg, but NFSD state is D : 11263 root 20 0 0 0 0 S 0,0 0,0 0:00.00 lockd 11266 root 20 0 0 0 0 D 0,0 0,0 1:52.51 nfsd 11267 root 20 0 0 0 0 D 0,0 0,0 1:52.58 nfsd 11268 root 20 0 0 0 0 D 0,0 0,0 1:53.15 nfsd 11269 root 20 0 0 0 0 D 0,0 0,0 1:52.83 nfsd 11270 root 20 0 0 0 0 D 0,0 0,0 1:52.27 nfsd 11271 root 20 0 0 0 0 D 0,0 0,0 1:52.56 nfsd 11272 root 20 0 0 0 0 D 0,0 0,0 1:51.99 nfsd 11273 root 20 0 0 0 0 D 0,0 0,0 1:53.72 nfsd I think the problem is there, I have to say you that my NFS EXPORT_DOMAIN for Ovirt is on the same machine (because of need of large volume space "4Tb" to convert big vmdk images) so the NFS volume /data/big_import/IMPORT is used to convert images and to send (in fact on the same HD via NFS) it to oVirt Manager. I've tried before to convert locally images but they didn't appeared in "Import VM" on the oVirt Manager. Maybe it was a bug from older version of libguestfs and works today ? If you have a better proposition to make this conversion not using the -o rhev -os "nfs share", I'll friendly accept !!!! Alain -----Message d'origine----- De : libguestfs-bounces@redhat.com [mailto:libguestfs-bounces@redhat.com] De la part de VONDRA Alain Envoyé : mercredi 15 octobre 2014 18:33 À : Richard W.M. Jones Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue The script as worked perfectly : + size=100G + virt-builder fedora-20 --size 100G -o /tmp/in.img gpg: Signature faite le mar. 08 juil. 2014 11:11:00 CEST avec la clef RSA d'identifiant E1B768A0 gpg: Bonne signature de « Richard W.M. Jones <rjones@redhat.com> » gpg: alias « Richard W.M. Jones <rich@annexia.org> » gpg: Attention : cette clef n'est pas certifiée avec une signature de confiance. gpg: Rien n'indique que la signature appartient à son propriétaire. Empreinte de clef principale : F777 4FB1 AD07 4A7E 8C87 67EA 9173 8F73 E1B7 68A0 [ 1,0] Downloading: http://libguestfs.org/download/builder/fedora-20.xz ######################################################################## 100,0% [ 718,0] Planning how to build this image [ 718,0] Uncompressing [ 737,0] Resizing (using virt-resize) to expand the disk to 100,0G [ 786,0] Opening the new disk [ 792,0] Setting a random seed [ 792,0] Setting passwords [ 794,0] Finishing off Output file: /tmp/in.img Output size: 100,0G Output format: raw Total usable space: 97,7G Free space: 97,0G (99%) + guestfish -a /tmp/in.img -i + qemu-img create -q -f qcow2 -b /tmp/in.img -o + compat=1.1,backing_fmt=raw /tmp/overlay.qcow2 truncate -s 100G + /tmp/out.img qemu-img convert -p -n -f qcow2 /tmp/overlay.qcow2 -O raw + /tmp/out.img (100.00/100%) real 2m50.364s user 0m36.146s sys 2m3.548s I run again a conversion to try to catch a core dump... Alain -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mercredi 15 octobre 2014 17:52 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Wed, Oct 15, 2014 at 03:23:39PM +0000, VONDRA Alain wrote:
I see only qemu-img consumming some CPU and MEM :
25897 qemu 20 0 5825976 2,429g 4368 S 5,6 32,2 603:09.34 qemu-kvm
That's qemu, not qemu-img.
I have indeed, some nfs errors :
[475747.296041] nfs: server 192.203.100.247 not responding, still trying [475747.772022] nfs: server 192.203.100.247 not responding, still trying [475747.848023] nfs: server 192.203.100.247 not responding, still trying [475747.849014] nfs: server 192.203.100.247 not responding, still trying [475748.270030] nfs: server 192.203.100.247 not responding, still trying [475748.270038] nfs: server 192.203.100.247 not responding, still trying [475748.273016] nfs: server 192.203.100.247 not responding, still trying [475748.274016] nfs: server 192.203.100.247 not responding, still trying [475748.461023] nfs: server 192.203.100.247 not responding, still trying [475748.461028] nfs: server 192.203.100.247 not responding, still trying [475748.461031] nfs: server 192.203.100.247 not responding, still trying [475748.461034] nfs: server 192.203.100.247 not responding, still trying
These are a problem, if they are coincident with qemu-img hanging. Use 'dmesg -w' to check.
And a lot of : [785084.263606] kvm [12719]: vcpu0 unhandled rdmsr: 0x345 [785084.269594] kvm [12719]: vcpu0 unhandled wrmsr: 0x40 data 0 [785084.269999] kvm [12719]: vcpu0 unhandled wrmsr: 0x60 data 0 [785084.270406] kvm [12719]: vcpu0 unhandled wrmsr: 0x41 data 0 [785084.270826] kvm [12719]: vcpu0 unhandled wrmsr: 0x61 data 0 [785084.271231] kvm [12719]: vcpu0 unhandled wrmsr: 0x42 data 0 [785084.271633] kvm [12719]: vcpu0 unhandled wrmsr: 0x62 data 0 [785084.272023] kvm [12719]: vcpu0 unhandled wrmsr: 0x43 data 0 [785084.272410] kvm [12719]: vcpu0 unhandled wrmsr: 0x63 data 0
You can ignore this warning. It is meaningless for the end user and doesn't matter. 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 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://www.redhat.com/mailman/listinfo/libguestfs
On Thu, Oct 16, 2014 at 08:55:10AM +0000, VONDRA Alain wrote:
I've tried before to convert locally images but they didn't appeared in "Import VM" on the oVirt Manager.
Not sure what precisely you mean by "convert locally". However there was indeed a bug -- long fixed -- where images didn't show up in the Import VM tab.
Maybe it was a bug from older version of libguestfs and works today ?
If you have a better proposition to make this conversion not using the -o rhev -os "nfs share", I'll friendly accept !!!!
virt-v2v doesn't require very much temporary space for -o rhev. A few 100 MBs at most. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
Also I noticed from the log that you're running qemu 2.0.0 (from where?) Try qemu-kvm-rhev included in the repository, currently at version qemu-img-rhev-2.1.2-2.el7.x86_64. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
I use qemu-img-rhev-2.1.2-2.el7.x86_64, just some other packages like qemu-2.0.0-1.el7.1.x86_64 are in older versions, but at my knowledge there is no qemu-2.0.0-1.el7.1.x86_64 available ? Alain Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 17:01 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue Also I noticed from the log that you're running qemu 2.0.0 (from where?) Try qemu-kvm-rhev included in the repository, currently at version qemu-img-rhev-2.1.2-2.el7.x86_64. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v
On Tue, Oct 14, 2014 at 03:34:07PM +0000, VONDRA Alain wrote:
I use qemu-img-rhev-2.1.2-2.el7.x86_64, just some other packages like qemu-2.0.0-1.el7.1.x86_64 are in older versions, but at my knowledge there is no qemu-2.0.0-1.el7.1.x86_64 available ?
What does: rpm -qf /usr/bin/qemu-img /usr/libexec/qemu-kvm say? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
This : qemu-img-rhev-2.1.2-2.el7.x86_64 qemu-kvm-rhev-2.1.2-2.el7.x86_64 Alain VONDRA Chargé d'exploitation des Systèmes d'Information Direction Administrative et Financière +33 1 44 39 77 76 UNICEF France 3 rue Duguay Trouin 75006 PARIS www.unicef.fr -----Message d'origine----- De : Richard W.M. Jones [mailto:rjones@redhat.com] Envoyé : mardi 14 octobre 2014 22:48 À : VONDRA Alain Cc : libguestfs@redhat.com Objet : Re: [Libguestfs] Virt-v2v conversion issue On Tue, Oct 14, 2014 at 03:34:07PM +0000, VONDRA Alain wrote:
I use qemu-img-rhev-2.1.2-2.el7.x86_64, just some other packages like qemu-2.0.0-1.el7.1.x86_64 are in older versions, but at my knowledge there is no qemu-2.0.0-1.el7.1.x86_64 available ?
What does: rpm -qf /usr/bin/qemu-img /usr/libexec/qemu-kvm say? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html
participants (2)
-
Richard W.M. Jones -
VONDRA Alain