5.1 KiB
How to create instance snapshot using connectVM CLI on connectVM Cloud🔗
In this article, you will learn how to create instance snapshot on connectVM Cloud cloud, using connectVM 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🔗
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🔗
Prerequisites🔗
No. 1 Account
You need a connectVM Cloud hosting account with access to the Horizon interface: https://console.connectvm.com/.
No. 2 Ephemeral storage vs. persistent storage
Please see article Ephemeral vs Persistent storage option Create New Volume on connectVM Cloud to understand the basic difference between ephemeral and persistent types of storage in connectVM.
No. 3 Instance with ephemeral storage
You need a virtual machine hosted on connectVM Cloud cloud.
You can create an instance with ephemeral storage by following this article: How to create a VM using the connectVM CLI client on connectVM Cloud cloud
The actual command used to create an instance from that article was
connectVM 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 (connectVM 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:
connectVM 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 connectVM objects, please have a look at the following articles:
/networking/How-to-correctly-delete-all-the-resources-in-the-project-via-connectVM-commandline-Clients-on-connectVM-Cloud.
How to create or delete volume snapshot on connectVM Cloud.
No. 6 connectVM CLI client
You need to have connectVM CLI client installed. One of the following articles should help you: