Overview
Creating a VM on Raff Cloud involves selecting an OS template, a pricing plan (which determines CPU, RAM, and storage), a region, and optional configurations like SSH keys, backups, and VPC networking.
Prerequisites
- A Raff Cloud Platform account with billing set up
- An API key (how to get one)
- A project ID
export RAFF_API_KEY="YOUR_API_KEY"
export RAFF_PROJECT_ID="YOUR_PROJECT_ID"
Create a Basic VM
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "my-ubuntu-server",
"template_id": "<template-uuid>",
"pricing_id": 3,
"region": "us-east"
}'
Required Fields
| Field | Type | Description |
|---|
name | string | A name for your VM (must be unique within your account) |
template_id | string | UUID of the OS template to use |
pricing_id | integer | Pricing plan ID (determines CPU, RAM, storage, bandwidth) |
region | string | Deployment region (e.g., us-east) |
Create a VM with SSH Keys
Provide your public SSH key for passwordless access:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "my-secure-server",
"template_id": "<template-uuid>",
"pricing_id": 3,
"region": "us-east",
"ssh_keys": ["ssh-ed25519 AAAA... user@laptop"]
}'
Create a VM with Backups
Enable automatic backups during creation:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "my-backed-up-server",
"template_id": "<template-uuid>",
"pricing_id": 3,
"region": "us-east",
"backup_type": "weekly",
"backup_time": "8am",
"backup_date": "Saturday"
}'
| Field | Type | Description |
|---|
backup_type | string | daily or weekly |
backup_time | string | Time of day for backup (e.g., 8am) |
backup_date | string | Day for weekly backups (e.g., Saturday) |
Create a VM in a Shared VPC
Place multiple VMs on the same private network by specifying a vpc_id:
# First VM creates a VPC automatically
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "web-server",
"template_id": "<template-uuid>",
"pricing_id": 3,
"region": "us-east"
}'
# Second VM joins the same VPC
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "database-server",
"template_id": "<template-uuid>",
"pricing_id": 5,
"region": "us-east",
"vpc_id": "<vpc-uuid-from-first-vm>"
}'
You can also specify a custom VPC name and CIDR:
curl -X POST https://api.rafftechnologies.com/api/v1/vms \
-H "X-API-Key: $RAFF_API_KEY" \
-H "X-Project-ID: $RAFF_PROJECT_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "my-vm",
"template_id": "<template-uuid>",
"pricing_id": 1,
"region": "us-east",
"vpc_name": "production-vpc",
"vpc_cidr": "10.0.1.0/24"
}'
VM Provisioning States
After creation, your VM transitions through several states before it’s ready:
| Status | Description |
|---|
provisioning | Resources being allocated |
booting | VM is booting up |
initiating | Initial setup running |
active | Ready to use |
Check VM status:
curl -H "X-API-Key: $RAFF_API_KEY" \
https://api.rafftechnologies.com/api/v1/vms/{vm-id}
VM provisioning typically takes 30-90 seconds depending on the template and region.
Next Steps