Stopping and Starting an Instance using the CLI

Use either a Suspend or Shelve method to stop and start an instance.

Suspending and Resuming an Instance

The Suspend method stores the VM state on disk and stops the machine, similar to hibernation. Administrative users may suspend a server if it is infrequently used or to perform system maintenance.

To initiate a hypervisor-level suspend operation:

$ openstack server suspend <INSTANCE>

To resume a suspended instance:

$ openstack server resume <INSTANCE>

Shelving and Unshelving an Instance

The Shelve method is useful if you have an instance that you are not using, but would like to retain in your list of servers. For example, you can stop an instance at the end of a work week, and resume work again at the start of the next week. All associated data and resources are preserved; however, anything still in memory is not retained. If a shelved instance is no longer needed, it can be removed.

To shelve an instance:

Shelving an instance shuts it down and stores it with associated data and resources. A snapshot is taken if the instance is not backed-up in a volume.

Warning: Anything in memory is lost.

$ openstack server shelve <INSTANCE>

To restore the instance:

$ openstack server unshelve <INSTANCE>

If an instance is no longer needed, you can move the instance off the hypervisor to minimize resource usage.