Reputation: 1
To clean up, I want to see what VM instances have been stopped but not terminated. I don't think there is any policy that will terminate them automatically, and I cannot find a way to see how long the instances have been stopped. I am just working from documentation, though, so anyone with practical experience might be able to offer some advice.
Upvotes: 0
Views: 152
Reputation: 2865
If you are looking for a CLI command, IBM Cloud CLI has an infrastructure-service
plugin to help you see the instance information. The instructions to set up the plugin can be found in this solution tutorial
ibmcloud is instances
You can use grep
with the command to see the instances that are stopped
ibmcloud is instances | grep `stopped`
To get the ID of the stopped VM, run the following command
ibmcloud is instances | grep 'stopped' | awk '{print $1}'
Upvotes: 1