Ask Your Question
0

how to set up openstack local.conf in virtual box

asked 2017-05-26 00:46:39 -0600

openstackplz gravatar image

updated 2017-05-26 01:07:17 -0600

Hi all, I installed Openstack Mitaka using devstack for many times and there were always some bugs. I think it has something to do with the initial network set up.

For virtual box, I added a new host-only network "vboxnet0" with configures:

IPv4:192.168.56.1

IPv4 network mask: 255.255.255.0

Disable DHCP server (the NAT network enabled DHCP)

And for the virtual machine I created, I used Ubuntu 14.04 Desktop, with network configures:

Adapter 1: NAT

Adapter 2: Host-only adapter - vboxnet0.

Then after virtual machine initialisation and basic update, I got:

>>ifconfig
lo - 127.0.0., Mask: 255.0.0.0, scope: host
eth0 - 10.0.2.15, Mask: 255.255.255.0, scope: link
eth1 - 0.0.0.1., Mask: 0.0.0.0, scope: link

So how should I set the devstack/local.conf file? I tried to install devstack without setting it but after I created an instance, I could't console into the instance. And also the instance got an IP like 174.24.4.x, which is quite weird because I thought it should be something like 10.0.0.x.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-05-26 02:40:19 -0600

updated 2017-05-26 06:47:26 -0600

First my opinion: DevStack is for developers and is not necessarily easy to use. When it works, it's OK. When not, it's hard to troubleshoot. Why don't you use Packstack or the training lab, or set up your OpenStack cloud according to the installation manuals?

DevStack documentation is at https://docs.openstack.org/developer/.... Particularly, Using DevStack with Neutron.

You only need one network interface for DevStack. In this case, DevStack simulates the "external" network, which is not external at all. If you want your external network to be mapped to an existing network, for example the host-only network that your eth1 is connected to, just add PUBLIC_INTERFACE=eth1 to your local.conf as documented.

How on earth did you end up with an IP address of 0.0.0.1. (with a dot after the last digit!) and a netmask of 0.0.0.0? This is unusable. Or a typo. Or several typos. Or all of the above. Your loopback device doesn't look healthy, either.

Is 174.... the floating or static IP of the instance? Indeed, DevStack normally uses 10.0.0.0/24 for static IPs. You can change defaults for static and floating IP addresses with the FIXED_RANGE and FLOATING_RANGE variables. I don't know where 174 comes from.

edit flag offensive delete link more

Comments

The reason I need DevStack is because it is relevant to my job, so I don't have a choice... I successfully installed it but the same problem happened that I couldn't console into the instance, please see the answer I post under this question.

openstackplz gravatar imageopenstackplz ( 2017-05-26 05:07:26 -0600 )edit

Hi Bernd, I just add the ip a result and local.conf content, please have a look. By the way, thank you so much for your help. You have no idea what this means to me. Thank you.

openstackplz gravatar imageopenstackplz ( 2017-05-26 07:57:57 -0600 )edit

Hi Bernd, I checked some similar issues posted online, like the question https://ask.openstack.org/en/question/97658/mitaka-instance-cannot-be-allocated-ip-address/ (https://ask.openstack.org/en/question...). I set the eth0 and eth1 interfaces all to promiscuous type using ifconfig ethx promisc. But the problem did not gone.

openstackplz gravatar imageopenstackplz ( 2017-05-27 00:54:04 -0600 )edit

I tried to set the two adapters I set for this virtual box instance to promiscuous type, for the host-only adapter I can set it to promiscuous, but for the NAT adaptor, it doesn't allow me to modify its promiscuous type, which is Deny on default. So how can I modify this NAT adapter's promisc type?

openstackplz gravatar imageopenstackplz ( 2017-05-27 00:56:49 -0600 )edit

I don't know how to make an interface promiscuous in Virtualbox.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-27 02:21:22 -0600 )edit
0

answered 2017-05-26 05:09:45 -0600

openstackplz gravatar image

updated 2017-05-26 08:09:15 -0600

I installed successfully and created a new instance, but the same issue happened again that I couldn't console into the new instance. I tried openstack console log show test and found out the eth0 interface didn't have an IPv4 address at all. It seems like there was only a public address for it which is "10.0.2.227" but no private address provided for this instance. Is there anything wrong with the configuration?

Four agent services are running as shown by neutron agent-list, which are Open vSwitch agent, Metadata agent, HCP agent, and L3 agent.

Four compute services are running as shown by openstack compute service list, which are nova-conductor, nova-scheduler, nova-consoleauth, and nova-compute.


The public ip address is shown by openstack server list under column Networks, info is public=10.0.2.228, 2001:db8::4(I deleted the previous instance and created a new one so the address changed from 227 to 228).

The local.conf file is like:

PUBLIC_INTERFACE=eth1 (which is the host-only adapter I added from virtual box and has no ip address according to `ifconfig`)
FLOATING_RANGE=10.0.2.225/27 (based on the NAT adapter interface eth0, ip address `10.0.2.15`)
PUBLIC_NETWORK_GATEWAY=10.0.2.226
FIXED_RANGE=10.0.0.0/24
NETWORK_GATEWAY=10.0.0.1
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0 (the NAT adaptor interface)
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta

The result of ip a is:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:7e:78:bd brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe7e:78bd/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:56:00:f5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::a00:27ff:fe56:f5/64 scope link 
       valid_lft forever preferred_lft forever
4: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000
    link/ether da:35:56:c6:7f:01 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
5: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1
    link/ether 6e:26:f5:14:fb:90 brd ff:ff:ff:ff:ff:ff
13: br-int: <BROADCAST,UP,LOWER_UP> mtu 1450 qdisc noqueue state UNKNOWN group default qlen 1
    link/ether ...
(more)
edit flag offensive delete link more

Comments

Where do you see this "public IP address"?

The instance has no IP address because it has no connection to the DHCP server. The Neutron agents and Nova servers look OK.

So how did you set up the network? Can you share your local.conf and the output of ip a on the DevStack server?

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-26 06:21:57 -0600 )edit

You might also have ERROR messages in the log files.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-26 06:22:31 -0600 )edit

The instance has an address from the provider network but doesn't receive it from DHCP. I guess it's connected to the provider network, and there is no DHCP server configured on that NW (which is normal).

Try launching an instance on the private NW, or add a DHCP server on public.

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-26 09:06:04 -0600 )edit

Also, I don't know if overlapping address ranges on eth0 and br-ex are a good idea. Perhaps it's not a problem?

Bernd Bausch gravatar imageBernd Bausch ( 2017-05-26 09:07:13 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

Asked: 2017-05-26 00:46:39 -0600

Seen: 667 times

Last updated: May 26 '17