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
Name | Type | Description |
---|---|---|
project | string | Unique project identifier |
product | string | Unique product/VM identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Permission | string | VPS_DELETE |
Request Body
Name | Type | Description |
---|---|---|
os | string | New operating system (ubuntu, debian, centos, etc.) |
version | string | OS version (22.04, 11, 7, etc.) |
sshkeys | array | Optional. 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
Name | Type | Description |
---|---|---|
project | string | Unique project identifier |
product | string | Unique product/VM identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Permission | string | ORDER_PRODUCT |
Request Body
Name | Type | Description |
---|---|---|
package | string | New package name (Standard, Premium, etc.) |
Available Packages:
Basic
- 1 vCore, 1GB RAM, 25GB storageStandard
- 2 vCores, 2GB RAM, 50GB storagePremium
- 4 vCores, 4GB RAM, 100GB storageEnterprise
- 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
Name | Type | Description |
---|---|---|
project | string | Unique project identifier |
product | string | Unique product/VM identifier |
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Bearer token for authentication |
Permission | string | VPS_DELETE |
Response
200 - Success
{
"success": true
}
400 - Not Allowed
{
"error": "Error, only hourly billing can be deleted"
}
Best Practices
🔄 Before Rebuilding
- Create Backups: Always backup important data before rebuilding
- Stop Applications: Ensure all applications are properly stopped
- Document Configuration: Save configuration files and settings
- Power Off VM: The VM must be offline before rebuilding
📈 Before Resizing
- Check Current Usage: Monitor current resource utilization
- Plan for Growth: Resize with future needs in mind
- Test Applications: Ensure applications can utilize additional resources
- Budget Planning: Consider the cost implications of larger packages
🗑️ Before Deleting
- Final Backup: Create a final backup of all important data
- Cancel Services: Stop any running services and applications
- Update DNS: Remove or update DNS records pointing to the VM
- Confirm Billing Type: Only hourly-billed VMs can be deleted
Related Topics
- Virtual Machines - Deploy and manage VMs
- VM Management - Control VM power state and access
- Billing & Profile - Understand billing implications of operations