vinfra service compute image create
Create a new compute image:
usage: vinfra service compute image create [--min-disk <size-gb>]
[--min-ram <size-mb>]
[--os-distro <os-distro>]
[--protected | --unprotected]
[--public] [--public]
[--disk-format <disk_format>]
[--container-format <format>]
[--tags <tags>] --file <file>
<image-name>
--min-disk <size-gb>- Minimum disk size required to boot from image, in gigabytes
--min-ram <size-mb>- Minimum RAM size required to boot from image, in megabytes
--os-distro <os-distro>- OS distribution. To list available distributions, run
vinfra service compute cluster show. --protected- Protect image from deletion
--unprotected- Allow image to be deleted
--public- Make image accessible to all users
--private- Make image accessible only to the owners.
--disk-format <disk_format>- Disk format:
detect,iso,qcow2,raw(default:detect) --container-format <format>- Container format:
bare --tags <tags>- A comma-separated list of tags
--file <file>- Create image from a local file
<image-name>- Image name
Example:
# vinfra service compute image create mycirrosimg \ --file /distr/cirros-0.4.0-x86_64-disk.img Uploading image to server [elapsed time: 0:00:04]... | +---------+--------------------------------------+ | Field | Value | +---------+--------------------------------------+ | task_id | 03874663-d03f-4891-a10b-64837e7faf43 | +---------+--------------------------------------+
This command creates a task to create a Cirros image from the local file and upload it to Acronis Cyber Infrastructure.
Task outcome:
# vinfra task show 03874663-d03f-4891-a10b-64837e7faf43 +---------+------------------------------------------------------------------+ | Field | Value | +---------+------------------------------------------------------------------+ | details | | | name | backend.presentation.compute.images.tasks.ImportComputeImageTask | | result | id: 179f45ef-c5d6-4270-b0c0-085b542544c5 | | state | success | | task_id | 03874663-d03f-4891-a10b-64837e7faf43 | +---------+------------------------------------------------------------------+