Bug 808662

Summary: virt-p2v can not convert physical host on MD device
Product: Red Hat Enterprise Linux 6 Reporter: tingting zheng <tzheng>
Component: augeasAssignee: David Lutterkort <lutter>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.3CC: dyasny, hbrock, jwu, lcui, leiwang, mbooth, moli, prc, qguan, qwan, rjones, rwu, yupzhang
Target Milestone: rcKeywords: TestBlocker
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: augeas-0.9.0-3.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 813329 (view as bug list) Environment:
Last Closed: 2012-06-20 15:10:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 813329    
Attachments:
Description Flags
Add the virt-p2v-server-md-error.log none

Description tingting zheng 2012-03-31 05:21:55 UTC
Description of Problem:
virt-p2v can not convert physical host on MD device

Version-Release number of selected component:
virt-v2v-0.8.7-4.el6.x86_64
rubygem-virt-p2v-0.8.6-2.el6

How reproducible:
Always

Step to Reproduce:
1.Download the virt-p2v iso from brewweb.

2.Create MD device /dev/md0 with sda and sdb.

3.Install rhel6 on md0.

4.Use virt-p2v to convert the host on md0,after boot the virt-p2v client UI from pxe,there is only sda and sdb showed in "Fixed Storage" tab.

Actual Results:
There is no md0 showed in "Fixed Storage" tab from virt-p2v client UI.

Expected Results:
md0 should be showed in "Fixed Storage" tab from virt-p2v client UI and virt-p2v support the conversion of physical host on MD device.

Additional info:

Comment 4 Matthew Booth 2012-04-02 09:19:40 UTC
This isn't the way this works: you select both fixed disks individually to be transferred during the conversion process, and the md0 device will be correctly handled at the other end. Can you give this another go?

Comment 5 tingting zheng 2012-04-05 10:54:40 UTC
(In reply to comment #4)
> This isn't the way this works: you select both fixed disks individually to be
> transferred during the conversion process, and the md0 device will be correctly
> handled at the other end. Can you give this another go?


I am tring to use virt-p2v to convert both sda and sdb,as the disks are too large,it will take a long time to finish,now it just finished sda,I will update the result here once it finished.

Comment 6 yuping zhang 2012-04-06 02:53:26 UTC
Converted both disks /dev/sda and /dev/sdb with virt-p2v,then the guest can be booted successful.
Detail info after convert:

1. # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              9.9G  1.8G  7.6G  19% /
tmpfs                 1.8G     0  1.8G   0% /dev/shm

2.# fdisk -l

Disk /dev/vda: 320.1 GB, 320072933376 bytes
64 heads, 32 sectors/track, 305245 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49e2fd2f

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *           2       10241    10485760   fd  Linux raid autodetect

Disk /dev/vdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x333c333c

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1   *           1        1306    10485760   fd  Linux raid autodetect

Disk /dev/md0: 10.7 GB, 10737344512 bytes
2 heads, 4 sectors/track, 2621422 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

3.# lsmod | grep virtio
virtio_balloon          4281  0 
virtio_net             15773  0 
virtio_blk              5692  4 
virtio_pci              6653  0 
virtio_ring             7169  4 virtio_balloon,virtio_net,virtio_blk,virtio_pci
virtio                  4824  4 virtio_balloon,virtio_net,virtio_blk,virtio_pci

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

The md0 only has 10G,but need to convert 640G(vda+vdb) to virt-p2v-server.

Comment 7 tingting zheng 2012-04-11 02:22:35 UTC
Refer to comment 6,when converting physical machine installed on MD device,virt-p2v works by converting all the disks which make up the MD device(eg:sda and sdb),this should be documented.

Comment 8 tingting zheng 2012-04-12 05:53:42 UTC
I tried rhel5 and rhel4 installed on MD device,then use virt-p2v to convert,after transferred the disk image,there is error from virt-p2v client:Invalid server response:mount_options:mount_options:mount_options_stub:/dev/md0:No such file or directory at /usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 203, <> line 7.

Checked the log file,there is error:
/dev/md0: No such file or directory

guestfsd: error: mount_options_stub: /dev/md0: No such file or directory
virt-v2v: mkdtemp: mkdtemp: mkdtemp_stub: you must call 'mount' first to mount the root filesystem at /usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 203, <> line 7.
 at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Config.pm line 235

Comment 9 tingting zheng 2012-04-13 01:58:19 UTC
Created attachment 577204 [details]
Add the virt-p2v-server-md-error.log

Set LIBGUESTFS_TRACE=1 in /usr/bin/virt-p2v-server,attached the virt-p2v log file for converting physical machine installed on MD device.

Comment 10 Matthew Booth 2012-04-17 13:32:42 UTC
The underlying cause seems to be that the mdadm_conf lens is missing from augeas in RHEL 6.

Comment 11 Richard W.M. Jones 2012-04-17 14:08:14 UTC
(dev-acked on the understanding that Matt would do the packaging)

Comment 13 Richard W.M. Jones 2012-04-18 11:34:39 UTC
Note that to use this you will require libguestfs 1.16.19-1.el6
(https://brewweb.devel.redhat.com/buildinfo?buildID=209687)

Comment 14 tingting zheng 2012-05-09 02:37:04 UTC
Verified the bug with:
virt-p2v-0.8.6-5.20120502.1.el6.iso
virt-v2v-0.8.7-6.el6.x86_64
libvirt-0.9.10-16.el6.x86_64
libguestfs-1.16.19-1.el6.x86_64
augeas-0.9.0-3.el6.x86_64

Steps:
1.Download the virt-p2v iso from brewweb.

2.Create MD device /dev/md0 with sda and sdb.

3.Install rhel5 and rhel4 on md0.

4.Use virt-p2v to convert the host on md0,both rhel5 and rhel4 can be converted successfully without these error messages.

So move the bug to VERIFIED.

Comment 17 errata-xmlrpc 2012-06-20 15:10:13 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.

http://rhn.redhat.com/errata/RHBA-2012-0967.html