[Openstack] Launch a VM instance with an attached cd-rom?

laclasse laclasse at gmail.com
Tue Sep 17 10:24:01 UTC 2013


Hi,

 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.
 See here:
​​
http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html


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:
- launch an instance with an ephemeral/local disk large enough to hold your
.iso / cdrom contents (should not be hard)
- make your cdrom
 contents an .iso file: pop your
​CD​
 in a cdrom on a Linu
​x or ​U
nix based machine and do:
      $ dd if=/dev/cdrom of=/path/to/mycdrom-contents.iso  (assuming
/dev/cdrom is a symlink pointing to your cd player device)
- upload the resulting file using scp to your instance:
      $ scp /path/to/
mycdrom-contents.iso
​  -i myseckey.pem <username>@XXX.XXX.XXX.XXX:~
- 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.
- attach the block volume to your instance
​- ssh to your instance and ​
​
​​again use dd to copy the .iso file to the newly attached block device
(_without_ first making a file system on it)

      $ dd if=/home/<user>/
mycdrom-contents.iso
​ of=/dev/sdX (where sdX is the newly attached block device)​
​- detach the block device and attach/re-attach to other instances to your
heart content.
 If the second part did not make sense to you, I would recommend looking at
the documentation at ​
​
http://docs.openstack.org/trunk/<http://docs.openstack.org/trunk/openstack-compute/admin/content/starting-images.html>

Hope this helps.



On Mon, Sep 16, 2013 at 8:19 AM, Nicolae Paladi <n.paladi at gmail.com> wrote:

> Hi,
>
> is it possible to launch an instance with additional media (e.g. cdrom)
> attached?
> I haven't found anything like that among the nova boot options
>
> cheers,
> /nicolae
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20130917/5450805f/attachment.html>


More information about the Openstack mailing list