Managing your cloud resources with OpenStack: Difference between revisions

Added cloning a volume section.
(Marked this version for translation)
(Added cloning a volume section.)
Line 97: Line 97:
==Creating an Image from a Volume== <!--T:26-->
==Creating an Image from a Volume== <!--T:26-->
[[File:Os-upload-volume-to-image.png|400px|thumb| Upload to Image form (Click for larger image)]]<!--Note to translator: there is a FR version of this screen shot at [[File:Os-upload-volume-to-image-fr.png]]-->
[[File:Os-upload-volume-to-image.png|400px|thumb| Upload to Image form (Click for larger image)]]<!--Note to translator: there is a FR version of this screen shot at [[File:Os-upload-volume-to-image-fr.png]]-->
Creating an image from a volume allows you to download the image. Do this if you want to save it as a backup, or to spin up a VM somewhere other than the CC Cloud, e.g. with [https://www.virtualbox.org/ VirtualBox]. To create an image of a volume it must first be detached from a VM. If it is a root volume, it can only be detached from a VM if the VM is terminated/deleted.
Creating an image from a volume allows you to download the image. Do this if you want to save it as a backup, or to spin up a VM somewhere other than the CC Cloud, e.g. with [https://www.virtualbox.org/ VirtualBox]. If you want to copy a volume to a new volume within the same cloud see [[#Cloning a Volume|cloning a volume]] instead. To create an image of a volume it must first be detached from a VM. If it is a root volume, it can only be detached from a VM if the VM is terminated/deleted.


===Using the Dashboard=== <!--T:53-->
===Using the Dashboard=== <!--T:53-->
Line 114: Line 114:
* <image_name> is a name you choose for the image.
* <image_name> is a name you choose for the image.
You can then [[OpenStack#Downloading an image |download the image]] as described below. 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.
You can then [[OpenStack#Downloading an image |download the image]] as described below. 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.
==Cloning a Volume==
Cloning a volume is a quick and easy way to make a copy of a volume and it is the recommended method for copying volumes. While it is possible to make an image of an existing volume and use that to create a new volume this method is much faster and requires less movement of data behind the scense than image creation. This is handy if you have a persistent VM and you want to test out something before doing it on your production site. It is highly recommended to shutdown your VM before creating a clone of the volume as the newly created volume may be left in an inconsistent state if there was writting to the source volume during the time the clone was created. To create a clone you must use the [[OpenStack Command Line Clients|command line client]] using this command.
{{Command|openstack volume create --source <source-volume-id> --size <size-of-new-volume> <name-of-new-volume>}}


=Working with images= <!--T:42-->
=Working with images= <!--T:42-->
cc_staff
1,486

edits