Managing your cloud resources with OpenStack: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 114: Line 114:
* <volume_name> can be found from the OpenStack dashboard by clicking on the volume name, and
* <volume_name> can be found from the OpenStack dashboard by clicking on the volume name, and
* <image_name> is a name you choose for the image.
* <image_name> is a name you choose for the image.
You can then download the image as described in [[OpenStack#Downloading an image into a local VirtualBox | Downloading an image into a local VirtualBox]].
You can then download the image as described in [[OpenStack#Downloading an image into a local VirtualBox | Downloading an image into a local VirtualBox]]. It is best to detach the volume from the VM before you create an image from the volume. If the volume is a boot volume you will likely need to delete your VM to detach it, however, make sure you have not checked "Delete Volume on Instance Delete" when creating the VM.


=Creating an Image From a VM=
Using the [[command line interface]] issue the command
{{Command| openstack server image create <server-name>}}
where <code><server-name></code> should be replaced with the name of your server. The command only includes the VM's root drive (e.g. /dev/vda) in the image. This means that ephemeral drives and non-boot attached volumes are not included in the image and additional measures should be taken to preserve this data. In addition, a running VM which is writing to disk while the image is being created, may leave the file system in an inconsistent state. It is recommended that a VM be shutdown (not terminated) before an image is created from it.
=Accessing a VM with Multiple Users= <!--T:28-->
=Accessing a VM with Multiple Users= <!--T:28-->
[[File:VM multi user cloud init.png|400px|thumb| Cloud init to add multiple users (Click for larger image)]]
[[File:VM multi user cloud init.png|400px|thumb| Cloud init to add multiple users (Click for larger image)]]
Line 179: Line 183:
Once this is done, users can log into the VM with their private keys as usual (see [[ssh keys]]).
Once this is done, users can log into the VM with their private keys as usual (see [[ssh keys]]).


=Downloading an image into a local VirtualBox= <!--T:38-->
=Downloading an image= <!--T:38-->
The first step is to install the OpenStack client and download the OpenStack RC file and source it (see [[OpenStack Command Line Clients]]).
The first step is to install the OpenStack client and download the OpenStack RC file and source it (see [[OpenStack Command Line Clients]]).
The OpenStack client can list the available images on your OpenStack project with
The OpenStack client can list the available images on your OpenStack project with
Line 208: Line 212:
where <format> matches that given in the table above for your selected image andthe last argument is the <code>ID</code> of the image you wish to download.
where <format> matches that given in the table above for your selected image andthe last argument is the <code>ID</code> of the image you wish to download.


=Creating VirtualBox VM from a Cloud Image=
<!--T:41-->
<!--T:41-->
Then to use this image in VirtualBox you will need to convert the image in the qcow2 format to the vmdk format. This can be done with the <code>qemu-img</code> tool. This can be installed with something like
To use this image in VirtualBox you will need to convert the image in the qcow2 format to the vmdk format. This can be done with the <code>qemu-img</code> tool. This can be installed with something like
{{Command|sudo apt-get install qemu-img}}
{{Command|sudo apt-get install qemu-img}}
then do the conversion with
then do the conversion with
cc_staff
1,486

edits

Navigation menu