How to quickly find which project one VM belongs to

In multi-tenants OpenStack environment, you possibly need to quickly find which project one VM belongs to.

From CLI, I just found out a quick way.

Step 1:

[root@openstack RC]# nova list –all-tenants | grep 10.42.130.174
| 1c1c1051-2b28-47a6-9019-9ac2e3670587 | lnxau2004-001 | bc1dff54cfc841dfb8cc5b56e75d10e9 | ACTIVE | – | Running | sls1-dev-isd-waz001=10.42.130.174

From the output of Step 1, we can the project ID bc1dff54cfc841dfb8cc5b56e75d10e9

Step 2:

[root@openstack RC]# openstack project show bc1dff54cfc841dfb8cc5b56e75d10e9

…..

| id | bc1dff54cfc841dfb8cc5b56e75d10e9 |
| name | TST1 |

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s