[ovirt-users] [Libguestfs] OVA import of FC21 VM hangs during virt-v2v conversion?

Richard W.M. Jones rjones at redhat.com
Wed Nov 16 18:34:17 UTC 2016


On Wed, Nov 16, 2016 at 11:31:40AM -0500, Derek Atkins wrote:
> > Running `virt-v2v -v -x ...' and observing the output will give you a
> > good idea of what precisely it was doing for those hours.
> 
> Well, as I said in my original email, it was hanging at running setfiles:
>
> commandrvf: stdout=n stderr=y flags=0x0
> commandrvf: setfiles -F -e /sysroot/dev -e /sysroot/proc -e
> /sysroot/selinux -e /sysroot/sys -r /sysroot -q
> /sysroot/etc/selinux/targeted/contexts/files/file_contexts /sysroot/
> Can't stat exclude path "/sysroot/selinux", No such file or directory
> - ignoring.

OK that's interesting.  setfiles is doing SELinux labelling of the
filesystem.  The time taken should be approximately proportional to
the number of files in the filesystem.

What it precisely does is to run the host's /usr/sbin/setfiles command
over the whole guest filesystem, using the guest's
/etc/selinux/targeted/contexts/files/file_contexts to control the
labelling.  So if either of the guest filesystem or the guest's
file_contexts is particularly large, or setfiles has a bug, then it
might take a long time.

> There's no timestamp in the output or logs so it's hard to tell exactly
> what happens when or how long each step takes.  For example, I wouldn't
> know how long the setfiles step takes unless I sit there for hours
> watching to see when it completes.  Is there some way to add timestamps to
> each output line?

Run it through the annotate-output program.
https://linux.die.net/man/1/annotate-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



More information about the Users mailing list