Hello, and welcome to this video demonstrating how to
terminate a compute instance on Oracle Cloud Infrastructure.
In this video we will look at how to terminate an instance through the cloud web console.
We will explain what and how other cloud components are affected when you terminate an instance.
Opening the web console we are looking at the details for the instance we want to terminate.
When the instance is terminated any additional Virtual Network Interface Cards, or VNICs,
or block volumes, are automatically detached.
Scrolling down, under Resources, we click on Attached Block Volumes.
We see one attached block volume called mor-demo-bv20, and when we terminate the instance, this block
volume will automatically be detached through the web console.
Remember to perform any required backups before terminating the instance.
And for any NVMe storage deleted during the termination, note that the data is securely
erased and not recoverable.
Block volumes must be detached locally on the instance before they are detached during
termination in the web console.
To do this manually on the instance, you use iSCSI ADM commands.
To see the iSCSI ADM commands, beside our instance, we click the three dots menu and
select iSCSI Commands and Information.
This gives us a dialog box showing the commands used to attach and detach this particular
block volume to and from the instance.
In the Commands for Disconnecting section we see the commands which would be run on
the command line in order to detach the volume locally on the instance.
And after that we can detach it from the web console.
There is a Copy button which allows us to copy the commands to the clipboard, and then
we can paste them to the command line.
Detaching can also be done automatically.
On an Oracle Linux instance with the OCI Utilities package installed, an OCI-Utils process on
the instance will automatically detach the volumes for you during the termination process.
We are running the OCI-Utils package on our instance which will automatically perform
the local detachment for us, so we do not have to do the manual detachment now.
Remember to look for other videos which are also available on how to use OCI-Utils in
more detail.
Clicking Close we return to the instance details.
Under Resources we click on Attached VNICs, and see two VINCs, the primary VNIC, and a
secondary VNIC called mortest50-vnic2.
When we terminate the instance these VNICs will automatically be detached and removed
from the instance during the termination process.
Clicking on Boot Volume under Resources, we see the boot volume associated with this particular
instance.
When starting the termiantion sequence we will be given the option to have the boot
volume deleted with the instance, or left available to launch another instance, or be
attached as a data volume to an instance.
Scrolling back up to the instance details, we start the termination process by clicking
on the More Actions dropdown, and selecting Terminate.
We get a dialog asking to confirm to terminate the instance.
The dialog also offers a checkbox for us to delete the boot volume.
Checking this will request the boot volume be deleted, but in our case we want to retain
it, so we leave it unchecked.
We click the Terminate Instance button to begin the termination process.
Back on the instance details page we see the 'Terminating' indicator informing us the instance
is being terminated.
This will take a few seconds, and if we scroll down we can see components of the instance
being detached and removed from it.
Selecting Block Volumes, we can now see the block volume being detached, and then removed
when this completes.
Selecting Attached VNICs, the after a few minutes the VNICs detaching and being removed,
starting with the secondary VNIC, followed by the primary VNIC.
Selecting Boot Volume, we can see the boot volume is already detached, but still listed
as it has not been removed from the cloud infrastructure.
Scrolling back up to the instance details, we see the instance is now marked as Terminated.
When an instance is terminated it is removed from the cloud infrastructure but its information
remains listed for some time in the web console.
We click on the navigation menu, then Compute, and Instances.
We see the instance refreshes to show Terminated.
Scrolling across we select the three dots menu, and see the options are greyed out,
indicating we are unable to do anything with the instance.
Selecting the navigation menu again, and Compute, then Boot Volumes, we get our list of boot
volumes in our compartment.
We can see the boot volume from our terminated instance is now available and ready to be
used to launch another instance or be attached as a data volume.
Oracle provides an extensive number of resources which you can use to learn more about this
subject and others.
Use the links here to find more content about this video, as well as Oracle Linux and using
Linux on Oracle Cloud Infrastructure.
Thats the end of the video.
Thanks for watching.