Overview
When you no longer need an instance, you can delete it using the OpenStack command line client or within the DreamCompute dashboard.
Deleting within the dashboard
- Navigate to the DreamCompute page and log into your DreamCompute dashboard.
- On the top left, click the Compute tab.
- From the expanded list click Instances.
- To delete your instance, click the dropdown menu under the Action column next to your instance. From the menu, select Delete Instance.
Deleting using the command line
You must install the OpenStack command line client to run the commands below.
View all instances
List all instances using the list command.
[user@localhost]$ openstack server list +-------------+----------------------+--------+------------+-------------+------------------+ | ID | Name | Status | Task State | Power State | Networks | +-------------+----------------------+--------+------------+-------------+------------------+ | 8a99547e... | myInstanceFromVolume | ACTIVE | None | Running | private=10.0.0.4 | | d7efd3e4... | newInstance | ERROR | None | NOSTATE | | +-------------+----------------------+--------+------------+-------------+------------------+
Delete the instance
Run the delete command to delete the instance. The following example deletes the newInstance instance which is in ERROR state:
[user@localhost]$ openstack server delete newInstance
The command does not notify you that your instance was deleted, but you can add the --wait parameter to prevent further actions being done to the instance while it is being deleted.
Verify it was deleted
To verify that the instance was deleted, run the list command as shown above, or refresh the Compute > Instances page of the DreamCompute dashboard. The instance should no longer show in the list.