How to pause, suspend, stop and start an instance

Using either the OpenStack command line client or DreamCompute dashboard, you can pause, stop, and start an instance.

Choose the 'Dashboard examples' or 'Command line examples' below depending on which one you're more comfortable with.

Dashboard examples

All of these actions can be performed from the 'Compute' > 'Instances' page of the DreamCompute dashboard.

  1. Navigate to the (Panel > 'Cloud Services' > 'DreamCompute') page and log into your DreamCompute dashboard.
  2. On the top left, click the 'Compute' tab.
  3. From the expanded list click 'Instances'.

Pause and unpause an instance

To pause your instance, click the dropdown menu under the 'Action' column next to your instance. From the menu, select 'Pause Instance'.

To resume the instance, click the 'Resume Instance' option from the dropdown menu.

Suspend and resume an instance

To suspend your instance, click the dropdown menu under the 'Action' column next to your instance. From the menu, select 'Suspend Instance'.

To resume the instance, click the 'Resume Instance' option from the dropdown menu.

Stop and start an instance

To stop your instance, click the dropdown menu under the 'Action' column next to your instance.  From the menu, select 'Shut Off Instance'.

Start the instance again by clicking the 'Start Instance' option.

Command line examples

In the following examples, 'myInstance' is the name of your instance. You can view the name of your instance in the DreamCompute dashboard. You must install the OpenStack command line client to run the commands below.

Pause and unpause an instance

To pause an instance, run the following command:

[[email protected]]$ openstack server pause myInstance

This command stores the state of the VM in RAM. A paused instance continues to run in a frozen state.

To unpause an instance, run the following command:

[[email protected]]$ openstack server unpause myInstance

Suspend and resume an instance

To suspend an instance, run the following command:

[[email protected]]$ openstack server suspend myInstance

To resume a suspended instance, run the following command:

[[email protected]]$ openstack server resume myInstance

Stop and start an instance

To stop an instance, run the following command:

[[email protected]]$ openstack server stop myInstance

To start a stopped instance, run the following command:

[[email protected]]$ openstack server start myInstance

Checking your server's status

After you run any of the commands above, you can check your server's status to confirm it's state. Use the show command to view it's current status. In the following example, the server has been suspended:

[[email protected]]$ openstack server show myInstance
+-----------------------------+------------------------------------------------------------+
| Field                       | Value                                                      |
+-----------------------------+------------------------------------------------------------+
| OS-DCF:diskConfig           | AUTO                                                       |
| OS-EXT-AZ:availability_zone | iad-2                                                      |
| OS-EXT-STS:power_state      | Shutdown                                                   |
| OS-EXT-STS:task_state       | None                                                       |
| OS-EXT-STS:vm_state         | suspended                                                  |
| OS-SRV-USG:launched_at      | 2017-10-04T23:11:23.000000                                 |
| OS-SRV-USG:terminated_at    | None                                                       |
| accessIPv4                  |                                                            |
| accessIPv6                  |                                                            |
| config_drive                | True                                                       |
| created                     | 2017-10-04T23:10:55Z                                       |
| flavor                      | gp1.subsonic (100)                                         |
| hostId                      | 570ede2f2db7b70562c4dezfc408c77c99883c0f48f0b9cbf50414a3   |
| id                          | cda78s8c-702d-4117-87bc-b34de0b28554                       |
| image                       |                                                            |
| key_name                    | myKey                                                      |
| name                        | myInstance                                                 |
| project_id                  | e52ede2a460548cf950ba86497300079                           |
| properties                  |                                                            |
| security_groups             | name='default'                                             |
| status                     | SUSPENDED                                                 |
| updated                     | 2017-10-09T23:08:19Z                                       |
| user_id                     | 2981541bcc4be4d49a23787a63eb8320                           |
| volumes_attached            | id='4acc41d7-6zb9-4fdf-8ac0-d45c4452ed0d'                  |
+-----------------------------+------------------------------------------------------------+

Did this article answer your questions?

Article last updated PST.