Ask Your Question

cirros instance cannot get ip address

asked 2015-04-29 10:46:04 -0600

brahimo gravatar image

Hi i am working in an all-in-one VM openstack Juno, i launched the cirros instance (private ip and associate to it a floating ip address (
My external network is
the private network is
a router between the two networks
from the log of the instance it seems like a dhcp problem as it tried to discover the ip address but in vain.
here is the log :

Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
WARN: /etc/rc3.d/S40-network failed
cirros-ds 'net' up at 194.40
failed 1/20: up 194.85. request failed
failed 2/20: up 197.59. request failed
failed 3/20: up 200.13. request failed
failed 4/20: up 202.43. request failed
failed 5/20: up 204.68. request failed
failed 6/20: up 206.99. request failed
failed 7/20: up 209.60. request failed
failed 8/20: up 213.30. request failed
failed 9/20: up 215.56. request failed
failed 10/20: up 217.84. request failed
failed 11/20: up 220.14. request failed
failed 12/20: up 222.43. request failed
failed 13/20: up 224.70. request failed
failed 14/20: up 227.09. request failed
failed 15/20: up 229.56. request failed
failed 16/20: up 231.89. request failed
failed 17/20: up 234.22. request failed
failed 18/20: up 236.58. request failed
failed 19/20: up 238.88. request failed
failed 20/20: up 241.52. request failed
failed to read iid from metadata. tried 20
no results found for mode=net. up 244.38. searched: nocloud configdrive ec2
failed to get instance-id of datasource
Starting dropbear sshd: generating rsa key... generating dsa key... OK
=== system information ===
Platform: Fedora Project OpenStack Nova
Container: none
Arch: x86_64
CPU(s): 2 @ 2124.159 MHz
Cores/Sockets/Threads: 1/2/1
Virt-type: AMD-V
RAM Size: 995MB
vda  253:0   10737418240
vda1 253:1   10725765120 cirros-rootfs /
vdb  253:16    134217728
=== sshd host keys ===

=== network info ===
if-info: lo,up,,8,::1
if-info: eth0,up,,8,fe80::f816:3eff:febe:2828
=== datasource: None None ===
=== cirros: current=0.3.3 uptime=249.88 ===
route: fscanf
=== pinging gateway failed, debugging connection ===
############ debug start ##############
### /etc/init.d/sshd start
Starting dropbear sshd: OK
route: fscanf
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:BE:28:28
          inet6 addr: fe80::f816:3eff:febe:2828/64 Scope:Link
          RX packets:17 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1358 (1.3 KiB)  TX bytes:1132 ...
edit retag flag offensive close merge delete


try assigning ip address statically and try pinging.

SGPJ gravatar imageSGPJ ( 2015-04-29 11:05:54 -0600 )edit

also check this site for similar issues there are solution available.

SGPJ gravatar imageSGPJ ( 2015-04-29 11:11:04 -0600 )edit

Please, post

neutron router-port-list yourRouter
neutron port-show  port-id-of-private-subnet| grep status
dbaxps gravatar imagedbaxps ( 2015-04-29 12:10:02 -0600 )edit

If status is ACTIVE, then run:-

ip netns exec qrouter-your-router-id netstat -antp
It should report  pid of daemon listening at port 9697
ps -ef | grep your_pid
neutron-ns-metadata-proxy should listen port 9697
dbaxps gravatar imagedbaxps ( 2015-04-29 12:14:09 -0600 )edit

When requested steps will be done , we will continue troubleshooting access to nova-metadata server.

dbaxps gravatar imagedbaxps ( 2015-04-29 12:16:17 -0600 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2015-04-29 13:11:45 -0600

brahimo gravatar image

updated 2015-04-29 13:14:49 -0600

Further information.

[root@localhost ~(keystone_admin)]# nova list

| ID                                   | Name     | Status | Task State | Power State | Networks                              |
| 1937ae6a-faee-4972-979e-74be17a26e93 | ciros_in | ACTIVE | -          | Running     | private_net_admin=, |

[root@localhost ~(keystone_admin)]# neutron router-port-list router
| id                                   | name | mac_address       | fixed_ips                                                                        |
| 0240c70a-acdf-4949-add1-9be5fbb9bd0f |      | fa:16:3e:de:a7:05 | {"subnet_id": "90a77aac-9fc3-4b4c-8e9f-79e4fd926253", "ip_address": ""} |
| 682707d3-f3ef-4969-b4fc-c0efe59998e2 |      | fa:16:3e:e9:88:f4 | {"subnet_id": "081c47e9-5aca-4d27-987d-b9cdba15ea85", "ip_address": ""}  |

[root@localhost ~(keystone_admin)]# neutron port-show  0240c70a-acdf-4949-add1-9be5fbb9bd0 | grep status
Unable to find port with name '0240c70a-acdf-4949-add1-9be5fbb9bd0'
[root@localhost ~(keystone_admin)]# neutron port-show  0240c70a-acdf-4949-add1-9be5fbb9bd0f | grep status
| status                | DOWN                                                                             |

the following commands show

[root@localhost log]# ip netns exec qrouter-6bb9233a-b047-4659-9b92-378da2d5a5b2 netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0  *               LISTEN      3221/python

[root@localhost log]# ps -ef | grep 3221
root      3221     1  0 15:26 ?        00:00:00 /usr/bin/python /bin/neutron-ns-metadata-proxy --pid_file=/var/lib/neutron/external/pids/ --metadata_proxy_socket=/var/lib/neutron/metadata_proxy --router_id=6bb9233a-b047-4659-9b92-378da2d5a5b2 --state_path=/var/lib/neutron --metadata_port=9697 --verbose --log-file=neutron-ns-metadata-proxy-6bb9233a-b047-4659-9b92-378da2d5a5b2.log --log-dir=/var/log/neutron
root     11540  2388  0 20:09 pts/2    00:00:00 grep --color=auto 3221
edit flag offensive delete link more


f is missed at the end
neutron port-show 0240c70a-acdf-4949-add1-9be5fbb9bd0f

dbaxps gravatar imagedbaxps ( 2015-04-29 14:40:39 -0600 )edit

You wrote : to dbaxps : the state of private network port is DOWN
It must have ACTIVE status, otherwise no routing to qrouter-namespace.

dbaxps gravatar imagedbaxps ( 2015-04-29 14:48:11 -0600 )edit

Recreate interface to subnet at router first && check status again

dbaxps gravatar imagedbaxps ( 2015-04-29 14:49:15 -0600 )edit

answered 2015-04-29 14:55:19 -0600

dbaxps gravatar image

updated 2015-04-29 14:56:49 -0600

Due to recent comment :- to dbaxps : the state of private network port is DOWN

Recreate interface to private sub-net , ACTIVE status for this port is a MUST to provide routing to qrouter-namespace and make neutron-ns-metadata-proxy available for request sending by CirrOS (or any other VM) on private sub-net.
edit flag offensive delete link more

answered 2015-06-01 19:36:45 -0600

jlausuch gravatar image


I have exactly the same issue. Have checked the attached router port and its ACTIVE.

I use a Cirros VM on that private net, creating a port before. Something like this:

[creation of private network,subnet and router]
neutron port-create --fixed-ip subnet_id=$SUBNET_ID,ip_address= $NET_ID
neutron port-list | grep 120.150
| d7d4d8fd-3aaa-486a-b9cf-75719bbe503d |      | fa:16:3e:10:62:51 | {"subnet_id": "d00279d1-9d8d-41d0-9776-680233496c85", "ip_address": ""} |

nova boot vm-test --image $IMAGE_ID --flavor 1 --nic port-id=d7d4d8fd-3aaa-486a-b9cf-75719bbe503d

[jenkins-ci@lf_pod2 ~]$ nova list | grep vm-test
| 0b381c32-ee29-443e-a8e2-b1ea01e648e9 | vm-test     | ACTIVE | -          | Running     | test-net=     |

The VM boots fine, but looking at the console, still:

Starting network...
udhcpc (v1.20.1) started
Sending discover...
Sending discover...
Sending discover...
Usage: /sbin/cirros-dhcpc <up|down>
No lease, failing
### ifconfig -a
eth0      Link encap:Ethernet  HWaddr FA:16:3E:BA:9C:84  
          inet6 addr: fe80::f816:3eff:feba:9c84/64 Scope:Link
          RX packets:53 errors:0 dropped:45 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5823 (5.6 KiB)  TX bytes:1132 (1.1 KiB)

Any more ideas how to troubleshoot this?

edit flag offensive delete link more

answered 2015-06-04 09:01:14 -0600

hello there,

technically no ip assigned to vm here problem is with your tunnel interface. if you type nova list your vm will be be ACTIVE & RUNNING also an IP will be displayed but internally it is not, This is technically a bug according to me.

if you type nova console-log <instance-id> here there will be no IP.

for every network creation a namespace will be created from that also you can check

ip netns exec qdhcp-****** ifconfig

openstack installation guide clearly states that you need to use two different physical interfaces for management and tunnel network. if this step is correct then IP will be assigned to your VM

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2015-04-29 10:46:04 -0600

Seen: 13,316 times

Last updated: Jun 04 '15