[ovirt-users] VMs imported from libvirt have no cdrom device

Arik Hadas ahadas at redhat.com
Sun Mar 5 12:28:13 UTC 2017


On Sun, Mar 5, 2017 at 1:17 PM, Chris Boot <bootc at bootc.net> wrote:

> Hi,
>
> 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 (but some did) because I just added one as I needed to.
>
> 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. I can't see any way to get oVirt to re-create the missing
> device.
>
> Is there a way for me to add these missing devices to my VMs?
>

Unfortunately there is no supported way of doing that. In oVirt, we add a
cd-rom device for every VM during its creation and don't enable to add or
remove a cd-rom. If no cd-rom device is added by default during import from
libvirt then that's a bug, could you please file a bug on that (
https://bugzilla.redhat.com) ?

However, you can resolve it in a hacky way by modifying the database
directly:

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', '');


>
> I'm running oVirt 4.1 on CentOS 7.3.1611 with a hosted engine setup. VMs
> were migrated from a Debian Stretch machine running libvirt 3.0.0 with
> qemu 2.8.0.
>
> Thanks,
> Chris
>
> --
> Chris Boot
> bootc at bootc.net
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170305/1005870a/attachment.html>


More information about the Users mailing list