Files
3engines_doc/docs/openstackcli/How-to-create-instance-snapshot-using-OpenStack-CLI-on-CloudFerro-Cloud.html.md
2025-06-19 14:09:10 +05:30

122 lines
5.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

How to create instance snapshot using OpenStack CLI on CloudFerro Cloud[🔗](#how-to-create-instance-snapshot-using-openstack-cli-on-brand-name "Permalink to this headline")
===========================================================================================================================================================================
In this article, you will learn how to create instance snapshot on CloudFerro Cloud cloud, using OpenStack CLI.
Instance snapshots allow you to archive the state of the virtual machine. You can, then, use them for
> * backup,
> * migration between clouds
> * disaster recovery and/or
> * cloning environments for testing or development.
We cover both types of storage for instances, *ephemeral* and *persistent*.
The plan[🔗](#the-plan "Permalink to this headline")
---------------------------------------------------
In reality, you will be using the procedures described in this article with the already existing instances.
However, to get a clear grasp of the process, while following this article you are going to create two new instances, one with *ephemeral* and the other with *persistent* type of storage. Let their names be **instance-which-uses-ephemeral** and **instance-which-uses-volume**. You will create an instance snapshot for each of them.
If you are only interested in one of these types of instances, you can follow its respective section of this text.
It goes without saying that after following a section about one type of virtual machine you can clean up the resources you created to, say, save costs.
Or you can keep them and use them to create an instance out of it using one of articles mentioned in What To Do Next.
What We Are Going To Cover[🔗](#what-we-are-going-to-cover "Permalink to this headline")
---------------------------------------------------------------------------------------
Prerequisites[🔗](#prerequisites "Permalink to this headline")
-------------------------------------------------------------
No. 1 **Account**
You need a CloudFerro Cloud hosting account with access to the Horizon interface: <https://horizon.cloudferro.com>.
No. 2 **Ephemeral storage vs. persistent storage**
Please see article [Ephemeral vs Persistent storage option Create New Volume on CloudFerro Cloud](../datavolume/Ephemeral-vs-Persistent-storage-option-Create-New-Volume-on-CloudFerro-Cloud.html.md) to understand the basic difference between ephemeral and persistent types of storage in OpenStack.
No. 3 **Instance with ephemeral storage**
You need a virtual machine hosted on CloudFerro Cloud cloud.
You can create an instance with ephemeral storage by following this article: [How to create a VM using the OpenStack CLI client on CloudFerro Cloud cloud](../cloud/How-to-create-a-VM-using-the-OpenStack-CLI-client-on-CloudFerro-Cloud-cloud.html.md)
The actual command used to create an instance from that article was
```
openstack server create \
--image Debian-custom-upload \
--flavor eo1.small \
--key-name ssh-key \
--network cloud_00734_1 \
--network eodata \
--security-group default \
--security-group allow_ping_ssh_icmp_rdp \
Test-Debian
```
In the examples in this article, we are using a default image **Ubuntu 22.04 LTS**.
With ephemeral storage, only one new instance is created.
No. 4 **Instance with persistent storage**
When creating an instance with persistent storage, you just add one new option to the above command; the option is **boot-from-volume** followed by a
> * space and the
> * desired size of the new volume in gigabytes.
Make sure to enter the amount of storage sufficient for your needs.
You can also look at storage size available with your chosen virtual machine flavor for guidance (**openstack flavor list** command, column **Disk**)
For instance, if you want your boot volume to have 16 GB, add the following:
```
--boot-from-volume 16
```
The complete command would, then, look like this:
```
openstack server create \
--image Debian-custom-upload \
--flavor eo1.small \
--key-name ssh-key \
--network cloud_00734_1 \
--network eodata_00734_1 \
--security-group default \
--security-group allow_ping_ssh_icmp_rdp \
--boot-from-volume 16 \
Test-Debian
```
In the examples in this article, we are using a default image **Ubuntu 22.04 LTS**.
With persistent storage, one instance and one volume are created:
> * a special kind of instance (with no ephemeral storage) and
> * the volume that is attached to that instance.
The instance will boot from the volume that was attached during the creation of instance.
Otherwise, an instance can have two or more volumes attached to it, however, only one will serve as its boot drive.
No. 5 **How to delete resources**
If you want to learn how to delete instances, snapshots, volumes and other OpenStack objects, please have a look at the following articles:
/networking/How-to-correctly-delete-all-the-resources-in-the-project-via-OpenStack-commandline-Clients-on-CloudFerro-Cloud.
[How to create or delete volume snapshot on CloudFerro Cloud](../datavolume/How-to-create-or-delete-volume-snapshot-on-CloudFerro-Cloud.html.md).
No. 6 **OpenStack CLI client**
You need to have OpenStack CLI client installed. One of the following articles should help you: