You can easily check the status of your virtual machines by navigating to the "Virtual Machines" page in Hyperstack or by using the "List virtual machines" Infrahub API endpoint.
You can easily check the status of your virtual machines by navigating to the Virtual Machines page in Hyperstack. This user-friendly interface offers a convenient way to view the running states of your virtual machines, as shown in the example below.
The status of your virtual machines can also be accessed through the List virtual machines Infrahub API endpoint by making a GET request to /core/virtual-machines. This API call provides detailed information about the running states of your virtual machines as, illustrated below.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/virtual-machines" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
{
"status": true,
"message": "Getting VMs successful",
"instances": [
{
"id": 731,
"name": "documentation-vm",
"status": "HIBERNATED",
},
...
]
}
The status field indicates the current running state of the virtual machine. In this example, the status is HIBERNATED, signifying that the virtual machine's state is saved, and all resources, except for storage and IP address, are de-allocated. Billing continues only for the attached storage and IP address during the hibernation period.
References: