Bug 1383048 - RFE: Handle multipath devices converted from physical machines
Summary: RFE: Handle multipath devices converted from physical machines
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-v2v
Version: unspecified
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard: P2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-09 10:46 UTC by mxie@redhat.com
Modified: 2022-05-17 20:29 UTC (History)
6 users (show)

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


Attachments (Terms of Use)
virt-p2v-iscsi-sdb (103.62 KB, application/zip)
2016-10-09 10:46 UTC, mxie@redhat.com
no flags Details
sdb-warning (65.23 KB, image/png)
2016-10-09 10:46 UTC, mxie@redhat.com
no flags Details
virt-p2v-fc-mpatha (119.11 KB, application/zip)
2016-10-09 10:47 UTC, mxie@redhat.com
no flags Details
virt-v2v-guest-sdb.log (655.67 KB, text/plain)
2016-10-09 10:48 UTC, mxie@redhat.com
no flags Details
virt-p2v-guest-sdb (90.23 KB, application/zip)
2016-10-09 10:48 UTC, mxie@redhat.com
no flags Details

Description mxie@redhat.com 2016-10-09 10:46:21 UTC
Created attachment 1208533 [details]
virt-p2v-iscsi-sdb

Description of problem:
Device.map which is /dev/sdb or /dev/mapper/mpatha can't be updated to vda after p2v conversion

Version-Release number of selected component (if applicable):
virt-v2v-1.32.7-3.el7.x86_64
libguestfs-1.32.7-3.el7.x86_64
qemu-kvm-rhev-2.6.0-28.el7.x86_64
libvirt-2.0.0-10.el7.x86_64
virt-p2v-1.32.7-2.el7.x86_64

How reproducible:
100% 

Steps to Reproduce:

Scenario1:

1.There are 1 SATA disk and 2 iscsi storages on the machine, install rhel6.7 on the first iscsi storage which has size 60G

2.Check the disk info after finishing rhel6.7 installation and logging into system

#lsblk
NAME   MAJ:MIN RM   SIZE  RO TYPE MOUNTPOINT
sda     8:0     0 931.5G  0  disk  
sdb     8:16    0  59.9G  0  disk 
└─sdb1  8:17    0  59.9G  0  part /
sdc     8:32    0    19G  0  disk
├─sdc1  8:33    0     1G  0  part 
└─sdc2  8:34    0    18G  0  part 

#cat /boot/grub/device.map
# this device map was generated by anaconda
 (hd0)      /dev/sdb

Result:anaconda writes a correct grub to device.map 

3.Reboot the machine and boot into p2v client

4.Input conversion info for converting this host to rhev by virt-p2v(only select sdb at disk option), but there is virt-v2v warning info "/files/boot/grub/device.map/hd0 references unknown device "sdb".  You may have to fix this entry manually after conversion" during p2v conversion, pls refer to screenshot "sdb-warning"

5.After finishing conversion, import the guest from export domain to data domain and power on the guest

6.Check disk info of guest in rhevm

#lsblk
NAME   MAJ:MIN RM   SIZE  RO TYPE MOUNTPOINT
sr0     11:0    1  1024M  0  rom  
vda    252:0    0  59.9G  0  disk 
└─vda1 252:1    0  59.9G  0  part /

#cat /boot/grub/device.map
# this device map was generated by anaconda
 (hd0)      /dev/sdb

Result:device.map which is /dev/sdb can't be updated to vda after p2v conversion,details pls refer to log "virt-p2v-iscsi-sdb"



Scenario2:

1.FC storage has two roads which are /dev/sda and /dev/sdb

2.Install rhel6.8 on this fc storage

3.After installation, check disk info in host as below

# lsblk
NAME                MAJ:MIN RM SIZE RO TYPE  MOUNTPOINT
sda                   8:0    0  40G  0 disk  
└─mpatha (dm-0)     253:0    0  40G  0 mpath
  └─mpathap1 (dm-1) 253:1    0  40G  0 part  /
sdb                   8:16   0  40G  0 disk  
└─mpatha (dm-0)     253:0    0  40G  0 mpath
  └─mpathap1 (dm-1) 253:1    0  40G  0 part  /

# cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/mapper/mpatha

Result:anaconda writes a correct grub to device.map

4.Using p2v to convert this fc host to rhev, but there is virt-v2v warning "/files/etc/sysconfig/grub/boot references unknown device "mpatha".  You may have to fix this entry manually after conversion" during p2v converting

5.After p2v conversion,check guest's disk info in rhevm,

#lsblk
NAME   MAJ:MIN RM   SIZE  RO TYPE MOUNTPOINT
vda    252:0    0    40G  0  disk 
└─vda1 252:1    0    40G  0  part /
sr0     11:0    1  1024M  0  rom  

#cat /boot/grub/device.map
# this device map was generated by anaconda
 (hd0)     /dev/mapper/mpatha


Result:device.map which is /dev/mapper/mpatha can't be updated to vda after p2v conversion,details pls refer to log "virt-p2v-fc-mpatha"


Actual results:
As above description

Expected results:
Device.map which is /dev/sdb or /dev/mapper/mpatha can be updated to vda after p2v conversion


Additional info:
Device.map which is /dev/sdb can be updated to vda after v2v conversion

Steps:
1.Prepare a guest which has sata disk and scsi disk

2.Install rhel6.8 on scsi disk,check disk info in guest as below:
# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0     11:0    1     1024M  0 rom  
sda      8:0    0       20G  0 disk 
sdb      8:16    0      20G  0 disk 
├─sdb1   8:17    0    18.6G  0 part /
└─sdb2   8:18    0     1.5G  0 part [SWAP]

#cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/sdb


3.Power off the guest and using v2v to convert this guest to rhev, there is no virt-v2v warning about /dev/sdb, details pls refer to log "virt-v2v-guest-sdb"

# virt-v2v -o rhev -os 10.66.4.143:/home/p2v_export rhel6.8-sdb 
[   0.0] Opening the source -i libvirt rhel6.8-sdb
[   0.0] Creating an overlay to protect the source from being modified
[   0.3] Initializing the target -o rhev -os 10.66.4.143:/home/p2v_export
[   1.1] Opening the overlay
[   5.6] Inspecting the overlay
[  10.0] Checking for sufficient free disk space in the guest
[  10.0] Estimating space required on target for each disk
[  10.0] Converting Red Hat Enterprise Linux Server release 6.8 (Santiago) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[  43.3] Mapping filesystem data to avoid copying unused and blank areas
[  43.4] Closing the overlay
[  43.7] Checking if the guest needs BIOS or UEFI to boot
[  43.7] Assigning disks to buses
[  43.7] Copying disk 1/2 to /tmp/v2v.or4EQt/b01c8574-9d77-4c30-b187-a8ba5781f50a/images/0f23234e-abee-468d-89de-806eafa9ca96/d1d94e34-000a-4361-b478-efed08c16f25 (qcow2)
    (100.00/100%)
[  61.0] Copying disk 2/2 to /tmp/v2v.or4EQt/b01c8574-9d77-4c30-b187-a8ba5781f50a/images/aaa1bec3-7e32-4dbf-aa1a-b00bfc8984e0/e654b479-ce7b-4a8b-8b49-9b5a4f6d4e3e (qcow2)
    (100.00/100%)
[  77.3] Creating output metadata
[  77.4] Finishing off

4.Check disk info of guest in rhev after v2v conversion,device.map which is /dev/sdb can be updated to vda,but device.map containing /dev/vdb is different with disk showing "vda "

# lsblk
NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sr0      11:0    1     1024M  0 rom  
vda     252:0    0      20G  0 disk 
├─vda1  252:1    0    18.6G  0 part /
└─vda2  252:2    0     1.5G  0 part [SWAP]
vdb     252:16   0      20G  0 disk


#cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/vdb


5.Try to use p2v to convert this guest, there will be virt-v2v warning about /dev/sdb, pls refer to log "virt-p2v-guest-sdb"

6.After p2v convertsion, check guest's disk info in rhevm,device.map which is /dev/sdb can't be updated to vda after p2v conversion

# lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
vda     252:0    0      20G  0 disk 
├─vda1  252:1    0    18.6G  0 part /
└─vda2  252:2    0     1.5G  0 part [SWAP]
sr0      11:0    1     1024M  0 rom  

#cat /boot/grub/device.map 
# this device map was generated by anaconda
(hd0)     /dev/sdb

Comment 1 mxie@redhat.com 2016-10-09 10:46:57 UTC
Created attachment 1208534 [details]
sdb-warning

Comment 2 mxie@redhat.com 2016-10-09 10:47:29 UTC
Created attachment 1208535 [details]
virt-p2v-fc-mpatha

Comment 3 mxie@redhat.com 2016-10-09 10:48:16 UTC
Created attachment 1208537 [details]
virt-v2v-guest-sdb.log

Comment 4 mxie@redhat.com 2016-10-09 10:48:44 UTC
Created attachment 1208539 [details]
virt-p2v-guest-sdb

Comment 6 Richard W.M. Jones 2017-03-28 14:25:45 UTC
Out of development time for RHEL 7.4.  Moving to RHEL 7.5.

Comment 7 Jaroslav Suchanek 2019-12-04 15:30:17 UTC
This bug will be addressed in next major release.

Comment 10 Richard W.M. Jones 2020-11-10 14:06:51 UTC
After review of RFE bugs we've decided to move these upstream if there
is no attached customer case.


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