Skip to main content

VM Status and State Management

You can easily manage the state of your virtual machine in Hyperstack with the click of a button, giving you control over your usage and costs. You can save money by hibernating your virtual machine when it's not in use, or you can shut down, reboot, or delete resources you no longer need. The following article covers how to manage your VMs and answers many of the commonly asked questions.

In this article


How to change the state of your virtual machine in Hyperstack

info

If you want to save the data from your current session, before hibernating or deleting your virtual machine, back up the data from the temporary storage of the active session, known as the ephemeral disk, to a Shared Storage Volume (SSV). See the instructions below:

How to save your workload data to an SSV

VM data can be stored by utilizing Shared Storage volumes (SSVs).

  1. Create a volume either through Hyperstack, or by using the Infrahub API's "Create volume" endpoint.

  2. Attach and mount the volume to your virtual machine, achieved either through Hyperstack or by using the "Attach volumes to virtual machine" Infrahub API endpoint.

  3. Once the volume is attached to your virtual machine, you can proceed to move or copy the data from the ephemeral disk to the shared storage volume, saving your data.

  4. With the data now saved on the volume, you can modify the state of the virtual machine without the risk of data loss.

In Hyperstack, you can change the state of your virtual machines by following these steps:

  1. Go to the 'My Virtual Machines' page as shown below and click on the name of the virtual machine you want to manage to access its details.

    Hyperstack VM list UI

  2. hover your cursor over the '' dropdown in the top right corner of the window to see the VM state-changing actions available for execution on the virtual machine.

    Hyperstack VM state modification UI

  3. Select the VM state-changing action based on your needs.

  • Stop - Transitions your virtual machine into a SHUTOFF state.
  • Hard Reboot - Restarts the virtual machine's operating system and all its running programs.
  • Hibernate this VM - Transitions your virtual machine into a HIBERNATED state.
  • Delete - Permanently deletes a virtual machine.
note

The transition of your virtual machine to the new state might take some time.

VM state - FAQs

Q: Which virtual machine states incur billing costs?

A: VMs are only billed when in the ACTIVE and SHUTOFF states. Click here to learn more.

We bill only for VMs in the ACTIVE and SHUTOFF states. For HIBERNATED VMs, charges apply only to the storage and public IP addresses that remain attached during hibernation. Transitional states like HIBERNATING or RESTORING do not incur charges. Additionally, the ERROR state resulting from failed VM operations is also charge-free.

States and billing status of virtual machines

The table below details the virtual machine (VM) states, indicating whether each state results in charges.

Power stateDescriptionBilling
ACTIVEThe VM is running. This is the standard working state.Billed
SHUTOFFThe VM has been successfully shutdown. Billing continues for VMs in the SHUTOFF state as all resources, including CPUs, memory, GPUs, storage, and public IP addresses, remain allocated to the VM.Billed
HIBERNATEDWhen a VM is in the HIBERNATED state, its configuration and disk data are saved, and all resources, except storage and IP addresses, are de-allocated. Billing continues only for the storage and public IP addresses that remain attached to the VM.Partially Billed

User-initiated states

The table below outlines the user-initiated transitional states of virtual machines. It's important to note that none of these transitional states result in charges. Additionally, the ERROR state, which occurs due to failed operations on the VM, incurs no charges.

Power stateDescriptionBilling
HIBERNATINGThe VM is transitioning into a HIBERNATED state.Not Billed
RESTORINGThe VM operating system and software are restarting from HIBERNATION and returning to an ACTIVE state.Not Billed
STARTINGThe request to start the VM has been accepted.Not Billed
STOPPINGThe VM is being stopped. This is the transition state between ACTIVE and SHUTOFF.Not Billed
REBOOTINGThe VM is being restarted, simulating the process of unplugging and rebooting a physical machine.Not Billed
CREATINGThe request to create the VM has been accepted.Not Billed
BUILDThe VM is being built with the specified configuration.Not Billed
DELETINGThe VM is being deleted.Not Billed
ERRORThe VM is stuck in an error state. The last operation on the virtual machine was unsuccessful.Not Billed

References:

Q: How do I check the billing status of my virtual machines?

A: You can easily check the status of your virtual machines in Hyperstack. Click here to learn how.

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.

Hyperstack UI VM Statuses


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.

Example request
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/virtual-machines" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
Response
{
"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 public IP address during the hibernation period.


References:

Q: What is the difference between the virtual machine states SHUTOFF and HIBERNATED?

A: Click here to learn about the differences between VM states in Hyperstack.

When a virtual machine is in the SHUTOFF state, billing persists as the resources it utilizes are exclusively reserved for you.

When a virtual is HIBERNATED, the current state of the VM is saved, resulting in cost savings for the temporarily unused resources. During the HIBERNATED, billing stops for all resources except for the public IP address and storage. When you RESTORE your virtual machine, you will regain access with the same resource configuration, and billing resumes for these resources.

You won't incur charges for transition states like HIBERNATING or RESTORING, and there are no charges for a VM in the ERROR state resulting from failed operations.


Click here for instructions on how to change the state of your virtual machines.

In Hyperstack, you can change the state of your virtual machines using these steps:

  1. Go to the details page of the VM you want to modify as illustrated below, and hover your cursor over the "More Options V" dropdown in the top right corner of the window to see the VM state-changing actions available for execution on the virtual machine. Hyperstack VM state modification UI

  2. Select the VM state-changing action based on your needs.

  • Stop - Transitions your virtual machine into a SHUTOFF state.
  • Hard Reboot - Restarts the virtual machine's operating system and all its running programs.
  • Hibernate this VM - Transitions your virtual machine into a HIBERNATED state.
  • Delete - Permanently deletes a virtual machine.
note

The transition of your virtual machine to the new state might take some time.


Changing VM state using the Infrahub API:

The Infrahub API can be used to HIBERNATE or DELETE your virtual machine, refer to the instructions available here.


info

To avoid data loss, before modifying your virtual machines (hibernate, resize, or delete), back up the data from the temporary storage of the current session, known as the ephemeral disk, to one or more Shared Storage Volumes (SSVs). See the instructions below:

How to save your workload data to an SSV

VM data can be stored by utilizing Shared Storage volumes (SSVs).

  1. Create a volume either through Hyperstack, or by using the Infrahub API's "Create volume" endpoint.

  2. Attach and mount the volume to your virtual machine, achieved either through Hyperstack or by using the "Attach volumes to virtual machine" Infrahub API endpoint.

  3. Once the volume is attached to your virtual machine, you can proceed to move or copy the data from the ephemeral disk to the shared storage volume, saving your data.

  4. With the data now saved on the volume, you can modify the state of the virtual machine without the risk of data loss.

References:

Q: Why am I being charged for a VM in SHUTOFF state?

A: Click here to learn why billing continues for SHUTOFF VMs and how to avoid it.

When you stop a virtual machine to transition it into a SHUTOFF state, billing continues as the resources it utilizes remain exclusively reserved for you.

To stop billing costs, make sure the virtual machine is either HIBERNATED or deleted.

You won't incur charges for transition states like HIBERNATING or RESTORING, and there are no charges for a VM in the ERROR state resulting from failed operations.


How to change the state of your virtual machines within Hyperstack:

In Hyperstack, you can change the state of your virtual machines using these steps:

  1. Go to the details page of the VM you want to modify as illustrated below, and hover your cursor over the "More Options V" dropdown in the top right corner of the window to see the VM state-changing actions available for execution on the virtual machine. Hyperstack VM state modification UI

  2. Select the VM state-changing action based on your needs.

  • Stop - Transitions your virtual machine into a SHUTOFF state.
  • Hard Reboot - Restarts the operating system and all its running programs.
  • Hibernate this VM - Transitions your virtual machine into a HIBERNATED state.
  • Delete - Permanently deletes a virtual machine.
note

The transition of your virtual machine to the new state might take some time.


Changing VM state using the Infrahub API:

The Infrahub API can be used to HIBERNATE or DELETE your virtual machine, refer to the instructions available here.


info

To avoid data loss, before modifying your virtual machines (hibernate, resize, or delete), back up the data from the temporary storage of the current session, known as the ephemeral disk, to one or more Shared Storage Volumes (SSVs). See the instructions below:

How to save your workload data to an SSV

VM data can be stored by utilizing Shared Storage volumes (SSVs).

  1. Create a volume either through Hyperstack, or by using the Infrahub API's "Create volume" endpoint.

  2. Attach and mount the volume to your virtual machine, achieved either through Hyperstack or by using the "Attach volumes to virtual machine" Infrahub API endpoint.

  3. Once the volume is attached to your virtual machine, you can proceed to move or copy the data from the ephemeral disk to the shared storage volume, saving your data.

  4. With the data now saved on the volume, you can modify the state of the virtual machine without the risk of data loss.

References:

Q: I shutdown a virtual machine manually, but the current state is not accurately reflected in Hyperstack.

A: Click here to learn why this unintended behavior occurs and how to resolve it.

The use of the VM "Shutdown now" option is currently resulting in this unintended behavior. The VM was expected to shut down and update the Dashboard with its new status, but this communication did not occur. Consequently, it became stuck in the "stopping" state even though it was already shut off. To resolve this, we manually update the status on your dashboard to accurately reflect the current state.

Please reach out to support for assistance at [email protected].

We are actively working towards a resolution for this issue.


References:

Q: My virtual machine is ACTIVE but not reachable.

A: Click here to learn why this issue occurs and explore possible solutions.

If, after successfully deploying a virtual machine, it displays the ACTIVE status, but attempts to connect indicate it's unreachable, the VM may still be booting. Especially if it's a VM with a large, high-performance flavor like the 8xH100, the booting process might take several minutes after it shows an ACTIVE status. Please verify the accurate status of the VM by checking the VM console.

To troubleshoot potential issues with SSH connection, click here.


References:


API operations for managing VM states

OperationsEndpoints
Start a virtual machineGET /core/virtual-machines/{virtual_machine_id}/start
Stop a virtual machineGET /core/virtual-machines/{virtual_machine_id}/stop
Hard-reboot a virtual machineGET /core/virtual-machines/{virtual_machine_id}/hard-reboot
Hibernate a virtual machineGET /core/virtual-machines/{virtual_machine_id}/hibernate
Restore a virtual machine from hibernationGET /core/virtual-machines/{virtual_machine_id}/hibernate-restore
Delete a virtual machineDELETE /core/virtual-machines/{virtual_machine_id}

To see a list of states and statuses returned by VM management APIs, click here.


Back to top