Bug 1375405

Summary: virt-v2v: Can't stat exclude path "/sysroot/selinux", No such file or directory
Product: Red Hat Enterprise Linux 7 Reporter: laitao <laitao>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: laitao, ptoscano
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-14 09:34:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description laitao 2016-09-13 03:09:10 UTC
Description of problem:

Although the virt-v2v convert the rhel7.2 to qcow seems to success, there are some error appeal.And in the openstack,the qcow2 convert to instance failed(can not ping or ssh it,but rhel6.2、centos6.5 and windows successed), 

environment:

virt-v2v-1.32.7-1.el7.x86_64

libguestfs-1.32.7-1.el7.x86_64

get them from yum : http://people.redhat.com/~rjones/libguestfs-RHEL-7.3-preview

source os: rhe17.2


dug command:$ virt-v2v  -v -x -i ova /usr/BXTT1V10217/BXTT1V10217 -o local -os /var/tmp -of qcow2
...
guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
guestfsd: main_loop: new request, len 0xe4
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /dev /sysroot/dev
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /dev/pts /sysroot/dev/pts
mount: mount point /sysroot/dev/pts does not exist
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /proc /sysroot/proc
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /sys/fs/selinux /sysroot/selinux
mount: mount point /sysroot/selinux does not exist
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /sys /sysroot/sys
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: mount --bind /sys/fs/selinux /sysroot/sys/fs/selinux
mount: mount point /sysroot/sys/fs/selinux does not exist
renaming /sysroot/etc/resolv.conf to /sysroot/etc/3s0p5gls
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: cp /etc/resolv.conf /sysroot/etc/resolv.conf
commandrvf: stdout=y stderr=y flags=0x40000
commandrvf: /sbin/dracut --verbose --add-drivers "virtio virtio_ring virtio_blk                     virtio_net virtio_pci" /boot/initramfs-3.10.0-327.el7.x86_64.img 3.10.0-327.el7.                    x86_64
No '/dev/log' or 'logger' included for syslog logging
[  126.210646] dracut[836] No '/dev/log' or 'logger' included for syslog logging
Executing: /sbin/dracut --verbose --add-drivers "virtio virtio_ring virtio_blk v                    irtio_net virtio_pci" /boot/initramfs-3.10.0-327.el7.x86_64.img 3.10.0-327.el7.x                    86_64
[  127.566401] dracut[836] Executing: /sbin/dracut --verbose --add-drivers "virt                    io virtio_ring virtio_blk virtio_net virtio_pci" /boot/initramfs-3.10.0-327.el7.                    x86_64.img 3.10.0-327.el7.x86_64
dracut module 'busybox' will not be installed, because command 'busybox' could n                    ot be found!
[  140.300976] dracut[836] dracut module 'busybox' will not be installed, becaus                    e command 'busybox' could not be found!
dracut module 'nbd' will not be installed, because command 'nbd-client' could no                    t be found!
[  154.554351] dracut[836] dracut module 'nbd' will not be installed, because co                    mmand 'nbd-client' could not be found!
dracut module 'busybox' will not be installed, because command 'busybox' could n                    ot be found!
[  156.798240] dracut[836] dracut module 'busybox' will not be installed, becaus                    e command 'busybox' could not be found!
dracut module 'nbd' will not be installed, because command 'nbd-client' could no                    t be found!
[  168.079568] dracut[836] dracut module 'nbd' will not be installed, because co                    mmand 'nbd-client' could not be found!
*** Including module: bash ***
[  172.867470] dracut[836] *** Including module: bash ***
*** Including module: nss-softokn ***
[  173.301825] dracut[836] *** Including module: nss-softokn ***
*** Including module: i18n ***
[  173.806310] dracut[836] *** Including module: i18n ***
*** Including module: network ***
[  178.476170] dracut[836] *** Including module: network ***
*** Including module: ifcfg ***
[  212.421808] dracut[836] *** Including module: ifcfg ***
*** Including module: drm ***
[  212.747491] dracut[836] *** Including module: drm ***
*** Including module: plymouth ***
[  235.337421] dracut[836] *** Including module: plymouth ***
*** Including module: dm ***
[  307.659157] dracut[836] *** Including module: dm ***
Skipping udev rule: 64-device-mapper.rules
[  312.095946] dracut[836] Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 60-persistent-storage-dm.rules
[  312.125919] dracut[836] Skipping udev rule: 60-persistent-storage-dm.rules
Skipping udev rule: 55-dm.rules
[  312.153663] dracut[836] Skipping udev rule: 55-dm.rules
*** Including module: kernel-modules ***
[  321.592971] dracut[836] *** Including module: kernel-modules ***
*** Including module: lvm ***
[  452.388186] dracut[836] *** Including module: lvm ***
Skipping udev rule: 64-device-mapper.rules
[  456.962711] dracut[836] Skipping udev rule: 64-device-mapper.rules
Skipping udev rule: 56-lvm.rules
[  456.984973] dracut[836] Skipping udev rule: 56-lvm.rules
Skipping udev rule: 60-persistent-storage-lvm.rules
[  457.007384] dracut[836] Skipping udev rule: 60-persistent-storage-lvm.rules
*** Including module: qemu ***
[  458.645559] dracut[836] *** Including module: qemu ***
*** Including module: qemu-net ***
[  458.798823] dracut[836] *** Including module: qemu-net ***
*** Including module: fcoe ***
[  458.924790] dracut[836] *** Including module: fcoe ***
*** Including module: rootfs-block ***
[  462.338950] dracut[836] *** Including module: rootfs-block ***
*** Including module: terminfo ***
[  463.214926] dracut[836] *** Including module: terminfo ***
*** Including module: udev-rules ***
[  464.155507] dracut[836] *** Including module: udev-rules ***
Skipping udev rule: 91-permissions.rules
[  485.126432] dracut[836] Skipping udev rule: 91-permissions.rules
*** Including module: biosdevname ***
[  486.101766] dracut[836] *** Including module: biosdevname ***
*** Including module: systemd ***
[  486.992550] dracut[836] *** Including module: systemd ***
*** Including module: usrmount ***
[  506.058851] dracut[836] *** Including module: usrmount ***
*** Including module: base ***
[  506.126864] dracut[836] *** Including module: base ***
*** Including module: fs-lib ***
[  509.376392] dracut[836] *** Including module: fs-lib ***
*** Including module: shutdown ***
[  510.731262] dracut[836] *** Including module: shutdown ***
*** Including modules done ***
[  516.320663] dracut[836] *** Including modules done ***
*** Installing kernel module dependencies and firmware ***
[  519.389202] dracut[836] *** Installing kernel module dependencies and firmwar                    e ***
*** Installing kernel module dependencies and firmware done ***
[  530.947136] dracut[836] *** Installing kernel module dependencies and firmwar                    e done ***
*** Resolving executable dependencies ***
[  531.678490] dracut[836] *** Resolving executable dependencies ***
*** Resolving executable dependencies done***
[  613.470898] dracut[836] *** Resolving executable dependencies done***
*** Hardlinking files ***
[  615.454695] dracut[836] *** Hardlinking files ***
*** Hardlinking files done ***
[  615.966952] dracut[836] *** Hardlinking files done ***
*** Stripping files ***
[  616.006928] dracut[836] *** Stripping files ***
*** Stripping files done ***
[  626.311894] dracut[836] *** Stripping files done ***
*** Generating early-microcode cpio image ***
[  626.349547] dracut[836] *** Generating early-microcode cpio image ***
*** Store current command line parameters ***
[  626.857651] dracut[836] *** Store current command line parameters ***
*** Creating image file ***
[  626.985938] dracut[836] *** Creating image file ***
*** Creating image file done ***
[  712.581443] dracut[836] *** Creating image file done ***
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: umount /sysroot/sys
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: umount /sysroot/proc
commandrvf: stdout=n stderr=n flags=0x0
commandrvf: umount /sysroot/dev
renaming /sysroot/etc/3s0p5gls to /sysroot/etc/resolv.conf
libguestfs: trace: v2v: command = ""
libguestfs: trace: v2v: is_file "/usr/sbin/load_policy" "followsymlinks:true"
guestfsd: main_loop: proc 50 (command) took 670.99 seconds
guestfsd: main_loop: new request, len 0x48
libguestfs: trace: v2v: is_file = 1
libguestfs: trace: v2v: is_file "/etc/selinux/config" "followsymlinks:true"
guestfsd: main_loop: proc 37 (is_file) took 0.01 seconds
guestfsd: main_loop: new request, len 0x44
libguestfs: trace: v2v: is_file = 1
libguestfs: trace: v2v: feature_available "selinuxrelabel"
libguestfs: trace: v2v: internal_feature_available "selinuxrelabel"
guestfsd: main_loop: proc 37 (is_file) took 0.00 seconds
guestfsd: main_loop: new request, len 0x3c
libguestfs: trace: v2v: internal_feature_available = 0
libguestfs: trace: v2v: feature_available = 1
libguestfs: trace: v2v: aug_init "/" 48
guestfsd: main_loop: proc 458 (internal_feature_available) took 0.00 seconds
guestfsd: main_loop: new request, len 0x34
libguestfs: trace: v2v: aug_init = 0
libguestfs: trace: v2v: aug_rm "/augeas/load/*["/etc/selinux/config/" !~ regexp(                    '^') + glob(incl) + regexp('/.*')]"
guestfsd: main_loop: proc 16 (aug_init) took 4.32 seconds
guestfsd: main_loop: new request, len 0x80
libguestfs: trace: v2v: aug_rm = 1161
libguestfs: trace: v2v: aug_load
guestfsd: main_loop: proc 22 (aug_rm) took 0.18 seconds
guestfsd: main_loop: new request, len 0x28
guestfsd: main_loop: proc 27 (aug_load) took 0.36 seconds
libguestfs: trace: v2v: aug_load = 0
libguestfs: trace: v2v: aug_match "/augeas/files//error"
guestfsd: main_loop: new request, len 0x40
libguestfs: trace: v2v: aug_match = []
libguestfs: trace: v2v: aug_get "/files/etc/selinux/config/SELINUXTYPE"
guestfsd: main_loop: proc 24 (aug_match) took 0.00 seconds
guestfsd: main_loop: new request, len 0x54
libguestfs: trace: v2v: aug_get = "targeted"
libguestfs: trace: v2v: aug_close
guestfsd: main_loop: proc 19 (aug_get) took 0.00 seconds
guestfsd: main_loop: new request, len 0x28
libguestfs: trace: v2v: aug_close = 0
libguestfs: trace: v2v: selinux_relabel "/etc/selinux/targeted/contexts/files/fi                    le_contexts" "/" "force:true"
guestfsd: main_loop: proc 26 (aug_close) took 0.31 seconds
guestfsd: main_loop: new request, len 0x6c
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_co                    ntexts /sysroot/
Can't stat exclude path "/sysroot/selinux", No such file or directory - ignoring                    .
libguestfs: trace: v2v: selinux_relabel = 0
libguestfs: trace: v2v: rm_f "/.autorelabel"
guestfsd: main_loop: proc 467 (selinux_relabel) took 662.28 seconds
guestfsd: main_loop: new request, len 0x3c
libguestfs: trace: v2v: rm_f = 0
gcaps_block_bus = virtio
gcaps_net_bus = virtio-net
gcaps_video = qxl
gcaps_arch = x86_64
gcaps_acpi = true

Additional info:
I guess maybe the /sysroot/selinux should be exist?

Comment 2 Richard W.M. Jones 2016-09-13 08:52:25 UTC
It appears this is just a warning:

Can't stat exclude path "/sysroot/selinux", No such file or directory - ignoring                    .
libguestfs: trace: v2v: selinux_relabel = 0

The selinux_relabel command returned successfully.

If the conversion failed, please include the *complete*, *unedited*
log from virt-v2v -v -x.

If the conversion is success, then you can close this as it is not a bug.

Comment 3 laitao 2016-09-14 02:27:06 UTC
yes,the conversion is success,the error should be ingored,something wrong with the openstack,and it is fixed.

Comment 4 laitao 2016-09-14 02:31:50 UTC
(In reply to Richard W.M. Jones from comment #2)
> It appears this is just a warning:
> 
> Can't stat exclude path "/sysroot/selinux", No such file or directory -
> ignoring                    .
> libguestfs: trace: v2v: selinux_relabel = 0
> 
> The selinux_relabel command returned successfully.
> 
> If the conversion failed, please include the *complete*, *unedited*
> log from virt-v2v -v -x.
> 
> If the conversion is success, then you can close this as it is not a bug.

thank you,the bug will be closed soon

Comment 5 Richard W.M. Jones 2016-09-14 09:34:56 UTC
Closing per comment 3, comment 4.