Bug 1239053
Summary: | virt-v2v error reporting when grub.conf cannot be parsed by Augeas | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Dominic Cleal <dcleal> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 7.2 | CC: | dgross, juzhou, mzhan, ptoscano, rjones, tzheng, virt-bugs, xiaodwan |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | V2V | ||
Fixed In Version: | libguestfs-1.28.1-1.44.el7 | Doc Type: | Bug Fix |
Doc Text: |
Cause: Customer had an incorrect grub configuration, but the virt-v2v error message did not explain this well.
Consequence: Conversion of the guest failed, but with a less than helpful error message.
Fix: The error message has been improved.
Result: Conversion will still fail with an error, but the error message is actionable now.
|
Story Points: | --- |
Clone Of: | 1219216 | Environment: | |
Last Closed: | 2015-11-19 07:02:17 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: |
Description
Dominic Cleal
2015-07-03 11:43:44 UTC
To try to reproduce this with new virt-v2v: $ virt-builder centos-6 $ guestfish -a centos-6.img -i ><fs> vi /boot/grub/grub.conf # After editing the serial and terminal lines, the file looks like below: ><fs> cat /boot/grub/grub.conf [...comments...] serial -unit=0 -speed=115200 terminal -timeout=10 serial console default=0 timeout=5 title CentOS 6 (2.6.32-504.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-504.el6.x86_64 ro [...etc...] initrd /initramfs-2.6.32-504.el6.x86_64.img ><fs> exit $ virt-v2v --version virt-v2v 1.29.48fedora=23,release=1.fc23,libvirt $ virt-v2v -i disk centos-6.img -o null [ 0.0] Opening the source -i disk centos-6.img [ 0.1] Creating an overlay to protect the source from being modified [ 0.3] Opening the overlay [ 15.9] Initializing the target -o null [ 15.9] Inspecting the overlay [ 20.3] Checking for sufficient free disk space in the guest [ 20.3] Estimating space required on target for each disk [ 20.3] Converting CentOS release 6.6 (Final) to run on KVM virt-v2v: error: libguestfs error: aug_get: no matching node Upstream fix: https://github.com/libguestfs/libguestfs/commit/659d56db3cc4333e7410cac6720c20b3b7fa66ad Note that after applying this fix, conversion will still fail (which it should do - the grub configuration of the guest is incorrect). However the error message changes to be more explanatory: $ virt-v2v -i disk centos-6.img -o null [ 0.0] Opening the source -i disk centos-6.img [ 0.3] Creating an overlay to protect the source from being modified [ 0.4] Opening the overlay [ 46.8] Initializing the target -o null [ 46.8] Inspecting the overlay [ 51.5] Checking for sufficient free disk space in the guest [ 51.5] Estimating space required on target for each disk [ 51.5] Converting CentOS release 6.6 (Final) to run on KVM virt-v2v: error: no kernels were found in the grub configuration. This probably indicates that virt-v2v was unable to parse the grub configuration of this guest. I can reproduce this issue with package version: libguestfs-1.28.1-1.43.el7.x86_64 libvirt-1.2.17-1.el7.x86_64 virt-v2v-1.28.1-1.43.el7.x86_64 Steps: 1. Prepare a health guest, then add serial and terminal lines to grub.conf file: # cat /boot/grub/grub.conf serial -unit=0 -speed=115200 terminal -timeout=10 serial console default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux 6 (2.6.32-570.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-570.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-570.el6.x86_64.img 2. Convert this guest to rhevm target: # virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/iscsi_export --network rhevm rhel6.7-snap5 -on rhel6.7-snap5-test [ 0.0] Opening the source -i libvirt rhel6.7-snap5 [ 0.0] Creating an overlay to protect the source from being modified [ 0.0] Opening the overlay [ 95.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/iscsi_export virt-v2v: warning: cannot write files to the NFS server as 36:36, even though we appear to be running as root. This probably means the NFS client or idmapd is not configured properly. You will have to chown the files that virt-v2v creates after the run, otherwise RHEV-M will not be able to import the VM. [ 95.0] Inspecting the overlay [ 107.0] Checking for sufficient free disk space in the guest [ 107.0] Estimating space required on target for each disk [ 107.0] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM virt-v2v: error: libguestfs error: aug_get: no matching node If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Then try to verify with new build: libvirt-1.2.17-1.el7.x86_64 libguestfs-1.28.1-1.44.el7.x86_64 virt-v2v-1.28.1-1.44.el7.x86_64 Steps: # virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/iscsi_export --network rhevm rhel6.7-snap5 -on rhel6.7-snap5-test [ 0.0] Opening the source -i libvirt rhel6.7-snap5 [ 0.0] Creating an overlay to protect the source from being modified [ 0.0] Opening the overlay [ 92.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/iscsi_export virt-v2v: warning: cannot write files to the NFS server as 36:36, even though we appear to be running as root. This probably means the NFS client or idmapd is not configured properly. You will have to chown the files that virt-v2v creates after the run, otherwise RHEV-M will not be able to import the VM. [ 92.0] Inspecting the overlay [ 101.0] Checking for sufficient free disk space in the guest [ 101.0] Estimating space required on target for each disk [ 101.0] Converting Red Hat Enterprise Linux Server release 6.7 Beta (Santiago) to run on KVM virt-v2v: error: no kernels were found in the grub configuration. This probably indicates that virt-v2v was unable to parse the grub configuration of this guest. If reporting bugs, run virt-v2v with debugging enabled and include the complete output: virt-v2v -v -x [...] Result: Error message is clear, so move this bug from ON_QA to VERIFIED. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2183.html |