Create or update an image (glance)¶
...
For small images (5-10GB in size) you may be able to upload through the dashboard. Images should be converted to RAW format first. You can either create your own images or find pre-built images. For more information on creating your own images, you can use the openstack image guide. For a list of example images, you can use openstack's list of example images.
Using the Web Interface (Recommended for images < 5GB)
For this guide, we will be uploading an image from openstack's list of example images. Specifically, we will be using a CentOS 6 image.
- From the dashboard, find the menu on the left. Expand Project then expand Compute. Then click Images.
- In the Images section, click the Create Image button at top right.
- In the popup window, enter a name for the new image. Then select the image file you would like to use and select its format. Finally, click the Create Image button. It may take a few moments to complete.
- Once you have created the image, it show up in Project → Compute → Images with a status of "saving". It may take a few minutes to save. Note that the status will not update automatically, so you will need to refresh the page to see when the image is done saving.
- Once the status have changed to "Active", then your image is ready to be used to launch an instance.
Using the Client tools (Recommended for images > 5GB)
...
To create an image, use openstack image create:
$ openstack image create imageName
To update an image by name or ID, use openstack image set:
$ openstack image set imageName
The following list explains the optional arguments that you can use with the create
and set
commands to modify image properties. For more information, refer to Image service chapter in the OpenStack Command-Line Interface Reference.
...
The following example shows the command that you would use to upload a CentOS 6.3 image in raw format and configure it for public access:
$ openstack image create --disk-format raw --container-format bare --public --file ./centos63.raw centos63-image