Bug 1152533

Summary: RFE: virt-v2v should do something with <disk device='lun'> (either virtualize it or give an error)
Product: [Community] Virtualization Tools Reporter: tingting zheng <tzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: NEW --- QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: dyuan, juzhou, mxie, mzhan, ptoscano, rjones
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1288337, 1558351    

Description tingting zheng 2014-10-14 11:20:28 UTC
Description
virt-v2v fail to convert guest with virtio lun disk

Version:
libguestfs-1.27.62-1.1.el7.x86_64
virt-v2v-1.27.62-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest with virtio lun disk.
# virsh dumpxml virtio-lun
    <disk type='block' device='lun'>
      <driver name='qemu' type='raw'/>
      <source dev='/dev/sdi'/>
      <target dev='vda' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>

2.Use virt-v2v to convert the above guest.
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/nfs_export -n rhevm virtio-lun
[   0.0] Opening the source -i libvirt virtio-lun
virt-v2v: error: this guest has no non-removable disks

If reporting bugs, run virt-v2v with debugging enabled and include the 
complete output:

  virt-v2v -v -x [...]

Actual results:
virt-v2v fail to convert guest with virtio lun disk

Expected results:
Guest with virtio lun disk can be converted by virt-v2v successfully.

Additional info:

Comment 2 Richard W.M. Jones 2014-10-20 09:47:55 UTC
Since old virt-v2v also ignored type='lun', this is a new
feature so I am moving it to RHEL 7.2.

Comment 5 liuzi 2018-10-24 09:22:31 UTC
I found that if one guest has two different type disks,which with below xml:
  <disk type='file' device='disk'>
  <driver name='qemu' type='raw'/>
  <source file='/var/tmp/esx6.0-rhel7.5-x86_64-sda'/>
  <target dev='vda' bus='virtio'/>
  <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
  </disk>
  <disk type='block' device='lun'>
  <driver name='qemu' type='raw'/>
  <source dev='/dev/disk/by-path/ip-10.73.194.15:3260-iscsi-  iqn.2001-05.com.equallogic:0-8a0906-8771f7d03-573263eebf54d2c2-s1-rwu-v2v-libvirt-lun-0'/>
  <target dev='sda' bus='scsi'/>
  <address type='drive' controller='0' bus='0' target='0' unit='0'/>
  </disk>

Virt-v2v can convert it with no error.But check the new guest xml,I found that only convert one disk.
  <devices>
  <emulator>/usr/libexec/qemu-kvm</emulator>
  <disk type='volume' device='disk'>
  <driver name='qemu' type='raw' cache='none'/>
  <source pool='default' volume='testlun-sda'/>
  <target dev='vda' bus='virtio'/>
  <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
  </disk>

So,should virt-v2v give a warning during the conversion?