Openstack working from my instance: Connecting to nova.clouds.ubuntu Cannot initiate connection

余生长醉 提交于 2019-12-13 02:05:07

问题


I am new to Openstack, I've installed it using devstack. I launched an instance using ubuntu server cloud image with heat flavor. I can ssh to the instance. The problem is when trying to do:

sudo apt-get update

sudo apt-get install openjdk-7-jdk

I have

0% (connecting to nova.clouds.archive.ubuntu.com ip@)

It keeps changing the ip@ then error cannot initiate connection to nova connect(101: network unreachable)

I am associating floating IP to my instance

Update

ubuntu@selftrusty:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr fa:16:3e:45:31:47  
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe45:3147/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5358 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5994 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:383312 (383.3 KB)  TX bytes:979324 (979.3 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

回答1:


I had to do sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE in the host



来源:https://stackoverflow.com/questions/30125928/openstack-working-from-my-instance-connecting-to-nova-clouds-ubuntu-cannot-init

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!