How to pause, suspend, stop and start an instance

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

In the following examples, myInstance is the name of your instance.

You can view the name of your instance in the DreamCompute dashboard.

Pause and unpause an instance

To pause an instance, run the following command:

[user@localhost]$ 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:

[user@localhost]$ openstack server unpause myInstance

Suspend and resume an instance

To suspend an instance, run the following command:

[user@localhost]$ openstack server suspend myInstance

To resume a suspended instance, run the following command:

[user@localhost]$ openstack server resume myInstance

Stop and start an instance

To stop an instance, run the following command:

[user@localhost]$ openstack server stop myInstance

To start a stopped instance, run the following command:

[user@localhost]$ 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:

[user@localhost]$ 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 .