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

Chris Boot bootc at bootc.net
Sun Mar 5 21:57:04 UTC 2017


On 05/03/2017 12:28, Arik Hadas wrote:
> On Sun, Mar 5, 2017 at 1:17 PM, Chris Boot <bootc at bootc.net
> <mailto: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) ?

Hi Arik,

I've raised it as: https://bugzilla.redhat.com/show_bug.cgi?id=1429246

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

Thanks, that did the trick!

Cheers,
Chris

-- 
Chris Boot
bootc at bootc.net


More information about the Users mailing list