Openstack Snapshots
Create a snapshot of the instance
Note
If necessary, list the instances to view the instance name with the list server command above.
-
Shut down the source VM before you take the snapshot to ensure that all data is flushed to disk. Use the openstack server stop command to shut down the instance:
-
Use the openstack server list command to confirm that the instance shows a SHUTOFF status.
-
Use the openstack server image create command to take a snapshot:
The above command creates the image myInstance by taking a snapshot of a running server.
-
Use the openstack image list command to check the status until the status is active:
Show Image Details
Download the snapshot
Note
Get the image id from the image list command (seen above).
Download the snapshot by using the image ID:
Make the image available to the new environment, either through HTTP or direct upload to a machine (scp).
Import the snapshot to the new env
In the new project or cloud environment, import the snapshot:
openstack --os-cloud={cloud name} image create NEW_IMAGE_NAME \
--container-format bare --disk-format qcow2 --file IMAGE_URL
Boot a new sever from the snapshot
In the new project or cloud environment, use the snapshot to create the new instance: