Ask Your Question
1

How can you list hosts on which VMs created by a tenant?

asked 2013-08-26 04:37:04 -0500

Sudheesh gravatar image

1)How can you list hosts on which VMs created by a tenant? 2) I also want to see hosts which are shared between two tenants

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2015-03-06 12:17:12 -0500

suropatz gravatar image

Hi Sudheesh, You can use the following tiny bash function for the same https://github.com/surojit-pathak/openstack-tools/blob/master/nova_utils.sh#L14 (https://github.com/surojit-pathak/ope...)

do the following - 1. source nova_utils.sh 2. suro_novawrap_list_vm_with_hv

Feel free to taylor, as per your use -

for iid in nova list | grep ACTIVE | awk '{print $2}'; do hv=nova show $iid | grep hypervisor_hostname | awk '{print $4}' name=nova show $iid | grep "^| name" | awk '{print $4}' hostname=nova show $iid | grep "^| hostname" | awk '{print $4}' tenantid=nova show $iid | grep "^| tenant_id" | awk '{print $4}' # echo $name, $hostname, $hv, $tenantid printf "Host:%-32s, HV: %-32s, Tenant-Id: %s, Name: %s\n" $hostname $hv $tenantid $name done

edit flag offensive delete link more
1

answered 2015-03-05 17:49:12 -0500

You can do this from the horizon dashboard under the admin project. You can sort by project name, hypervisor name or others by clicking the name at the top of the list.

First by Project Name

image description

Next by Hypervisor Host

image description

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-08-26 04:37:04 -0500

Seen: 882 times

Last updated: Mar 06 '15