<div dir="ltr">Hi, <div><br></div><div>thanks for the replies; I needed to add a cdrom with software to a windows instance to make it available to a third party for installation and configuration.</div><div>Just for the record, I did it simply by:</div>
<div><br></div><div>virsh attach-disk  <libvirt domain id/instance id> <path to the image>.iso  hdd --type cdrom<br></div><div><br></div><div>Thanks!</div><div>/Nicolae</div></div><div class="gmail_extra"><br>
<br><div class="gmail_quote">On 17 September 2013 12:24, laclasse <span dir="ltr"><<a href="mailto:laclasse@gmail.com" target="_blank">laclasse@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;display:inline">Hi,</div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">



 What are you trying to do? Do you need to attach/detach a cdrom often? If it is to install the OS, you should either try a vendor shipped image or create a custom one, save it and push it to your OpenStack deployment.</div>


</div>
<div><div class="gmail_default" style="font-family:georgia,serif;display:inline">See here: </div><a href="http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html" target="_blank"><div class="gmail_default" style="font-family:georgia,serif;display:inline">



</div>http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html</a></div><div><br></div><div><br></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">If it is for other purposes, you could simply use dd to copy the content of your iso to a block volume from an instance, once done detach that block volume and re-attach to another instance. To do this you could follow these steps:</div>



</div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">- launch an instance with an ephemeral/local disk large enough to hold your .iso / cdrom contents (should not be hard)</div></div><div>



<div class="gmail_default" style="font-family:georgia,serif;display:inline">- make your cdrom</div><span style="font-family:georgia,serif"> contents an .iso file: pop your <div class="gmail_default" style="font-family:georgia,serif;display:inline">



CD</div> in a cdrom on a Linu<div class="gmail_default" style="display:inline">x or U</div>nix based machine and do:</span></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">      $ dd if=/dev/cdrom of=/path/to/mycdrom-contents.iso  (assuming /dev/cdrom is a symlink pointing to your cd player device)</div>



</div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">- upload the resulting file using scp to your instance:</div></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">



      $ scp /path/to/</div><span style="font-family:georgia,serif">mycdrom-contents.iso<div class="gmail_default" style="font-family:georgia,serif;display:inline">  -i myseckey.pem <username>@XXX.XXX.XXX.XXX:~</div>



</span></div><div><span style="font-family:georgia,serif"><div class="gmail_default" style="font-family:georgia,serif;display:inline">- create a new block volume of the size of your CD contents (a little bit over will not hurt) and name it something related to your CD content.</div>



</span></div><div><span style="font-family:georgia,serif"><div class="gmail_default" style="font-family:georgia,serif;display:inline">- attach the block volume to your instance </div></span></div><div><span style="font-family:georgia,serif"><div class="gmail_default" style="font-family:georgia,serif;display:inline">



- ssh to your instance and </div><div class="gmail_default" style="font-family:georgia,serif;display:inline">again use dd to copy the .iso file to the newly attached block device (_without_ first making a file system on it)</div>



</span><br></div><div><span style="font-family:georgia,serif"><div class="gmail_default" style="font-family:georgia,serif;display:inline">      $ dd if=/home/<user>/</div></span><span style="font-family:georgia,serif">mycdrom-contents.iso<div class="gmail_default" style="font-family:georgia,serif;display:inline">



 of=/dev/sdX (where sdX is the newly attached block device)</div></span></div><div><div class="gmail_default" style="font-family:georgia,serif">- detach the block device and attach/re-attach to other instances to your heart content.</div>



<div class="gmail_default" style="font-family:georgia,serif"> If the second part did not make sense to you, I would recommend looking at the documentation at <a href="http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html" style="font-family:arial" target="_blank"><div class="gmail_default" style="font-family:georgia,serif;display:inline">



</div>http://docs.openstack.org/trunk/</a></div><div class="gmail_default" style="font-family:georgia,serif"><br></div></div><div class="gmail_default" style="font-family:georgia,serif">Hope this helps.</div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">



<br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 8:19 AM, Nicolae Paladi <span dir="ltr"><<a href="mailto:n.paladi@gmail.com" target="_blank">n.paladi@gmail.com</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, <div><br></div><div>is it possible to launch an instance with additional media (e.g. cdrom) attached?</div>


<div>I haven't found anything like that among the nova boot options</div><div><br></div><div>
cheers,</div><div>/nicolae</div></div>
<br>_______________________________________________<br>
Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
Post to     : <a href="mailto:openstack@lists.openstack.org" target="_blank">openstack@lists.openstack.org</a><br>
Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>