Instances are nothing but running virtual machines within the Openstack cloud. Cloud environments are designed to be dynamic and this implies that Cloud instances are being spun up and terminated as required. Terminating a cloud instance is easy to do, but equally, it is important to understand some basic concepts of cloud instances.
Cloud instances, such as the instance we have used are not persistent. This means that the data and work you do on that instance only exist for the time that it is running. A Cloud instance, can be rebooted, but once it has been terminated, all data is lost.
To ensure no loss of data, an Open Stack Compute service named nova-volume provides persistent data store functionality that allows you to attach a volume to it that doesn’t get destroyed on termination but, allows you to attach it to running instances. A volume is like a USB drive attached to your instance.
From our Ubuntu machine, list the running instances to identify the instance you want to terminate:
1. We first identify the instance that we want to terminate by issuing the following command from our client:
2. To terminate an instance, we can either specify the name of our instance or use the UUID:
nova delete myInstance
nova delete 6f41bb91-0f4f-41e5-90c3-7ee1f9c39e5a
You can re-run nova list again to ensure your instance is terminated.
We simply identify the instance we wish to terminate by its UUID or by name while using nova list. Once identified, we can specify this as the instance to terminate using nova delete. Once terminated, that instance, no longer exists—it has been destroyed. So if you had any data in there it will be deleted along with the instance.
Free Demo for Corporate & Online Trainings.