Created attachment 959252 [details] detail debug info for virt-v2v Description of problem: File "/boot/grub2/device.map" showing is not right after converting a rhel7 guest from esx server Version-Release number of selected component (if applicable): libguestfs-1.28.1-1.12.el7.x86_64 virt-v2v-1.28.1-1.12.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. Install a rhel7 guest on esx with standard partitios. # fdisk -l Disk /dev/sda: 8589 MB, 8589934592 bytes, 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0006eaaa Device Boot Start End Blocks Id System /dev/sda1 * 2048 14338047 7168000 83 Linux /dev/sda2 14338048 16386047 1024000 82 Linux swap / Solaris # cat /boot/grub2/device.map # this device map was generated by anaconda (hd0) /dev/sda (hd1) /dev/sda 2. Use virt-v2v convert this guest to kvm. # virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 --password-file password rhel7-juzhou-standard [ 0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 rhel7-juzhou-standard [ 1.0] Creating an overlay to protect the source from being modified [ 2.0] Opening the overlay [ 10.0] Initializing the target -o libvirt -os default [ 10.0] Inspecting the overlay [ 65.0] Checking for sufficient free disk space in the guest [ 65.0] Estimating space required on target for each disk [ 65.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 449.0] Mapping filesystem data to avoid copying unused and blank areas [ 451.0] Closing the overlay [ 451.0] Copying disk 1/1 to /var/lib/libvirt/images/rhel7-juzhou-standard-sda (raw) (100.00/100%) [ 712.0] Creating output metadata Pool default refreshed Domain rhel7-juzhou-standard defined from /tmp/v2vlibvirt19f760.xml [ 713.0] Finishing off 3. After conversion, boot up guest and check: # fdisk -l Disk /dev/vda: 8589 MB, 8589934592 bytes, 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0006eaaa Device Boot Start End Blocks Id System /dev/vda1 * 2048 14338047 7168000 83 Linux /dev/vda2 14338048 16386047 1024000 82 Linux swap / Solaris # cat /boot/grub2/device.map # this device map was generated by anaconda (hd0) /dev/sda (hd1) /dev/sda Actual results: As $step3. Expected results: # cat /boot/grub2/device.map # this device map was generated by anaconda (hd0) /dev/vda (hd1) /dev/vda Additional info: 1. Will attach detail debug info. 2. Can also reproduce this issue with lvm partition.
Upstream fix: https://github.com/libguestfs/libguestfs/commit/7b8c6e762e10033b174f8554145d48489718b8b5
Try to verify with new build: libguestfs-1.28.1-1.13.el7.x86_64 virt-v2v-1.28.1-1.13.el7.x86_64 steps: Test with same guest: 1. # virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 --password-file password rhel7-juzhou-standard [ 0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 rhel7-juzhou-standard [ 1.0] Creating an overlay to protect the source from being modified [ 2.0] Opening the overlay [ 10.0] Initializing the target -o libvirt -os default [ 10.0] Inspecting the overlay [ 67.0] Checking for sufficient free disk space in the guest [ 67.0] Estimating space required on target for each disk [ 67.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 447.0] Mapping filesystem data to avoid copying unused and blank areas [ 450.0] Closing the overlay [ 450.0] Copying disk 1/1 to /var/lib/libvirt/images/rhel7-juzhou-standard-sda (raw) (100.00/100%) [ 693.0] Creating output metadata Pool default refreshed Domain rhel7-juzhou-standard defined from /tmp/v2vlibvirt4ec70f.xml [ 693.0] Finishing off 2. After conversion, boot up guest and check: # fdisk -l Disk /dev/vda: 8589 MB, 8589934592 bytes, 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0006eaaa Device Boot Start End Blocks Id System /dev/vda1 * 2048 14338047 7168000 83 Linux /dev/vda2 14338048 16386047 1024000 82 Linux swap / Solaris # cat /boot/grub2/device.map # this device map was generated by anaconda (hd0) /dev/sda (hd1) /dev/sda Result: File /boot/grub2/device.map content doesn't remap to /dev/vda. 3. I will attach the detail log message. 4. And i always tried with other rhel7 guest on esx server, but get the same result. Seen above steps, move this bug from ON_QA to ASSIGNED.
Created attachment 959541 [details] virt-v2v -v -x log
Ah .. this needs an Augeas fix too :-(
I'm putting this back to ON_QA since all you need to do is to update the dependent Augeas package. No change will be required in virt-v2v.
This bug is ready for retesting. Make sure you have augeas >= 1.1.0-17.el7.x86_64 libguestfs >= 1.28.1-1.13.el7
Try to verify this bug with new build: libguestfs-1.28.1-1.14.el7.x86_64 virt-v2v-1.28.1-1.14.el7.x86_64 augeas-1.1.0-17.el7.x86_64 steps: Test with same guest: 1. # virt-v2v -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 --password-file password rhel7-juzhou-standard [ 0.0] Opening the source -i libvirt -ic vpx://root.111.25/tzheng-demo/10.66.106.63/?no_verify=1 rhel7-juzhou-standard [ 3.0] Creating an overlay to protect the source from being modified [ 33.0] Opening the overlay [ 43.0] Initializing the target -o libvirt -os default [ 43.0] Inspecting the overlay [ 98.0] Checking for sufficient free disk space in the guest [ 98.0] Estimating space required on target for each disk [ 98.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM virt-v2v: This guest has virtio drivers installed. [ 506.0] Mapping filesystem data to avoid copying unused and blank areas [ 510.0] Closing the overlay [ 510.0] Copying disk 1/1 to /var/lib/libvirt/images/rhel7-juzhou-standard-sda (raw) (100.00/100%) [ 761.0] Creating output metadata Pool default refreshed Domain rhel7-juzhou-standard defined from /tmp/v2vlibvirt5bd12d.xml [ 767.0] Finishing off 2. After conversion, boot up guest and check: # fdisk -l Disk /dev/vda: 8589 MB, 8589934592 bytes, 16777216 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0006eaaa Device Boot Start End Blocks Id System /dev/vda1 * 2048 14338047 7168000 83 Linux /dev/vda2 14338048 16386047 1024000 82 Linux swap / Solaris # cat /boot/grub2/device.map # this device map was generated by anaconda (hd0) /dev/vda (hd1) /dev/vda Result: File /boot/grub2/device.map content has been remaped to /dev/vda. 3. Also test with rhel7 guest with lvm partitions, get the same result with step2. so changed 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-0303.html