I am trying to figure out how many shutdown guests (or tenants) there are on a host versus the total number of guests on a host. I'm able to hard-code it using nova list
, grep
and wc -l
but I was wondering if there are any flags or cleaner ways of getting this information.
Thanks
I have tested these commands in OpenStack Newton.
You can list all the shutdown guests by running the below command
nova list --status SHUTOFF
If you want to list shutdown guests on a compute node, find the compute hostname and use the name with --host argument
nova host-list
nova list --host compute1 --status SHUTOFF