List All VMs in OpenStack Region
Problem
The need exists to obtain a complete list of all Virtual Machines running in an OpenStack region.
Environment
- Platform9 Managed OpenStack - All Versions
- OpenStack Unified CLI
Procedure
- Source the admin RC file for your environment.
- Get a list of all VMs across all projects and users and copy it to a text file.
- This list can be pretty long if your environment has many users and only one region. In that case, you can filter the output using various parameters. For eg., you can use this command to get a list of only those instances which are in an 'Active' state.
- Additional filters are available and can be explored by using the '-h' flag on the server list command.
- The output can be printed out in various data formats depending on how you plan to consume this list.
- The command can also be used to output a single column if all the headers not needed. For eg., the following command will output only a list VM by their UUIDs
Additional Information
Was this page helpful?