Skip to main content

Overview

After creating a VM, you can control its lifecycle with start, stop, and reboot operations. These actions are performed via the API using POST requests to the VM’s action endpoint.

Prerequisites

export RAFF_API_KEY="YOUR_API_KEY"
export RAFF_PROJECT_ID="YOUR_PROJECT_ID"

Stop a VM

Stop a running VM to pause its execution while retaining all resources:
curl -X POST -H "X-API-Key: $RAFF_API_KEY" -H "X-Project-ID: $RAFF_PROJECT_ID" \
  https://api.rafftechnologies.com/api/v1/vms/{vm-id}/stop
Stopped VMs retain their resources (CPU, RAM, storage) and IP address. You are still billed for reserved resources while the VM is stopped.
The VM status transitions to passive when stopped.

Start a VM

Start a stopped VM to resume its execution:
curl -X POST -H "X-API-Key: $RAFF_API_KEY" -H "X-Project-ID: $RAFF_PROJECT_ID" \
  https://api.rafftechnologies.com/api/v1/vms/{vm-id}/start
The VM status transitions back to active once fully booted.

Reboot a VM

Reboot a running VM to restart the operating system:
curl -X POST -H "X-API-Key: $RAFF_API_KEY" -H "X-Project-ID: $RAFF_PROJECT_ID" \
  https://api.rafftechnologies.com/api/v1/vms/{vm-id}/reboot
Reboot performs a graceful restart. The VM briefly transitions through boot states before returning to active.

VM Status Reference

StatusDescriptionBillable
activeRunning and accessibleYes
passiveStopped, resources reservedYes
provisioningBeing createdYes
bootingStarting upYes
initiatingInitial setupYes
finalizingShutting downYes
failureFailed operationNo
unknownUnhandled stateNo

Check VM Status

Retrieve the current status of a VM:
curl -H "X-API-Key: $RAFF_API_KEY" \
  https://api.rafftechnologies.com/api/v1/vms/{vm-id}

List All VMs

View all VMs in your account:
curl -H "X-API-Key: $RAFF_API_KEY" \
  https://api.rafftechnologies.com/api/v1/vms

Next Steps