Bug 816922

Summary: p2v display not disk device under fixed storage and cause can not convert.
Product: Red Hat Enterprise Linux 6 Reporter: Daisy Wu <jwu>
Component: virt-p2vAssignee: Matthew Booth <mbooth>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: dyasny, gkong, jwu, mzhan, rjones, rwu, syeghiay, tzheng, yupzhang, zpeng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-p2v-0.8.6-4.20120427.1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 15:09:49 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 Daisy Wu 2012-04-27 10:12:03 UTC
Description of problem:
Convert a machine with LSI-megaraid_sas, the p2v will display three fixed storage-> sda sdb sdc, all of the storage are checked by default. If convert all, p2v will pop up:virt-p2v has shutdown unexpectedly. If unchecked sdb sdc, convert will successfully. Only sda is the disk device.

Version-Release number of selected component (if applicable):
virt-v2v-0.8.7-5.el6.x86_64
rubygem-virt-p2v-0.8.6-3.el6

How reproducible:
always

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

2. Install rhel6.2-i386 on machine with LSI-megaraid_sas.
login the os to check disk info:
[root@intel-e5530-8-2 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.7G  2.1G  5.3G  28% /
tmpfs                 3.9G  260K  3.9G   1% /dev/shm

[root@intel-e5530-8-2 ~]# fdisk -l

Disk /dev/sda: 598.9 GB, 598879502336 bytes
251 heads, 63 sectors/track, 73969 cylinders
Units = cylinders of 15813 * 512 = 8096256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005dca0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1037     8192000   83  Linux

[root@intel-e5530-8-2 ~]# ll /dev/sd*
brw-rw----. 1 root disk 8,  0 Apr 27 05:13 /dev/sda
brw-rw----. 1 root disk 8,  1 Apr 27 05:13 /dev/sda1
brw-rw----. 1 root disk 8, 16 Apr 27 05:13 /dev/sdb
brw-rw----. 1 root disk 8, 32 Apr 27 05:13 /dev/sdc

3. Boot the source machine with virt-p2v from pxe,input the ip and password of conversion
server, try to convert it to libvirt or rhevm. p2v will display three fixed storage-> sda sdb sdc, all of the storage are checked by default. But only sda is the disk device from step2 check result.

4. Click convert button. 


Actual Results:
p2v will pop up:virt-p2v has shutdown unexpectedly.


Expected Results:
1. If p2v do not support sdb and sdc, should pop up some relative info.
2. sdb and sdc should not display on p2v screen, due to it is not the disk device and fdisk -l does not display them.


Additional info:
If unchecked sdb sdc, convert will successfully.
sdb is a USB device.
sdc is a virtual floppy drive.
under debug shell:
#blockdev --getsize64 /dev/sdb
/dev/sdb: No medium found

virt-p2v.log as follows:
/dev/sdc: No medium found
/usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:138:in `Integer': invalid value for Integer: ""
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:138:in `disk'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:72:in `convert'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:178:in `call'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:178:in `iterate'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:74:in `convert'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:174:in `call'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/converter.rb:174:in `iterate'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/connection.rb:143:in `call'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/connection.rb:143:in `metadata'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:44:in `call'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:44:in `main_with_queue'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:43:in `each'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:43:in `main_with_queue'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:42:in `synchronize'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:42:in `main_with_queue'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:50:in `call'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:50:in `main'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/gtk-queue.rb:50:in `main_with_queue'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/lib/virt-p2v/ui/main.rb:54:in `main_loop'
         from /usr/lib/ruby/gems/1.8/gems/virt-p2v-0.8.6/bin/virt-p2v:56
         from /usr/bin/virt-p2v:19:in `load'
         from /usr/bin/virt-p2v:19

# cat virt-p2v-server.1335501890.log
virt-v2v: Client closed connection unexpectedly.

Comment 2 Matthew Booth 2012-04-27 14:08:33 UTC
LSI megaraid was a red herring here. The issue was actually the virtual media presented to the server by the Dell iDRAC. This is fixed upstream in commits 4f77d4db04ba66e89b41585020cf1591e10e7771 and fa10746132a63333a1eb5e2c0198ba490a5aba56.

Comment 7 Daisy Wu 2012-05-03 08:07:05 UTC
Verified this bug on build virt-p2v-0.8.6-4.20120427.1.el6

steps
1. Download the virt-p2v iso from brewweb.
2. Install rhel6.2-i386 on machine with LSI-megaraid_sas.
login the os to check disk info:
[root@intel-e5530-8-2 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.7G  2.1G  5.3G  28% /
tmpfs                 3.9G  260K  3.9G   1% /dev/shm

[root@intel-e5530-8-2 ~]# fdisk -l

Disk /dev/sda: 598.9 GB, 598879502336 bytes
251 heads, 63 sectors/track, 73969 cylinders
Units = cylinders of 15813 * 512 = 8096256 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0005dca0

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1037     8192000   83  Linux

[root@intel-e5530-8-2 ~]# ll /dev/sd*
brw-rw----. 1 root disk 8,  0 Apr 27 05:13 /dev/sda
brw-rw----. 1 root disk 8,  1 Apr 27 05:13 /dev/sda1
brw-rw----. 1 root disk 8, 16 Apr 27 05:13 /dev/sdb
brw-rw----. 1 root disk 8, 32 Apr 27 05:13 /dev/sdc

3. Boot the source machine with virt-p2v from pxe,input the ip and password of
conversion server, try to convert it to libvirt or rhevm. p2v only display sda under fixed storage item and checked by default. 

4. Click convert button. 

5. Source machine can be converted successfully.

Changed the status to verified.

Comment 8 errata-xmlrpc 2012-06-20 15:09:49 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/RHEA-2012-0965.html