Cloud Server Example
This example demonstrates how to provision a new cloud server using the CLI with all required networking flags.
Step 0: List Available VPCs
First, determine which VPC you want to use for your cloud server. List all available VPCs with:
acloud network vpc list
Example output:
NAME ID REGION SUBNETS STATUS
prova 689307f4745108d3c6343b5a ITBG-Bergamo 5 Active
test-cli 69495ef64d0cdc87949b71ec ITBG-Bergamo 0 Active
Choose a VPC with STATUS as Active and note its ID for the next step.
Step 1: Retrieve the VPC URI and Status
Before provisioning a cloud server, ensure your VPC is already created and its status is Active.
Run the following command to get the VPC URI and check its status:
acloud network vpc get {vpc-id} | grep -E "URI|Status"
Example output:
URI: /projects/68398923fb2cb026400d4d31/providers/Aruba.Network/vpcs/69495ef64d0cdc87949b71ec
Status: Active
Note: Only proceed if the status is
Active. If not, wait until the VPC becomes active before continuing.
Step 2: List or Create a Subnet in the VPC
After selecting your VPC, you need a subnet within it. You can list existing subnets for the VPC or create a new one.
To list subnets in your chosen VPC, use the VPC ID:
acloud network subnet list {vpc-id}
Example output:
NAME ID REGION CIDR STATUS
test-cli 694ba1737712ac0032dbe50a ITBG-Bergamo 192.168.0.0/24 Active
test-cli-new 694ba7437712ac0032dbe566 ITBG-Bergamo 192.168.1.0/24 Active
test-cli-new2 694ba7977712ac0032dbe571 ITBG-Bergamo 192.168.2.0/24 Active
e2e-test-1766569838-subnet 694bb7767712ac0032dbe5fc ITBG-Bergamo 192.168.3.0/24 Active
e2e-test-1766570350-subnet 694bb9767712ac0032dbe640 ITBG-Bergamo 192.168.4.0/24 Active
Choose a subnet with STATUS as Active and note its ID and CIDR. If no suitable subnet exists, create a new one using the CLI (see documentation for subnet creation).
Step 3: Extract the Subnet URI
Once you have chosen a subnet, extract its URI for use in the provisioning command. Run:
acloud network subnet get <vpc-id> <subnet-id> | grep URI
Example:
acloud network subnet get 69495ef64d0cdc87949b71ec 694ba1737712ac0032dbe50a | grep URI
Example output:
URI: /projects/68398923fb2cb026400d4d31/providers/Aruba.Network/vpcs/69495ef64d0cdc87949b71ec/subnets/694ba1737712ac0032dbe50a
Note: Save this URI for the cloud server provisioning step.
Step 4: List or Create a Security Group in the VPC
After selecting your subnet, you need a security group within the same VPC. You can list existing security groups or create a new one.
To list security groups in your chosen VPC, use the VPC ID:
acloud network securitygroup list 69495ef64d0cdc87949b71ec
Example output:
NAME ID REGION STATUS
test-cli 694b05ac4d0cdc87949b75f9 ITBG-Bergamo Active
e2e-test-1766569838-sg 694bb7817712ac0032dbe604 ITBG-Bergamo Active
e2e-test-1766570350-sg 694bb9817712ac0032dbe648 ITBG-Bergamo Active
Choose a security group with STATUS as Active and note its ID. If no suitable security group exists, create a new one using the CLI (see documentation for security group creation).
Step 5: Extract the Elastic IP URI (if using public access)
If you chose an Elastic IP, extract its URI for use in the provisioning command. Run:
acloud network elasticip get <elasticip-id> | grep URI
Example:
acloud network elasticip get 694bb7897712ac0032dbe60c | grep URI
Example output:
URI: /projects/68398923fb2cb026400d4d31/providers/Aruba.Network/elasticIps/694bb7897712ac0032dbe60c
Note: Save this URI for the cloud server provisioning step. Skip this step if you do not need public access.
Step 6: Create a Bootable Block Storage
If you want to create a bootable block storage volume (for example, to use a custom image), use the following command. The --region and --zone flags are required:
acloud storage blockstorage create \
--name boot-ubuntu \
--region ITBG-Bergamo \
--zone itbg1-a \
--set-bootable \
--billing-period Hour \
--size 20 \
--tags boot \
--type Performance \
--image LU22-001
Example output:
Block storage created successfully!
ID: 697b389bce7dfeef91532563
Name: boot-ubuntu
Size (GB): 20
Type: Performance
Zone:
Region: ITBG-Bergamo
Status: InCreation
Creation Date: 29-01-2026 10:38:19
Note:
- The
--regionand--zoneflags are required.- Use
--set-bootableto ensure the volume is created as bootable (required when using the--imageflag).- Replace
LU22-001with the desired image code.- Adjust other parameters as needed for your use case.
List of Available Images for Bootable Block Storage
Below are some of the available image codes you can use with the --image flag when creating a bootable block storage. For the full and up-to-date list, see the official ArubaCloud API documentation.
| Image Code | Description | OS Flavor |
|---|---|---|
| alma8 | AlmaLinux 8 64bit | Linux |
| alma9 | AlmaLinux 9 64bit | Linux |
| DE11-001 | Debian 11 64bit | Linux |
| DE12-001 | Debian 12 64bit | Linux |
| LU20-001 | Ubuntu 20.04 64bit | Linux |
| LU22-001 | Ubuntu 22.04 64bit | Linux |
| LU24-001 | Ubuntu 24.04 64bit | Linux |
| osuse15_2_x64_1_0 | openSUSE 15 64bit | Linux |
| WS19-001_W2K19_1_0 | Windows Server 2019 | Windows |
| WS22-001_W2K22_1_0 | Windows Server 2022 | Windows |
Note: Use the value in the "Image Code" column with the
--imageflag. For example:--image LU22-001for Ubuntu 22.04.
Step 7: List or Create an Active Keypair
Before creating your cloud server, you need an active keypair. You can list existing keypairs and select one with status Active, or create a new one if needed.
To list keypairs:
acloud compute keypair list
Example output:
NAME ID PUBLIC_KEY STATUS
amedeo 69007ebf4e7d691466d8621e ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzZB11JRK... Active
Choose a keypair with STATUS as Active and note its ID or NAME. If no suitable keypair exists, create a new one:
acloud compute keypair create --name my-keypair --public-key "$(cat ~/.ssh/id_rsa.pub)"
After creation, verify the new keypair is Active using the list command above.
To extract the keypair URI for use in the provisioning command:
acloud compute keypair get <keypair-id> | grep URI
Example output:
URI: /projects/68398923fb2cb026400d4d31/providers/Aruba.Compute/keyPairs/69007ebf4e7d691466d8621e
Note: Save this URI for the
--keypair-uriflag in the next step.
Step 8: Extract the Boot Disk URI
After creating your bootable block storage, extract its URI to use as the --boot-disk-uri when provisioning your cloud server.
Run:
acloud storage blockstorage get <volume-id> | grep URI
Example:
acloud storage blockstorage get 697b3a0dce7dfeef9153256a | grep URI
Example output:
URI: /projects/68398923fb2cb026400d4d31/providers/Aruba.Storage/blockStorages/697b3a0dce7dfeef9153256a
Note: Save this URI for the --boot-disk-uri flag in the next step.
Note: The block storage must be in
NotUsedstatus before it can be used as a boot disk for a cloud server. You can check the status with:acloud storage blockstorage listExample output:
NAME ID SIZE(GB) REGION ZONE TYPE STATUS
boot-ubuntu 697b3a0dce7dfeef9153256a 20 ITBG-Bergamo Performance NotUsed
Step 9: (Optional) Create a user-data file for cloud-init
If you want to customize your server at boot (e.g., create users, install packages), create a cloud-init.yaml file before provisioning. Example:
#cloud-config
users:
- name: demo
sudo: ALL=(ALL) NOPASSWD:ALL
groups: users, admin
home: /home/demo
shell: /bin/bash
lock_passwd: false
passwd: <hashed-password>
Replace <hashed-password> with a valid hashed password (see cloud-init docs for details). You can add more cloud-init options as needed.