Previously, a floppy drive in a virtual machine could prevent the virtual machine from being imported. In the current release, floppy drives are ignored during import.
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
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
Verified_upstream:
ovirt-engine-4.3.0-0.0.master.20181023141116.gitc92ccb5.el7
vdsm-4.30.1-25.gitce9e416.el7.x86_64
libvirt-client-4.5.0-10.el7.x86_64
qemu-kvm-common-ev-2.10.0-21.el7_5.7.1.x86_64
virt-v2v-1.38.2-12.el7.x86_64
Verification scenario:
1. Import KVM VM with unreachable path.
2. Verify VM imported successfully and VM parameters are equal to source VM parameters.. Run VM and verify VM is running properly.
3. Repeat steps 1-2 foe Xen VM.
4. Repeat steps 1-2 for VMware 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/RHBA-2019:1077
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