Help with running Openstack on VirtualBox
Posted: 26. Nov 2012, 07:14
Hi,
I'm successfully able to start up an Openstack installation, as per devstack.org, running inside a VBox Ubuntu instance. I can upload an image and start it up, but once in the image I cannot usually access the internet.
My VBox was created with Vagrant. It has a NAT network at 10.0.2.15 on eth0, and host-only on 192.168.33.10 on eth1, and a bridged network on eth2 that I sometimes include or exclude, as well as some other stuff.
I ssh into the VBox instance and start up Openstack. OS runs on 10.0.2.15, supposedly, and I can curl 10.0.2.15 OR 192.168.33.10 and I'll get the OS login page.
One very minor problem is I can't access the OS login page from my host browser using 10.0.2.15, but I can at 192.168.33.10, I don't know why.
The bigger problem is getting a machine created in OS to be able to access the rest of the network.
When you first start up an instance in Openstack it creates on the VBox instance (that is, the guest) a bridge br100 at IP 10.0.0.1, bridged with eth0. Then on the OS instance (that is, the guest of the guest) it requests an IP from the DHCP at 10.0.2.2 and usually gets back a response to assign it some 10.0.2.17 or whatever. So it is getting the IP from VBox's DHCP.
Problem is, when it does this I can't ping a single IP. Says Destination Host Unreachable.
Upon restarting the nework (/etc/init.d/networking restart) by some strange miracle I sometimes (like 1/32 times) get back a DHCP response not from 10.0.2.2 but from 10.0.0.1. It'll then give the OS instance a 10.0.0.x IP, and I can access the intertubes! yay!
So, how do I do this consistently? I know very little of networking and I've spent a whole week on the networking issue, so help would be appreciated.
Thank you.
On vagrant box before creating an OS instance:
On vagrant instance after creating an OS instance:
I'm successfully able to start up an Openstack installation, as per devstack.org, running inside a VBox Ubuntu instance. I can upload an image and start it up, but once in the image I cannot usually access the internet.
My VBox was created with Vagrant. It has a NAT network at 10.0.2.15 on eth0, and host-only on 192.168.33.10 on eth1, and a bridged network on eth2 that I sometimes include or exclude, as well as some other stuff.
I ssh into the VBox instance and start up Openstack. OS runs on 10.0.2.15, supposedly, and I can curl 10.0.2.15 OR 192.168.33.10 and I'll get the OS login page.
One very minor problem is I can't access the OS login page from my host browser using 10.0.2.15, but I can at 192.168.33.10, I don't know why.
The bigger problem is getting a machine created in OS to be able to access the rest of the network.
When you first start up an instance in Openstack it creates on the VBox instance (that is, the guest) a bridge br100 at IP 10.0.0.1, bridged with eth0. Then on the OS instance (that is, the guest of the guest) it requests an IP from the DHCP at 10.0.2.2 and usually gets back a response to assign it some 10.0.2.17 or whatever. So it is getting the IP from VBox's DHCP.
Problem is, when it does this I can't ping a single IP. Says Destination Host Unreachable.
Upon restarting the nework (/etc/init.d/networking restart) by some strange miracle I sometimes (like 1/32 times) get back a DHCP response not from 10.0.2.2 but from 10.0.0.1. It'll then give the OS instance a 10.0.0.x IP, and I can access the intertubes! yay!
So, how do I do this consistently? I know very little of networking and I've spent a whole week on the networking issue, so help would be appreciated.
Thank you.
On vagrant box before creating an OS instance:
Code: Select all
root@precise64:~# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes
root@precise64:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.33.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
root@precise64:~# arp
Address HWtype HWaddress Flags Mask Iface
10.0.0.1 ether 4c:60:de:32:58:a1 C eth2
10.0.2.2 ether 52:54:00:12:35:02 C eth0
10.0.2.3 ether 52:54:00:12:35:03 C eth0
root@precise64:~# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:88:0c:a6
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe88:ca6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10160 errors:0 dropped:0 overruns:0 frame:0
TX packets:8145 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3930810 (3.9 MB) TX bytes:1153070 (1.1 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:98:4f:44
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe98:4f44/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:80 errors:0 dropped:0 overruns:0 frame:0
TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9482 (9.4 KB) TX bytes:578 (578.0 B)
eth2 Link encap:Ethernet HWaddr 08:00:27:1b:be:30
inet addr:10.0.0.23 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe1b:be30/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1092 errors:0 dropped:0 overruns:0 frame:0
TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:138269 (138.2 KB) TX bytes:2925 (2.9 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:16436 Metric:1
RX packets:84221 errors:0 dropped:0 overruns:0 frame:0
TX packets:84221 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1101324081 (1.1 GB) TX bytes:1101324081 (1.1 GB)
virbr0 Link encap:Ethernet HWaddr c6:f8:03:85:50:b9
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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)
root@precise64:~# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet 169.254.169.254/32 scope link lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:88:0c:a6 brd ff:ff:ff:ff:ff:ff
inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
inet6 fe80::a00:27ff:fe88:ca6/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:98:4f:44 brd ff:ff:ff:ff:ff:ff
inet 192.168.33.10/24 brd 192.168.33.255 scope global eth1
inet6 fe80::a00:27ff:fe98:4f44/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:1b:be:30 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.23/24 brd 10.0.0.255 scope global eth2
inet6 fe80::a00:27ff:fe1b:be30/64 scope link
valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether c6:f8:03:85:50:b9 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
root@precise64:~#
root@precise64:~# ip route
default via 10.0.2.2 dev eth0
10.0.0.0/24 dev eth2 proto kernel scope link src 10.0.0.23
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
192.168.33.0/24 dev eth1 proto kernel scope link src 192.168.33.10
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1Code: Select all
root@precise64:~# brctl show
bridge name bridge id STP enabled interfaces
br100 8000.080027880ca6 no eth0
vnet0
virbr0 8000.000000000000 yes
root@precise64:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 br100
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 br100
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 br100
192.168.33.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
root@precise64:~# arp
Address HWtype HWaddress Flags Mask Iface
192.168.33.1 ether 0a:00:27:00:00:00 C eth1
10.0.2.2 ether 52:54:00:12:35:02 C br100
10.0.2.3 ether 52:54:00:12:35:03 C br100
root@precise64:~# ifconfig
br100 Link encap:Ethernet HWaddr 08:00:27:88:0c:a6
inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::9851:8dff:fe11:b33e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:218 errors:0 dropped:0 overruns:0 frame:0
TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13965 (13.9 KB) TX bytes:16465 (16.4 KB)
eth0 Link encap:Ethernet HWaddr 08:00:27:88:0c:a6
inet6 addr: fe80::a00:27ff:fe88:ca6/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11048 errors:0 dropped:0 overruns:0 frame:0
TX packets:8656 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4003319 (4.0 MB) TX bytes:1230657 (1.2 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:98:4f:44
inet addr:192.168.33.10 Bcast:192.168.33.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe98:4f44/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:324 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:53422 (53.4 KB) TX bytes:250262 (250.2 KB)
eth2 Link encap:Ethernet HWaddr 08:00:27:1b:be:30
inet addr:10.0.0.23 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe1b:be30/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2303 errors:0 dropped:0 overruns:0 frame:0
TX packets:45 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:300981 (300.9 KB) TX bytes:5973 (5.9 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:16436 Metric:1
RX packets:197028 errors:0 dropped:0 overruns:0 frame:0
TX packets:197028 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:2172313709 (2.1 GB) TX bytes:2172313709 (2.1 GB)
virbr0 Link encap:Ethernet HWaddr c6:f8:03:85:50:b9
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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)
vnet0 Link encap:Ethernet HWaddr fe:16:3e:1f:8f:21
inet6 addr: fe80::fc16:3eff:fe1f:8f21/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 B) TX bytes:642 (642.0 B)
root@precise64:~# ip address
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet 169.254.169.254/32 scope link lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br100 state UP qlen 1000
link/ether 08:00:27:88:0c:a6 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a00:27ff:fe88:ca6/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:98:4f:44 brd ff:ff:ff:ff:ff:ff
inet 192.168.33.10/24 brd 192.168.33.255 scope global eth1
inet6 fe80::a00:27ff:fe98:4f44/64 scope link
valid_lft forever preferred_lft forever
4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 08:00:27:1b:be:30 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.23/24 brd 10.0.0.255 scope global eth2
inet 10.0.0.12/24 brd 10.0.0.255 scope global secondary eth2
inet6 fe80::a00:27ff:fe1b:be30/64 scope link
valid_lft forever preferred_lft forever
5: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether c6:f8:03:85:50:b9 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
9: br100: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 08:00:27:88:0c:a6 brd ff:ff:ff:ff:ff:ff
inet 10.0.0.1/24 brd 10.0.0.255 scope global br100
inet 10.0.2.15/24 brd 10.0.2.255 scope global br100
inet6 fe80::9851:8dff:fe11:b33e/64 scope link
valid_lft forever preferred_lft forever
10: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br100 state UNKNOWN qlen 500
link/ether fe:16:3e:1f:8f:21 brd ff:ff:ff:ff:ff:ff
inet6 fe80::fc16:3eff:fe1f:8f21/64 scope link
valid_lft forever preferred_lft forever
root@precise64:~# ip route
default via 10.0.2.2 dev br100
10.0.0.0/24 dev eth2 proto kernel scope link src 10.0.0.23
10.0.0.0/24 dev br100 proto kernel scope link src 10.0.0.1
10.0.2.0/24 dev br100 proto kernel scope link src 10.0.2.15
192.168.33.0/24 dev eth1 proto kernel scope link src 192.168.33.10
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1