Managing virtual machine power state

Prerequisites

To manage the power state of a virtual machine

Admin panel

Click the virtual machine or the ellipsis button next to it to see the full list of actions available for the current state.

  • To power up a VM, click Run.
  • To gracefully shut down a running VM, click Shut down. The default shutdown timeout, after which a virtual machine will be powered off, is 10 minutes. You can configure this timeout per VM by using the vinfra service compute server stop --wait-time command.
  • To forcibly cut off power from a VM, click Power off.
  • To softly reboot a running VM, click Reboot.
  • To reboot a VM without the guest OS graceful shutdown, click Hard reboot.
  • To save the current VM state to a file, click Suspend. This may prove useful, for example, if you need to restart the host but do not want to quit the applications currently running in the VM or restart its guest OS.
  • To restore a VM from the suspended state, click Resume.

Command-line interface

Use the following commands:

  • To power up a virtual machine:

    vinfra service compute server start <server>
  • To gracefully shut down a running virtual machine:

    vinfra service compute server stop <server> [--wait-time <seconds>]
    
    --wait-time <seconds>
    Shutdown timeout, after which a virtual machine will be powered off. Specify ‘-1’ to set an infinite timeout. The default shutdown timeout is 10 minutes.
  • To forcibly cut off power from a virtual machine:

    vinfra service compute server stop <server> --hard
    
  • To softly reboot the running a virtual machine:

    vinfra service compute server reboot <server>
  • To reboot a virtual machine without the guest OS graceful shutdown:

    vinfra service compute server reboot <server> --hard
    
  • To save the current state of a virtual machine to a file:

    vinfra service compute server suspend <server>

    This may prove useful, for example, if you need to restart the host but do not want to quit the applications currently running in the VM or restart its guest OS.

  • To restore a virtual machine from the suspended state:

    vinfra service compute server resume <server>
  • To pause a virtual machine:

    vinfra service compute server pause <server>
  • To continue operation of a virtual machine:

    vinfra service compute server unpause <server>