Skip to main content

Managing Images

Managing operating system images (machine images) in Arvancloud Cloud Server.

Overview​

The image commands provide tools for managing the images used to create servers. You can see the list of available images, upload your own private images, or import a new image from an external URL.

Alias: img

Commands​

1. Listing Images​

Shows the list of all operating system images, with filtering options.

arvan iaas image list

Alias: ls

Flags:

  • --region, -r: filter by region code (such as ir-central1)
  • --az, -a: filter by data center (such as ir-central1-a)
  • --type, -t: filter by image type: private, arvan, distro (Linux distributions)

Example:

$ arvan iaas image list --region=ir-central1 --type=private

Output:

ID NAME TYPE STATUS AZ DISTRO MIN DISK MIN RAM
a1b2c3d4-5678-90ab-cdef-123456789012 Ubuntu 22.04 LTS distro active ir-central1-a Ubuntu 10 GB 1024 MB
b2c3d4e5-6789-01bc-def0-234567890123 My Custom Image private active ir-central1-a - 25 GB 2048 MB
c3d4e5f6-7890-12cd-ef01-345678901234 CentOS 8 distro active ir-central1-b CentOS 10 GB 1024 MB

2. Showing Image Details​

Shows detailed information about a specific image.

arvan iaas image show <image-id>

Alias: sh

Arguments:

  • image-id (required): the image ID

Example:

$ arvan iaas image show a1b2c3d4-5678-90ab-cdef-123456789012

Output:

IMAGE DETAILS
-------------
ID: a1b2c3d4-5678-90ab-cdef-123456789012
Name: Ubuntu 22.04 LTS
Status: active
AZ: ir-central1-a
Distribution: Ubuntu
Min Disk (GB): 10
Min RAM (MB): 1024

3. Uploading an Image​

Uploads an operating system image from a local file.

arvan iaas image upload <file-path>

Alias: up

Arguments:

  • file-path (required): the path to the image file on your system

Flags:

  • --name, -n: the name of the uploaded image (required)
  • --az, -a: the destination data center for storing the image (required)
  • --min-disk, -d: the minimum disk space needed to use this image, in GB
  • --min-ram, -m: the minimum RAM needed to use this image, in MB

Example:

$ arvan iaas image upload /path/to/ubuntu-custom.qcow2 --name="My Ubuntu Image" --az=ir-central1-a --min-disk=20 --min-ram=2048

Output:

UPLOAD DETAILS
--------------
File: ubuntu-custom.qcow2
Size: 2.5 GB
Name: My Ubuntu Image
Target: ir-central1-a

Uploading image...

Upload Progress: 100%
Image uploaded successfully!

4. Importing an Image from a URL​

Imports an operating system image from an external URL.

arvan iaas image import-url <url>

Alias: imp

Arguments:

  • url (required): the direct address of the image file

Flags:

  • --name, -n: the name of the imported image (required)
  • --az, -a: the destination data center for storing the image (required)
  • --min-disk, -d: the minimum disk space needed (GB)
  • --min-ram, -m: the minimum RAM needed (MB)

Example:

$ arvan iaas image import-url https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img --name="Ubuntu Jammy" --az=ir-central1-a --min-disk=10 --min-ram=1024

Output:

IMPORT DETAILS
--------------
URL: https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
Name: Ubuntu Jammy
Target AZ: ir-central1-a
Min Disk (GB): 10
Min RAM (MB): 1024

Submitting import request...
Import request submitted successfully!

5. Deleting an Image​

Deletes an image from the account.

arvan iaas image delete <image-id>

Alias: del

Arguments:

  • image-id (required): the ID of the image to delete

Flags:

  • --force, -f: skip confirmation

Example:

$ arvan iaas image delete a1b2c3d4-5678-90ab-cdef-123456789012

Output:

IMAGE TO DELETE
---------------
ID: a1b2c3d4-5678-90ab-cdef-123456789012
Name: My Ubuntu Image
Status: active
AZ: ir-central1-a
Distribution: Ubuntu
Min Disk (GB): 20
Min RAM (MB): 2048

Are you sure you want to delete image 'My Ubuntu Image'? (y/n) y

Image deleted successfully!

Command Reference​

CommandAliasDescriptionArguments
image listlsList all available imagesNone
image showshShow the details of a specific image<image-id>
image uploadupUpload an image from a local file<file-path>
image import-urlimpImport an image from a URL<url>
image deletedelDelete an image from the account<image-id>

Best Practices​

  • Resource limits: when uploading or importing, make sure you set min-disk and min-ram to suit the operating system's needs, so you don't run into problems when creating servers.
  • Regional availability: uploaded images are stored in a specific data center (AZ); to use them in other data centers, you need to upload or import them there too.
  • Image type: distro images are managed by Arvancloud, while private images belong to your project.