Ask Your Question

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

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

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

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

suropatz gravatar image

Hi Sudheesh, You can use the following tiny bash function for the same (

do the following - 1. source 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

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

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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 1,007 times

Last updated: Mar 06 '15