Bug 1576675

Summary: RHV import fails if VM has an unreachable floppy defined
Product: Red Hat Enterprise Virtualization Manager Reporter: RHV bug bot <rhv-bugzilla-bot>
Component: vdsmAssignee: Tomáš Golembiovský <tgolembi>
Status: CLOSED ERRATA QA Contact: Nisim Simsolo <nsimsolo>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.1.11CC: lsurette, michal.skrivanek, nsimsolo, srevivo, trichard, ycui, ykaul
Target Milestone: ovirt-4.2.4Keywords: Rebase, ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.20.28-1 Doc Type: Bug Fix
Doc Text:
Previously, when a virtual machine selected for import contained a floppy, it could prevent the virtual machine from being imported. This is now fixed and floppy drives are ignored during import.
Story Points: ---
Clone Of: 1575777 Environment:
Last Closed: 2018-06-27 10:02:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1575777    
Bug Blocks:    

Description RHV bug bot 2018-05-10 06:37:12 UTC
+++ 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)

Comment 2 RHV bug bot 2018-05-10 06:37:21 UTC
please also check the new wrapper

(Originally by michal.skrivanek)

Comment 4 RHV bug bot 2018-05-10 06:37:24 UTC
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)

Comment 6 Nisim Simsolo 2018-06-04 09:08:36 UTC
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.

Comment 8 errata-xmlrpc 2018-06-27 10:02:46 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.

https://access.redhat.com/errata/RHEA-2018:2072

Comment 9 Franta Kust 2019-05-16 13:05:29 UTC
BZ<2>Jira Resync

Comment 10 Daniel Gur 2019-08-28 13:12:52 UTC
sync2jira

Comment 11 Daniel Gur 2019-08-28 13:17:05 UTC
sync2jira