Uploading your disk image to Yandex.Cloud
These guidelines describe how to upload a disk image file to Yandex.Cloud and create an image in the Compute Cloud service. Supported image formats: Qcow2, VMDK, and VHD. Currently, you cannot upload your own image with the Windows OS.
You can only create images from external sources with links to public buckets in Object Storage.
1. Upload an image file to Yandex.Cloud
Upload your image file to Yandex Object Storage and get a link to the uploaded image:
- If you don't have a bucket in Object Storage, create it.
- Make the bucket public.
- Upload the image to your bucket. In Object Storage terms, the uploaded image file will be called an object.
- Get a link to the uploaded image. Use this link when creating an image in Compute Cloud.
2. Create an image in Compute Cloud
Create a new image from the link received in Object Storage:
In the management console, select the folder where you want to create an image.
Click on the Yandex Compute Cloud tile.
On the Virtual machines page, go to the Images tab.
Click Upload image.
Enter the image name.
The name must be unique within the folder. The name may contain lowercase Latin letters, numbers, and hyphens. The first character must be a letter. The last character can't be a hyphen. The maximum name length is 63 characters.
If necessary, add an arbitrary description of the image.
Insert the link to the image you received in Object Storage.
To create a new image via the link, use the flag
$ yc compute image create --name <IMAGE-NAME> --source-uri <IMAGE-URL>
<IMAGE-NAME>is the name to be assigned to the image.
<IMAGE-URL>is the link to the image received in Object Storage.
If necessary, add a description and specify the family to which the image refers:
$ yc compute image create \ --name ubuntu-cosmic \ --description "Ubuntu Server 18.10 (Cosmic Cuttlefish)" \ --family ubuntu \ --source-uri "https://storage.yandexcloud.net/mybucket/cosmic-server-cloudimg-amd64.vmdk"
If you know the minimum requirements for the size of a disk that will be created from this image, specify the size in GB:
$ yc compute image create \ --name big-image \ --min-disk-size 20 \ --source-uri "https://storage.yandexcloud.net/mybucket/cosmic-server-cloudimg-amd64.vmdk"
min-disk-size value must be greater than the volume of the source data in the image and greater than the size of the virtual disk specified in the image.
min-disk-size value you specify is less than that allowed, an error will occur and no image will be created. The error description will contain the minimum value in bytes, for example,
Minimal disk size should be greater than or equal to 10737418240.
min-disk-size is specified, the minimum value will be used.
To create a new image via the link, use the Create method for the
Image resource. Pass the link to the image in the
After being created, the image will get the
CREATING status. Wait until the image status changes to
READY before using it.
3. Delete the image from Object Storage
For information about the cost of using Object Storage, see the section Pricing policy for Yandex Object Storage.