<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Mar 5, 2017 at 1:17 PM, Chris Boot <span dir="ltr">&lt;<a href="mailto:bootc@bootc.net" target="_blank">bootc@bootc.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi,<br>
<br>
I&#39;ve imported a number of VMs that I previously was running under a<br>
self-hosted libvirt configuration. Most of the VMs at the source did not<br>
have a cdrom device (but some did) because I just added one as I needed to.<br>
<br>
Now that the VMs have been imported into oVirt, none of them have a<br>
cdrom device. Even booting with the &quot;Attach CD&quot; option doesn&#39;t create a<br>
cdrom device. I can&#39;t see any way to get oVirt to re-create the missing<br>
device.<br>
<br>
Is there a way for me to add these missing devices to my VMs?<br></blockquote><div><br></div><div>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&#39;t enable to add or remove a cd-rom. If no cd-rom device is added by default during import from libvirt then that&#39;s a bug, could you please file a bug on that (<a href="https://bugzilla.redhat.com">https://bugzilla.redhat.com</a>) ?</div><div><br></div><div>However, you can resolve it in a hacky way by modifying the database directly:</div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">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=&#39;your-vm-name&#39;), &#39;disk&#39;, &#39;cdrom&#39;, &#39;t&#39;, &#39;t&#39;, &#39;t&#39;, &#39;&#39;);</span></p></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
I&#39;m running oVirt 4.1 on CentOS 7.3.1611 with a hosted engine setup. VMs<br>
were migrated from a Debian Stretch machine running libvirt 3.0.0 with<br>
qemu 2.8.0.<br>
<br>
Thanks,<br>
Chris<br>
<span class="gmail-HOEnZb"><font color="#888888"><br>
--<br>
Chris Boot<br>
<a href="mailto:bootc@bootc.net">bootc@bootc.net</a><br>
______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/users</a><br>
</font></span></blockquote></div><br></div></div>