Bug 1426144 - virt-v2v: trying to import a VM with unreachable cdrom device caused the import to fail with "disk storage error"
Summary: virt-v2v: trying to import a VM with unreachable cdrom device caused the impo...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Tomáš Golembiovský
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks: 1485807
TreeView+ depends on / blocked
 
Reported: 2017-02-23 09:58 UTC by Sharon Gratch
Modified: 2021-03-11 15:52 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Previously when user tried to import VM with CD image that was unreachable the import was not possible. This has been fixed and CD image is now ignored during import.
Clone Of:
: 1485807 (view as bug list)
Environment:
Last Closed: 2017-12-20 11:19:41 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 75055 0 master MERGED v2v: ignore CD-ROM drives 2017-04-11 13:05:34 UTC
oVirt gerrit 81079 0 ovirt-4.1 MERGED v2v: ignore CD-ROM drives 2017-08-29 06:49:35 UTC

Description Sharon Gratch 2017-02-23 09:58:46 UTC
Description of problem:

When trying to import a VM from one of the external providers that has a CDROM device, v2v treats the CDROM as one of the disk devices and therefore tries to reach the source path and if fail then the import fail with error:
File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1125, in _get_disk_info
 vol = conn.storageVolLookupByPath(disk['alias'])
 File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4770, in storageVolLookupByPath
  if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self)
libvirtError: Storage volume not found: no storage vol with matching path
2017-02-22 17:36:11,035 WARN  (jsonrpc/3) [root] Cannot add VM win2k12 due to disk storage error (v2v:1067)

The libvirt xml for such a VM is:
.....
<devices>
   <disk type='file' device='disk'>
      <driver name='file'/>
      ...
   </disk>
   <disk type='file' device='cdrom'>
      <driver name='file'/>
      <source file='/var/lib/libvirt/images/nsimsolo_IS /en_windows_server_2012_x64_dvd_915478.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
   </disk>
....
</devices>

We should decide how to handle CDROM devices in v2v and if to ignore them or not. For that we need to check the "device" property value if it is 'cdrom' or 'disk'.


Version-Release number of selected component (if applicable):
ovirt 4.1 
vdsm Version: 4.19.4

How reproducible:
100%

Steps to Reproduce:
1.run import from an external provider and choose a VM name that has a CDROM device

Actual results:
The VM is skipped in vdsm with the error described above.

Expected results:
If all other disk devices are valid and we decide to ignore the CDROM, then the VM should be imported successfully without the CDROM.

Comment 1 Nisim Simsolo 2017-08-15 10:37:03 UTC
Verified:
ovirt-engine-4.2.0-0.0.master.20170811144920.gita423008.el7.centos
vdsm-4.20.2-64.git072feb0.el7.centos.x86_64
libvirt-client-3.2.0-14.el7_4.2.x86_64
qemu-kvm-rhev-2.9.0-14.el7.x86_64
virt-v2v-1.36.3-6.el7_4.2.x86_64

Verification scenario:
1. Create Vmware VM with attached cdrom.
2. import VM and verify import succeeded (during import verify libvirt.xml is showing cdrom device).
3. Run VM and verify VM is running properly.
4. Repeat steps 1-3 for Xen and KVM environments.

Comment 2 Sandro Bonazzola 2017-12-20 11:19:41 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.