Stopping an instance
Sometimes, an instance will need to be stopped for a number of reasons, for example, maintenance and offline migration, yet as an OpenStack administrator, you may not want to completely destroy the instance and data associated with it. Thus, you will want to stop the instance instead.
Getting ready
To stop an instance, you will need the following:
The
openstackcommand-line clientThe
openrcfile containing appropriate credentialsThe name of the instance
How to do it…
In this example, we will be stopping the cookbook.test instance created in the Booting an instance recipe. To stop the instance, use the following steps:
First, we list the running instances:
openstack server listThis will bring back a list of the running instances. Consider this example:

To stop the instance, simply issue the following command:
openstack server stop cookbook.testNote
This command takes a few moments to complete and will not display the output if successful.
Now list instances to confirm the status...