Import/Export#

General information#

The Import/Export service allows you to import instances and individual volumes from your existing environment into the K2 Cloud and export them to your local virtualization infrastructure. Thus, in the K2 Cloud, you can use cut and dried instances and volumes that meet corporate IT security, configuration management and other standards and requirements.

Instances and volumes can be imported and exported either through the K2 Cloud web interface or using API.

The Import feature automatically imports the specified object from the object storage into an image or snapshot. Once the import is complete, you can create instances from the resulting image or create volumes from a snapshot in the K2 Cloud.

The Export feature automatically exports your selected instance or volume to a specified bucket in the object storage. Then you can download and launch the exported instance or volume in your local virtualization infrastructure.

Import#

To import your instance images or volume snapshots to the K2 Cloud, you should first upload them to a bucket in the object storage.

Import from the following file formats is supported:

  • VMDK;

  • VHD;

  • QCOW2;

  • OVA (only import to an image is supported);

  • RAW.

Importing a snapshot#

Go to the Object Storage section to import a snapshot, select the desired object on the bucket page, and click Create Volume Snapshot. If the button is not shown, open the additional action menu (More).

In the dialog window, you can change the suggested description of the volume snapshot, if necessary. Select the appropriate option and enter your email address if you want to be notified when the import process is complete. Then click Create snapshot.

The parameters, progress, and status of the snapshot that you import are displayed in the section Virtual machines Storage Import/Export. You can abort import if needed. To do this, go to the task page and click Abort import.

After the process completion, the snapshot will be available in the section Virtual machines Storage Snapshots.

Importing a snapshot#

Attention

Importing of virtual machine images that use UEFI mode is not supported.

To import an image from which you want to create new instances, select the desired object or objects on the bucket page in the Object Storage section and click Create Image. If this button is not shown, open the additional action menu (More).

In the dialog window, you can specify the image name and description and change the order of objects in the image. Use the vertical ellipsis to drag-and-drop objects.

Note

The first object in the image will be used as the boot device.

You can also add volume snapshot description. It will be assigned to all snapshots to be created along with the image. If the Snapshot Description field is left blank, all snapshots will be given a default description like Snapshot for cmi-XXXXXXXX, where cmi-XXXXXXXX is the image ID.

If the virtual machine whose image you are importing does not have VirtIO drivers installed, check Enable support for legacy OS.

Select the appropriate option and enter your email address if you want to be notified when the import process is complete. Then click Create.

The parameters, progress, and status of the image that you import are displayed in the section Virtual machines Storage Import/Export. You can abort import if needed. To do this, go to the task page and click Abort import.

After the process completion, the image will be available in Images subsection.

Export#

K2 Cloud supports exporting volumes and instances to the following formats:

  • VMDK;

  • VHD (for volumes with a size of no more than 2 TB);

  • QCOW2;

  • VMDK + OVF (for instances only).

Exporting a volume#

You can export a volume in the Available or In Use state. If a volume is attached to a running instance, its snapshot may be in a inconsistent state. If you want to avoid the inconsistency and do not want to stop the instance, you should flush the cache to the volume and suspend writing to it before importing.

To export volumes, select it in the Volumes subsection and click Export. Alternatively, you can start exporting from the page of the instance to which the volume is attached. To do this, go to the Volumes tab, select it and click Export.

In the dialog window for exporting a volume, specify the prefix, export format, description and bucket to which the volume will be exported. If you want to be notified that the export process is complete, select the appropriate option and enter your email address. Once all parameters are specified, click Export.

The resulting snapshot file is saved to a separate folder in the bucket in the object storage. The folder name consists of the specified prefix and the export task ID.

Exporting an instance#

An instance can be exported when it is in the Off state and in the Running state. When exporting a running instance, snapshots of all volumes are taken at the same point in time. All data that has already been written to the volume is saved, but data in RAM is not included in the snapshot. To ensure that all data is included in the image, we recommend you flush the cache to the volumes and suspend writing to them before exporting.

To export an instance from the K2 Cloud, select it in the Instances subsection and click Export. Alternatively, you can start exporting from the instance page. To do this, select Export in the Information tab. If the Export button is not shown, open the additional action menu (More).

In the dialog window for exporting an instance, specify the prefix, export format, description and bucket to which the instance will be exported. If you want to be notified that the export process is complete, select the appropriate option and enter your email address. Once all parameters are specified, click Export.

The resulting image files are saved to a separate folder in the bucket in the object storage. The folder name consists of the specified prefix and the export task ID.

Information about import/export task#

The parameters, progress, and status of the import/export tasks are displayed in the section Virtual machines Storage Import/Export. Information about a particular task can also be viewed on its page. Here, you can also abort a task that has not yet been completed. To go to the task page, click the link with the unique task ID.

For each task, its respective page displays its status, progress, description, and creation date. In addition, the image import task page contains links to the ready image and snapshots included in it. The snapshot import task page contains links to the ready snapshot and the source object in the object storage. Instance and volume export task pages contain links to the target directory in the object storage where the created images and snapshots are stored.