My openstack setup is Mitaka version.
I want to list all the Instances with Project Name.
I tried with below command but it shows Tenant ID but not name.
nova list --all-tenants
My openstack setup is Mitaka version.
I want to list all the Instances with Project Name.
I tried with below command but it shows Tenant ID but not name.
nova list --all-tenants
The command to list all instances of a project is:
openstack server list --all-projects --project $projectname
The parameter --all-projects
is needed to list instances that don't belong to the current project.
There is no way to include projects' names to 'server list' output, so you can just use 'project list' before.
for PROJECT in `openstack project list -c=Name -f=value` ; do echo "$PROJECT" >> server.csv ; openstack server list -c=Name -c=Networks -c=Flavor --status=Active --project $PROJECT --all -f=csv >> server.csv ; done
(--all is the same as --all-projects here)