Bug 1429246 - VMs imported from libvirt have no cdrom device
Summary: VMs imported from libvirt have no cdrom device
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: General
Version: 4.1.0.3
Hardware: Unspecified
OS: Linux
medium
low
Target Milestone: ovirt-4.2.2
: 4.2.1.2
Assignee: Shmuel Melamud
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-05 21:51 UTC by Chris Boot
Modified: 2018-04-27 07:22 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.2.1.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-27 07:22:33 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 86379 0 master MERGED v2v: KVM: Add missing CD-ROM device 2018-01-16 19:58:10 UTC
oVirt gerrit 86476 0 ovirt-engine-4.1 ABANDONED v2v: KVM: Add missing CD-ROM device 2018-01-17 14:04:57 UTC

Description Chris Boot 2017-03-05 21:51:23 UTC
Description of problem:

I've imported a number of VMs that I previously was running under a
self-hosted libvirt configuration. Most of the VMs at the source did not
have a cdrom device (though some did) because I just added one as required.

Now that the VMs have been imported into oVirt, none of them have a
cdrom device. Even booting with the "Attach CD" option doesn't create a
cdrom device.

Version-Release number of selected component (if applicable):

4.1.0.3-1.el7.centos

How reproducible:

None of the VMs from this source have a cdrom device after import. I have not tried importing from other sources.

Steps to Reproduce:
1. Set up a libvirt provider.
2. Import a VM from it.

Actual results:
No cdrom device in the "Vm Devices" tab.

Expected results:
There should be a cdrom device listed.

Additional info:

The source libvirt system is running Debian Stretch with libvirt 3.0.0 and qemu 2.8.0.

I discussed this briefly on ovirt-users. The thread starts with Message-ID: <85be3a0e-7940-1923-c2ca-b05f67f3d667>

The workaround discussed works:

insert into vm_device (device_id, vm_id, type, device, is_managed, is_plugged, is_readonly, address) values (uuid_generate_v1(), (select vm_guid from vm_static where vm_name='your-vm-name'), 'disk', 'cdrom', 't', 't', 't', '');

Comment 1 Shmuel Melamud 2018-01-31 15:56:24 UTC
Yaniv, the fix is in 4.2 already.

Comment 2 Nisim Simsolo 2018-04-26 11:10:22 UTC
Verification version:
rhvm-4.2.3.2-0.1.el7
vdsm-4.20.26-1.el7ev.x86_64
libvirt-client-3.9.0-14.el7_5.2.x86_64
qemu-kvm-rhev-2.10.0-21.el7_5.2.x86_64
sanlock-3.6.0-1.el7.x86_64

Verification scenario:
1. Prepare KVM environment with RHEL7 VM and CDROM with SATA disk bus. Attach ISO file to cdrom.
2. From RHV environment, Import RHEL 7 VM from KVM env.
3. Verify import succeeded. 
- Browse Webadmin -> Compute -> VMs -> Click on imported VM -> VM devices: Verify CDROM device is listed as plugged and managed.
- Run imported VM, attach ISO file to VM CD, open VM console and verify CD is attached with ISO file.
4. Repeat steps 1-3 for RHEL7 VM with IDE CDROM.
5. Repeat stpes 1-3 for RHEL 7 with iSCSI CDROM.
6. Repeat steps 1-3 for Windows VM with SATA CDROM.
7. cross effect test, import VM from VMware with CD and verify CD device exist after import (steps 3 expected results).

Comment 3 Sandro Bonazzola 2018-04-27 07:22:33 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, 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.