Difference between revisions of "Images"
(Filled in From a Volume section and minor updates to From an Instance) |
(Removed From a Volume Snapshot and added note about volume snapshots to From a Volume) |
||
Line 20: | Line 20: | ||
Snapshots in OpenStack can be used like images, so the simplest way to create an image from an instance is to create a snapshot: | Snapshots in OpenStack can be used like images, so the simplest way to create an image from an instance is to create a snapshot: | ||
− | # Shut Off the instance by selecting "<tt>Shut Off Instance</tt>" from the [https://redcloud.cac.cornell.edu/dashboard/project/instances/ <tt>Instances</tt> tab] | + | # Shut Off the instance by selecting "<tt>Shut Off Instance</tt>" for the instance from the [https://redcloud.cac.cornell.edu/dashboard/project/instances/ <tt>Instances</tt> tab] |
− | # Create a snapshot of the instance by selecting "<tt>Create Snapshot</tt>" | + | # Create a snapshot of the instance by selecting "<tt>Create Snapshot</tt>" for the instance |
− | # | + | # You will have to give the snapshot a name (this will be the name of your image) |
# Wait for the snapshot to finish being created, and it will show up on the [https://redcloud.cac.cornell.edu/dashboard/project/images <tt>Images</tt> tab] | # Wait for the snapshot to finish being created, and it will show up on the [https://redcloud.cac.cornell.edu/dashboard/project/images <tt>Images</tt> tab] | ||
Line 33: | Line 33: | ||
Create an image from the volume: | Create an image from the volume: | ||
− | # Select "<tt>Upload Volume to Image</tt>" from the [https://redcloud.cac.cornell.edu/dashboard/project/volumes/ <tt>Volumes</tt> tab] | + | # Select "<tt>Upload Volume to Image</tt>" for the volume from the [https://redcloud.cac.cornell.edu/dashboard/project/volumes/ <tt>Volumes</tt> tab] |
# Give the image a name and select "<tt>Upload</tt>" | # Give the image a name and select "<tt>Upload</tt>" | ||
# Wait for the image to finish being created, and it will show up on the [https://redcloud.cac.cornell.edu/dashboard/project/images <tt>Images</tt> tab] | # Wait for the image to finish being created, and it will show up on the [https://redcloud.cac.cornell.edu/dashboard/project/images <tt>Images</tt> tab] | ||
Line 39: | Line 39: | ||
You can now [[OpenStack#Launch_an_Instance|launch new instances]] from the image. | You can now [[OpenStack#Launch_an_Instance|launch new instances]] from the image. | ||
− | + | If you have a volume snapshot that you would like to create an image from, create a volume from the snapshot, then follow the above steps. | |
− | |||
== Upload an Image == | == Upload an Image == |
Revision as of 14:41, 29 January 2019
OpenStack Images can take several forms, but generally an image consists of a static copy of a virtual machine with an operating system with some amount of storage. Each project starts out with a few base Linux and Windows images from which instances can be created. Images can also be created or uploaded to OpenStack, and then used to launch instances.
Available Images
In OpenStack, there are several stock images from which you can easily launch new instances. Typically you will want to create an instance from one of these stock images. You can view the available images (once logged in) by going to the "Images" tab in the Web Interface.
You would only need to create/upload your own image if you are unhappy with the stock images available, or if you would like to make an image from one of your current instances (to easily launch new instances with the same software and data). Currently, we have images for:
Creating an Image
This section details how to create images from existing resources such as instances and volumes. If you are looking to create an image from some other source, see the Upload an Image section.
From an Instance
Snapshots in OpenStack can be used like images, so the simplest way to create an image from an instance is to create a snapshot:
- Shut Off the instance by selecting "Shut Off Instance" for the instance from the Instances tab
- Create a snapshot of the instance by selecting "Create Snapshot" for the instance
- You will have to give the snapshot a name (this will be the name of your image)
- Wait for the snapshot to finish being created, and it will show up on the Images tab
You can now launch new instances or create a volume from the snapshot.
Note: You should not take a snapshot of a file system that's mounted. You will lose all the info that's still in Linux's write cache. So if you want to take a snapshot of the root file system, the OS cannot be running.
From a Volume
Create an image from the volume:
- Select "Upload Volume to Image" for the volume from the Volumes tab
- Give the image a name and select "Upload"
- Wait for the image to finish being created, and it will show up on the Images tab
You can now launch new instances from the image.
If you have a volume snapshot that you would like to create an image from, create a volume from the snapshot, then follow the above steps.
Upload an Image
Images can be uploaded if you already have an image file that you would like to use. For example, if you are unsatisfied with the stock image options available on Red Cloud, you can Get Images from elsewhere. Images can be uploaded via the Web Interface:
- Go to the Images tab
- Select the "Create Image" option
- Give the image a name
- Select the file of the source image to upload
- Select "Raw" for the Format
- Optional: Select "Yes" under Protected to ensure that the image cannot be changed or deleted accidentally (this setting can be changed later)
- Select "Create Image"
If you are interested in sharing an image, please see the documentation on how to Share An Image In Openstack.