Skip to main content

clouder vm

Manage virtual machines across cloud providers. Automatically dispatches to the correct cloud based on your current context (Azure, AWS, or OVH).

Commands​

clouder vm create​

Create a virtual machine with interactive prompts.

clouder vm create <name> [OPTIONS]
ArgumentDescription
name (required)Name for the virtual machine
OptionShortDescription
--region-rRegion to create the VM in
--resource-group-gResource group (Azure only)
--vm-sizeVM size (Azure only, e.g. Standard_B2s)
--admin-userAdmin username (Azure only, default: azureuser)
--imageImage: Ubuntu2204, Ubuntu2404, Debian12 (Azure only)

Azure interactive flow:

  1. Resource group — pick an existing one or create new. Selecting an existing RG auto-uses its region.
  2. Region — only prompted if creating a new resource group.
  3. VM size — pick from common sizes or type a custom one.
  4. SSH key — pick an existing key from ~/.ssh/ or generate a new ed25519 key pair.
  5. Confirmation — review and confirm before creating.

The VM is created with a VNet, subnet, NSG (with SSH port 22 open), public IP, and NIC.

Example:

clouder vm create my-vm
clouder vm create my-vm -r westeurope -g my-rg --vm-size Standard_B4ms

clouder vm ls​

List virtual machines in the current context.

clouder vm ls
  • Azure: Shows Name, Location, VM Size, State, OS, Resource Group.
  • AWS: Shows ID, Name tag, Type, State, Zone, Public IP.
  • OVH: Shows ID, Name, Flavor ID, Region, Status.

clouder vm info​

Show detailed information for a VM in the current context.

clouder vm info <name>

Current behavior:

  • Implemented for AWS contexts.
  • Prints instance details including instance id, instance type, state, key pair, VPC/subnet, public/private IP.
  • Prints associated ALB details (name, DNS, ARN, target groups) when present.

Example:

clouder ctx set aws <account-id>
clouder vm info oss

clouder vm terminate​

Terminate a virtual machine by name.

clouder vm terminate <name> [OPTIONS]
ArgumentDescription
name (required)Name of the VM to delete
OptionShortDescription
--force-fSkip confirmation prompt

Example:

clouder vm terminate my-vm
clouder vm terminate my-vm --force

AWS behavior:

  • When deleting an AWS VM, Clouder checks whether one or more ALBs are associated with the instance (via target groups).
  • If associations are found, Clouder asks for confirmation to delete ALB resources first.
  • On confirmation, ALB(s) are deleted before EC2 termination is requested.

clouder vm add-alb​

Create or reuse an AWS Application Load Balancer for a VM and enable HTTPS termination.

clouder vm add-alb <vm-name> --certificate-arn <acm-certificate-arn> [OPTIONS]
ArgumentDescription
vm-name (required)Name of the AWS VM (EC2 Name tag) to expose through ALB
OptionDescription
--certificate-arnACM certificate ARN to attach to HTTPS listener (required)
--target-portBackend VM HTTP port (default: 80)

Behavior:

  • AWS context only.
  • Creates/reuses an internet-facing ALB named <vm-name>-alb.
  • Creates/reuses a target group named <vm-name>-tg and registers the instance.
  • Configures listener 443/HTTPS with your ACM certificate and forwards to backend HTTP.
  • Configures listener 80/HTTP to redirect to HTTPS.
  • Opens ALB ingress on ports 80 and 443, and allows ALB-to-instance traffic on --target-port.

Example:

clouder ctx set aws <account-id>
clouder vm add-alb oss --certificate-arn arn:aws:acm:us-east-1:123456789012:certificate/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
clouder vm add-alb oss --certificate-arn <acm-arn> --target-port 8080

Example Workflow​

# Set AWS context
clouder ctx set aws <account-id>

# Create a VM (interactive)
clouder vm create my-server

# List VMs
clouder vm ls

# Add HTTPS ALB in front of VM
clouder vm add-alb my-server --certificate-arn <acm-arn>

# SSH into the VM
clouder aws vm-ssh my-server

# Terminate when done
clouder vm terminate my-server