Getting a list of public images
When creating a VM, you need to select its image with the software that you want to use.
You can view a list of public images when creating a virtual machine:
- In the management console
, select the folder to create the virtual machine in. - At the top right, click Create resource.
- In the list that opens, select Virtual machine instance.
- Under Boot disk image, click Show all Marketplace products. A list of all available public images will appear.
To view information about a specific image, click
If you do not have the Yandex Cloud command line interface yet, install and initialize it.
-
To get a list of available images using the CLI, run this command:
yc compute image list --folder-id standard-images
Result:
+----------------------+-------------------------------------+--------------------------+----------------------+--------+ | ID | NAME | FAMILY | PRODUCT IDS | STATUS | +----------------------+-------------------------------------+--------------------------+----------------------+--------+ ... | fdvk34al8k5n******** | centos-7-1549279494 | centos-7 | dqni65lfhvv2******** | READY | | fdv7ooobjfl3******** | windows-2016-gvlk-1548913814 | windows-2016-gvlk | dqnnc72gj2is******** | READY | | fdv4f5kv5cvf******** | ubuntu-1604-lts-1549457823 | ubuntu-1604-lts | dqnnb6dc7640******** | READY | ... +----------------------+-------------------------------------+--------------------------+----------------------+--------+
Where:
-
ID
: Image ID. -
NAME
: Image name. -
FAMILY
: ID of the image family the image belongs to. -
PRODUCT IDS
: IDs of Yandex Cloud Marketplace products associated with the image. -
STATUS
: Current status of the image. It may take one of the following values:STATUS_UNSPECIFIED
: Image status is not defined.CREATING
: Image is being created.READY
: Image is ready to use.ERROR
: You cannot use the image due to an issue.DELETING
: Image is being deleted.
Note
By default, the command returns only the first 1,000 images. To view the full list of images, include the
--limit 0
parameter. -
-
To get a list of IDs of available image families, run the following command:
yc compute image list \ --folder-id standard-images \ --limit 0 \ --jq '.[].family' | sort | uniq
Result:
... ubuntu-2204-lts ubuntu-2204-lts-oslogin ubuntu-2204-lts-vgpu-v13 ...
-
To get a list of available public images belonging to a particular family, run this command:
yc compute image list --folder-id standard-images | grep <family_ID>
Where
<family_ID>
is the image family ID, e.g.,ubuntu-2204-lts-oslogin
.Result:
... | fd827n44qr0q******** | ubuntu-2204-lts-oslogin-v20240617 | ubuntu-2204-lts-oslogin | f2eofgd2cj0e******** | READY | | fd827ukfjohd******** | ubuntu-2204-lts-oslogin-v20240701 | ubuntu-2204-lts-oslogin | f2evubhrcfsh******** | READY | | fd82sdt0b96a******** | ubuntu-2204-lts-oslogin-v20240304 | ubuntu-2204-lts-oslogin | f2ecb2d55npl******** | READY | ...
For more information about the yc compute image list
command, see the CLI reference.
- Get an IAM token used for authentication in the examples:
- Get the list of public images from Yandex Cloud using the list REST API method for the Image resource or the ImageService/List gRPC API call. In the request, specify the following parameters:
- Specify
standard-images
as the folder ID. - The folder contains many images, so specify
pageSize=1000
or use the obtained value ofnextPageToken
to get the next page.
- Specify
Write the result to a file, e.g., output.json
:
export IAM_TOKEN=CggaATEVAgA...
curl \
--header "Authorization: Bearer ${IAM_TOKEN}" \
"https://compute.api.cloud.yandex.net/compute/v1/images?folderId=standard-images&pageSize=1000" > output.json
You can also view information about all available public images in Cloud Marketplace.