Bug 1731259 - virt-v2v fails with "guestfsd error aug_init" when attempting conversion of centos7.6 xen hvm image to kvm
Summary: virt-v2v fails with "guestfsd error aug_init" when attempting conversion of c...
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.6
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Pino Toscano
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-18 19:32 UTC by tech
Modified: 2019-11-26 12:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
debug output requested (459.79 KB, text/plain)
2019-07-22 23:10 UTC, tech
no flags Details
guestfish output requested (78.70 KB, text/plain)
2019-07-25 17:30 UTC, tech
no flags Details

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


Note You need to log in before you can comment on or make changes to this bug.