how can I find the IP assigned to every instance created?

asked 2014-07-26 18:26:14 -0600

erenouf gravatar image

I am going to use Heat, most likely, to deploy a network of possibly hundreds of VMs. After it's done is there a way to get a mapping of IP to each instance that was created? I'm not intending to use floating IPs at all, and don't necessarily care about an instance getting a particular IP, I just want to know what it got after the fact.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-07-27 12:48:22 -0600

totten25 gravatar image

if you mean about internal IP address of each instance, you can get it from nova list command and retrieve what you want

edit flag offensive delete link more


That is in fact just what I had been looking for, but had overlooked it there. Thank you very much.

erenouf gravatar imageerenouf ( 2014-07-27 18:27:43 -0600 )edit

answered 2014-07-27 13:09:04 -0600

dbaxps gravatar image

For particular private network :-

[root@icehouse1 ~(keystone_admin)]# neutron net-list
| id                                   | name      | subnets                                             |
| c31089c7-f171-45a8-9a73-64bcd415f280 | demo-net1 | b1e30497-dd4e-41b0-96e0-be2865a28a02    |
| 702e1fe7-62b5-47c8-95fc-a169231a5dde | public    | 96a6f5ad-26bf-4173-a863-9b3f76351820 |
| 430a0ef1-7fc8-40d4-9d25-d69e068b1c98 | private   | 533185f1-f0da-4f16-83bf-192cdc5f53f1    |
| 12e1088e-1edf-488a-b8c9-0a4085ea2803 | demonet   | 30277cb8-479b-4b2d-bc7e-0523c111e742    |
| 1722093c-1852-4eab-a76f-1f9e135880a8 | internal  | 406c861b-d7f2-48ae-bfdf-b8f5a9f43b70    |
[root@icehouse1 ~(keystone_admin)]# ps -ef | grep 1722093c-1852-4eab-a76f-1f9e135880a8
nobody   18869     1  0 13:21 ?        00:00:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tapb1808221-e9 --except-interface=lo --pid-file=/var/lib/neutron/dhcp/1722093c-1852-4eab-a76f-1f9e135880a8/pid --dhcp-hostsfile=/var/lib/neutron/dhcp/1722093c-1852-4eab-a76f-1f9e135880a8/host --addn-hosts=/var/lib/neutron/dhcp/1722093c-1852-4eab-a76f-1f9e135880a8/addn_hosts --dhcp-optsfile=/var/lib/neutron/dhcp/1722093c-1852-4eab-a76f-1f9e135880a8/opts --leasefile-ro --dhcp-range=set:tag0,,static,86400s --dhcp-lease-max=256 --conf-file= --domain=openstacklocal
root     20020 18310  0 22:06 pts/0    00:00:00 grep --color=auto 1722093c-1852-4eab-a76f-1f9e135880a8
[root@icehouse1 ~(keystone_admin)]# cat /var/lib/neutron/dhcp/1722093c-1852-4eab-a76f-1f9e135880a8/addn_hosts    host-50-0-0-1.openstacklocal host-50-0-0-1   host-50-0-0-18.openstacklocal host-50-0-0-18   host-50-0-0-11.openstacklocal host-50-0-0-11   host-50-0-0-23.openstacklocal host-50-0-0-23   host-50-0-0-24.openstacklocal host-50-0-0-24
edit flag offensive delete link more


Thank you, this was very much the road I was headed down, but hadn't strung all the pieces together yet.

While this would clearly work, I think I'm going to go with toten25's answer and just grep it out of the nova list output

erenouf gravatar imageerenouf ( 2014-07-27 18:27:17 -0600 )edit

answered 2014-07-28 03:41:23 -0600

SGPJ gravatar image

For Web interface: from Horizon dashboard -> Instances page. You will get the required info similar to nova list.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-07-26 18:26:14 -0600

Seen: 142 times

Last updated: Jul 28 '14