+++ This bug is a downstream clone. The original bug is: +++ +++ bug 1575777 +++ ====================================================================== Description of problem: Import VM from external provider to RHV fails if the VM has a floppy device defined which is not reachable in RHV destination hypervisor Version-Release number of selected component (if applicable): rhevm-4.1.9.1-0.1.el7 vdsm-4.19.50-1.el7ev virt-v2v-1.36.3-6.el7_4.3 How reproducible: 100% Steps to Reproduce: 1. Have a VM with floppy defined: <disk type='file' device='floppy'> <driver name='qemu' type='raw' cache='none'/> <source file='/iso/XXXX.vfd'/> <target dev='fda' bus='fdc'/> <alias name='fdc0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> 2. Import VM to RHV environment from external provider, in this case it was KVM 3. It fails due to unreachable floppy disk Actual results: VM import fails from external provider to RHV Expected results: VM import should be successful as we can ignore floppy device like we did for CDROM in https://bugzilla.redhat.com/show_bug.cgi?id=1485807 Additional info: ========= vdsm.log ========= ~~~ 2018-04-25 21:24:50,042-0500 ERROR (jsonrpc/4) [root] Error getting disk size (v2v:1089) Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1078, in _get_disk_info vol = conn.storageVolLookupByPath(disk['alias']) File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4555, in storageVolLookupByPath if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self) libvirtError: Storage volume not found: no storage vol with matching path 2018-04-25 21:24:50,043-0500 WARN (jsonrpc/4) [root] Cannot add VM XXXXXXXXXXXX due to disk storage error (v2v:1020) ~~~ ======== KVM XML ======== <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/vm/DISK1.img'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk> <disk type='file' device='disk'> <driver name='qemu' type='raw' cache='none'/> <source file='/vm/DISK2.img'/> <target dev='vdb' bus='virtio'/> <alias name='virtio-disk1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/> </disk> <disk type='file' device='floppy'> <driver name='qemu' type='raw' cache='none'/> <source file='/iso/virtio-win-1.7.1_amd64.vfd'/> <target dev='fda' bus='fdc'/> <alias name='fdc0-0-0'/> <address type='drive' controller='0' bus='0' target='0' unit='0'/> </disk> <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <target dev='hdc' bus='ide'/> <readonly/> <alias name='ide0-1-0'/> <address type='drive' controller='0' bus='1' target='0' unit='0'/> </disk> Workaround is to umount / undefine floppy disk definition from source, then import the VM (Originally by Javier Coscia)
please also check the new wrapper (Originally by michal.skrivanek)
Not sure if I did it right but I've added the "or device == 'floppy'" on lib/vdsm/v2v.py https://gerrit.ovirt.org/#/c/90981/ Although I see there's a 'Merge Conflict' on it, not sure what could be wrong (Originally by Javier Coscia)
Verification version: rhvm-4.2.4.1-0.1.el7 vdsm-4.20.29-1.el7ev.x86_64 libvirt-3.9.0-14.el7_5.5.x86_64 qemu-kvm-rhev-2.10.0-21.el7_5.3.x86_64 virt-v2v-1.36.10-6.10.rhvpreview.el7ev.x86_64 Verification scenario: 1. Add floppy device to KVM environment VM with an unreachable destination in RHV hypervisor. 2. Import VM and verify VM imported succesfully. Verify VM is running. 3. Repeat steps 1-2 for VMware VM. 4. repeat steps 1-2 for Xen VM.
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://access.redhat.com/errata/RHEA-2018:2072
BZ<2>Jira Resync
sync2jira