Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
List All VMs in OpenStack Region
Copy Markdown
Open in ChatGPT
Open in Claude
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.
xxxxxxxxxx$ source [your_rc_file].rc- Get a list of all VMs across all projects and users and copy it to a text file.
xxxxxxxxxx$ openstack server list --all-projects > all_vms- 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.
xxxxxxxxxx$ openstack server list --all-projects --status ACTIVE- Additional filters are available and can be explored by using the '-h' flag on the server list command.
$ openstack server list -h usage: openstack server list [-h] [-f {csv,json,table,value,yaml}] [-c COLUMN] [--max-width [integer]] [--fit-width] [--print-empty] [--noindent] [--quote {all,minimal,none,nonnumeric}] [--sort-column SORT_COLUMN] [--reservation-id [reservation-id]] [--ip [ip-address-regex]] [--ip6 [ip-address-regex]] [--name [name-regex]] [--instance-name [server-name]] [--status [status]] [--flavor [flavor]] [--image [image]] [--host [hostname]] [--all-projects] [--project [project]] [--project-domain [project-domain]] [--user [user]] [--user-domain [user-domain]] [--long] [-n | --name-lookup-one-by-one] [--marker [server]] [--limit [num-servers]] [--deleted] [--changes-since [changes-since]]- The output can be printed out in various data formats depending on how you plan to consume this list.
xxxxxxxxxx$ openstack server list -h usage: openstack server list [-h] [-f {csv,json,table,value,yaml}]- 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
xxxxxxxxxx$ openstack server list --all-project -c IDAdditional Information
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message