Dylan
Dylan

Reputation: 1

Is there a way to see a list of stopped VM instances in IBM Cloud?

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

Answers (1)

Vidyasagar Machupalli
Vidyasagar Machupalli

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

Related Questions