Manage Existing Virtual Machine Operations
A set of operations for managing existing virtual machine resources.
Endpoint Name | URL | Description |
---|---|---|
Start virtual machine | GET /core/virtual-machines/{id}/start | Starts a virtual machine. |
Stop virtual machine | GET /core/virtual-machines/{id}/stop | Shuts down a virtual machine. |
Hard-reboot virtual machine | GET /core/virtual-machines/{id}/hard-reboot | Reboots a virtual machine. |
Hibernate virtual machine | GET /core/virtual-machines/{id}/hibernate | Initiates the hibernation of a virtual machine. |
Restore hibernated virtual machine | GET /core/virtual-machines/{id}/hibernate-restore | Resumes a virtual machine from hibernation. |
Resize virtual machine | GET /core/virtual-machines/{virtual_machine_id}/resize | Modifies the hardware specifications of a virtual machine. |
Delete virtual machine | DELETE /core/virtual-machines/{id} | Permanently deletes a virtual machine. |
VM API states and statuses
Below, you will find a detailed breakdown of the various virtual machine operations and their associated statuses at various points in a VM's lifecycle:
- The Infrahub API returns the
vm_state
field describing the VM's current stable state when no ongoing API call to Infrahub is in progress. It reflects the expected state of the VM from the customer's perspective.
Create a VM: POST https://infrahub-api.nexgencloud.com/v1/core/virtual-machines
Status | Description |
---|---|
CREATING | Infrahub has accepted the request to create the VM. |
BUILD | The VM is being built with the provided configuration. |
ACTIVE | The VM is now running and ready for use. |
ERROR | This status appears if the VM build stage encounters a failure. |
Stop a VM: GET https://infrahub-api.nexgencloud.com/v1/core/virtual-machines/{id}/stop
Status | Description |
---|---|
STOPPING | Infrahub has accepted the request to stop the VM. |
SHUTOFF | The VM has been successfully shut down. |
Start a VM: GET /core/virtual-machines/{virtual_machine_id}/start
Hard reboot a VM: GET /core/virtual-machines/{virtual_machine_id}/hard-reboot
Status | Description |
---|---|
STARTING | Infrahub has accepted the request to start the VM. |
REBOOTING | Infrahub has accepted the request to perform a hard reboot on the VM, simulating the process of unplugging and rebooting a physical machine. |
ACTIVE | The VM is now running. |