Bug 1165975 - File "/boot/grub2/device.map" showing is not right after converting a rhel7 guest from esx server
Summary: File "/boot/grub2/device.map" showing is not right after converting a rhel7 g...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On: 1166582
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-20 07:30 UTC by zhoujunqin
Modified: 2015-03-05 13:47 UTC (History)
6 users (show)

Fixed In Version: libguestfs-1.28.1-1.13.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1166582 (view as bug list)
Environment:
Last Closed: 2015-03-05 13:47:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
detail debug info for virt-v2v (405.99 KB, text/plain)
2014-11-20 07:30 UTC, zhoujunqin
no flags Details
virt-v2v -v -x log (406.40 KB, text/plain)
2014-11-21 05:35 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

Description zhoujunqin 2014-11-20 07:30:08 UTC
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.

Comment 5 zhoujunqin 2014-11-21 05:33:44 UTC
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.

Comment 6 zhoujunqin 2014-11-21 05:35:47 UTC
Created attachment 959541 [details]
virt-v2v -v -x log

Comment 7 Richard W.M. Jones 2014-11-21 09:20:52 UTC
Ah .. this needs an Augeas fix too :-(

Comment 8 Richard W.M. Jones 2014-11-21 09:54:47 UTC
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.

Comment 9 Richard W.M. Jones 2014-11-27 15:14:42 UTC
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

Comment 10 zhoujunqin 2014-11-28 04:34:09 UTC
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.

Comment 12 errata-xmlrpc 2015-03-05 13:47:30 UTC
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


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