Bug 1731259

Summary: virt-v2v fails with "guestfsd error aug_init" when attempting conversion of centos7.6 xen hvm image to kvm
Product: Red Hat Enterprise Linux 7 Reporter: tech
Component: libguestfsAssignee: Pino Toscano <ptoscano>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 7.6CC: jsuchane, mxie, mzhan, ptoscano, rjones, tzheng, xiaodwan, zili
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: V2V
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-03 18:54:57 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:
Embargoed:
Attachments:
Description Flags
debug output requested
none
guestfish output requested none

Description tech 2019-07-18 19:32:43 UTC
Description of problem:
We're trying to do an offline local file Xen VPS to KVM VPS conversion. The source is a dd raw image backup file.  The dd image is from a CentOS 6 Xen hvm host CentOS 7.6 VPS. We're trying to move it to a replacement KVM host (in a later step).

When running virt-v2v on the backup image file it errors with "guestfsd: error: aug_init: / (flags 1): Internal error (please file a bug): get.c:1296:Unexpected lens in concat 80..80"

Version:
[root@virt-v2v ~]# virt-v2v -V
virt-v2v 1.38.2rhel=7,release=12.el7_6.2,libvirt
[root@virt-v2v ~]#

How reproducible:
every run

Steps to reproduce:
1. export LIBGUESTFS_BACKEND=direct
2. virt-v2v -i disk vm6881_backup -o local -os /tmp

Actual results:
errors and exits

Expected results:
completion without a program aborting error

Log snip:
...
libguestfs: trace: v2v: vfs_type = "ext4"
[  51.4] Checking for sufficient free disk space in the guest
[  51.4] Estimating space required on target for each disk
[  51.4] Converting CentOS Linux release 7.6.1810 (Core)  to run on KVM
libguestfs: trace: v2v: aug_init "/" 1
guestfsd: <= aug_init (0x10) request length 52 bytes
guestfsd: error: aug_init: / (flags 1): Internal error (please file a bug): get.c:1296:Unexpected lens in concat 80..80
  Expected: label[/usr/share/augeas/lenses/dist/lvm.aug:61.5-.19:]r
  Actual: star[/usr/share/augeas/lenses/dist/lvm.aug:61.13-.35:]R
libguestfs: trace: v2v: aug_init = -1 (error)
virt-v2v: error: libguestfs error: aug_init: aug_init: / (flags 1):
Internal error (please file a bug): get.c:1296:Unexpected lens in concat
80..80
  Expected: label[/usr/share/augeas/lenses/dist/lvm.aug:61.5-.19:]r
  Actual: star[/usr/share/augeas/lenses/dist/lvm.aug:61.13-.35:]R

If reporting bugs, run virt-v2v with debugging enabled and include the
complete output:

  virt-v2v -v -x [...]
libguestfs: trace: v2v: close
libguestfs: closing guestfs handle 0xe70f40 (state 2)
...

Comment 2 Jaroslav Suchanek 2019-07-19 21:00:30 UTC
Pino, is this for augeas component instead?

Comment 3 Richard W.M. Jones 2019-07-22 09:49:37 UTC
Please run virt-v2v with the -v -x options and attach the complete output to the bug.

Comment 4 tech 2019-07-22 23:10:35 UTC
Created attachment 1592719 [details]
debug output requested

Comment 5 tech 2019-07-22 23:13:22 UTC
Added the debug output requested.

Command ran:
LIBGUESTFS_BACKEND=direct LIBGUESTFS_TRACE=1 LIBGUESTFS_DEBUG=1 virt-v2v -v -x -i disk vm6881_backup -o local -os /tmp

Comment 6 Pino Toscano 2019-07-23 07:23:24 UTC
Hm still the same issue, an internal error in augeas.

From what you said, I take that the host (i.e. where virt-v2v runs) is CentOS 7.6, is that correct?
Which version of augeas is installed there? Please paste the output of `rpm -qa '*augeas*' | sort`

As the input is a local disk, we can try to diagnose this issue a bit more: please run
$ guestfish -v -x --ro -a vm6881_backup -i aug-init / 517
(note that it will take much longer than the virt-v2v invocation you used so far)
and attach here its complete stdout + stderr.

Comment 7 tech 2019-07-25 17:30:05 UTC
Created attachment 1593484 [details]
guestfish output requested

Comment 8 tech 2019-07-25 17:32:39 UTC
Hello,

Guestfish output requested attached.  Yes fully updated CentOS 7.6 test VPS to do the conversion.

[root@test-virtv2v-conversion ~]# rpm -qa '*augeas*' | sort
augeas-libs-1.4.0-6.el7_6.1.x86_64
[root@test-virtv2v-conversion ~]#

Thanks for assist!

Comment 9 Richard W.M. Jones 2019-07-30 09:58:11 UTC
It does seem as if this is genuinely an Augeas bug.  The debug output is:

guestfsd: error: aug_init: / (flags 517): Internal error (please file a bug): get.c:1296:Unexpected lens in concat 80..80
  Expected: label[/usr/share/augeas/lenses/dist/lvm.aug:61.5-.19:]r
  Actual: star[/usr/share/augeas/lenses/dist/lvm.aug:61.13-.35:]R
libguestfs: trace: aug_init = -1 (error)
libguestfs: error: aug_init: aug_init: / (flags 517): Internal error (please file a bug): get.c:1296:Unexpected lens in concat 80..80
  Expected: label[/usr/share/augeas/lenses/dist/lvm.aug:61.5-.19:]r
  Actual: star[/usr/share/augeas/lenses/dist/lvm.aug:61.13-.35:]R

Comment 11 Rick Barry 2020-07-03 18:54:57 UTC
This BZ is being auto-closed as CLOSED/WONTFIX. If this is not appropriate and a fix is critical for RHEL 7, please re-open.

Note that RHEL 7.9 is the last minor release for RHEL 7. Security and critical bug-fixes will continue to be delivered via RHEL 7 batch updates.