Skip to main content

CLI quickstart

Three representative ECI CLI workflows, walked step by step.

Prerequisites

1. Launch and connect to your first VM

Step 1. Launch

eci compute vm launch \
--name my-vm \
--instance-type C-2 \
--password '<password>'

Defaults applied automatically:

CPU (C-, M-)GPU / NPU (G-, N-)
ImageUbuntu 24.04 StandardUbuntu 24.04 AI/GPU
Disk size20 GiB50 GiB
Password rules
  • At least 10 characters
  • At least 3 character classes (upper, lower, digit, symbol)
  • No 3-or-more sequences like 1234 or abcd

Step 2. Check status

eci compute vm list # full list
eci compute vm get my-vm # disk / NIC / public IP all in one
Expected duration

Usually takes 1–2 minutes to reach status: started.

Step 3. SSH

eci compute ssh my-vm

Step 4. Clean up

eci compute vm delete my-vm --cascade
Avoid lingering charges

Without --cascade, the disk, NIC, and public IP are left behind and continue to be billed.


2. Repeat-launch with a saved spec

Save a frequently used option set as a vm-spec so you don't retype every time.

Step 1. Save the spec

eci vm-spec save my-spec \
--instance-type C-2 \
--image "Ubuntu 24.04 LTS (Standard)" \
--size-gib 20 \
--username ubuntu

Step 2. Launch with the spec

eci compute vm launch --name my-vm-1 --spec my-spec --password '<password>'
eci compute vm launch --name my-vm-2 --spec my-spec --password '<password>'

To override a few fields per launch, pass extra flags:

eci compute vm launch --name my-vm-3 --spec my-spec --size-gib 100 --password '<password>'

Step 3. Clean up

eci compute vm delete my-vm-1 --cascade
eci compute vm delete my-vm-2 --cascade
eci compute vm delete my-vm-3 --cascade
eci vm-spec delete my-spec

3. Attach an extra disk with automatic snapshots

Create a separate data volume, attach it to a VM, and set up nightly snapshots.

Step 1. Prepare the VM

eci compute vm launch --name data-vm --instance-type C-2 --password '<password>' --wait

Step 2. Create and attach block storage

eci storage block create --name data-vol --size-gib 50 --pricing "Block Storage"
eci storage block attach data-vol --vm data-vm

Step 3. Automatic snapshot scheduler (nightly midnight, keep 7)

eci storage block scheduler create \
--name nightly --block data-vol \
--cron "0 0 * * *" --max-snapshots 7

Step 4. Clean up

eci storage block scheduler delete nightly
eci storage block detach data-vol
eci storage block delete data-vol
eci compute vm delete data-vm --cascade

Next