Vps

Advanced VM Operations

Perform advanced operations on your virtual machines including rebuilding, resizing, and deletion.

Advanced VM Operations

Perform advanced operations on your virtual machines including rebuilding, resizing, and deletion.

Rebuild VM

POST /projects/{project}/products/{product}/vps/rebuild

Completely rebuild a VM with a new operating system. This will destroy all data on the VM.

⚠️ Warning: This operation will permanently delete all data on the virtual machine. Ensure you have backups before proceeding.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringVPS_DELETE

Request Body

NameTypeDescription
osstringNew operating system (ubuntu, debian, centos, etc.)
versionstringOS version (22.04, 11, 7, etc.)
sshkeysarrayOptional. Array of SSH key UIDs

Available Operating Systems:

  • ubuntu - Ubuntu Linux (versions: 20.04, 22.04, 24.04)
  • debian - Debian Linux (versions: 11, 12)
  • centos - CentOS Linux (versions: 7, 8)
  • rocky - Rocky Linux (versions: 8, 9)
  • almalinux - AlmaLinux (versions: 8, 9)

Example Request:

{
  "os": "debian",
  "version": "11",
  "sshkeys": ["key_abc123", "key_def456"]
}

Response

200 - Success

{
  "success": true
}

400 - VM Must Be Offline

{
  "error": "Error, the vps must be offline to rebuild."
}

Resize VM

POST /projects/{project}/products/{product}/vps/resize

Upgrade your VM to a larger package with more resources. Note that storage can only be increased, never decreased.

ℹ️ Resize Limitations: You can only resize to a package with more or equal resources. Storage size cannot be decreased for data safety reasons.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringORDER_PRODUCT

Request Body

NameTypeDescription
packagestringNew package name (Standard, Premium, etc.)

Available Packages:

  • Basic - 1 vCore, 1GB RAM, 25GB storage
  • Standard - 2 vCores, 2GB RAM, 50GB storage
  • Premium - 4 vCores, 4GB RAM, 100GB storage
  • Enterprise - 8 vCores, 8GB RAM, 200GB storage

Example Request:

{
  "package": "Standard"
}

Response

200 - Success

{
  "success": true
}

400 - Invalid Resize

{
  "error": "Error, storage must be larger than the current package."
}

Delete VM

DELETE /projects/{project}/products/{product}/vps/delete

Permanently delete a virtual machine. This operation is only available for hourly-billed VMs.

⚠️ Warning: This operation permanently destroys the virtual machine and all its data. This action cannot be undone.

Path Parameters

NameTypeDescription
projectstringUnique project identifier
productstringUnique product/VM identifier

Headers

NameTypeDescription
AuthorizationstringBearer token for authentication
PermissionstringVPS_DELETE

Response

200 - Success

{
  "success": true
}

400 - Not Allowed

{
  "error": "Error, only hourly billing can be deleted"
}

Best Practices

🔄 Before Rebuilding

  1. Create Backups: Always backup important data before rebuilding
  2. Stop Applications: Ensure all applications are properly stopped
  3. Document Configuration: Save configuration files and settings
  4. Power Off VM: The VM must be offline before rebuilding

📈 Before Resizing

  1. Check Current Usage: Monitor current resource utilization
  2. Plan for Growth: Resize with future needs in mind
  3. Test Applications: Ensure applications can utilize additional resources
  4. Budget Planning: Consider the cost implications of larger packages

🗑️ Before Deleting

  1. Final Backup: Create a final backup of all important data
  2. Cancel Services: Stop any running services and applications
  3. Update DNS: Remove or update DNS records pointing to the VM
  4. Confirm Billing Type: Only hourly-billed VMs can be deleted