Pre-configuring the network
These instructions are for using the FlatDHCP networking mode with a single network interface. More complex configurations are described in the networking section, but this configuration is known to work.
First, setup your /etc/network/interfaces file with these settings:
eth0: public IP, gateway
br100: no ports, stp off, fd 0, first address from --fixed_range
set in nova.conf files.
Here's an example:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
# Bridge network interface for VM networks
auto br100
iface br100 inet static
address 192.168.100.1
netmask 255.255.255.0
bridge_stp off
bridge_fd 0
Also install bridge-utils:
sudo apt-get install bridge-utils
Ensure that you set up the bridge, although if you use
-\-flat_network_bridge=br100 in your nova.conf file, nova
will set up the bridge for you when you run the
nova-manage network command.
sudo brctl addbr br100
Lastly, restart networking to have these changes take
effect. (This method is deprecated but "restart
networking
" doesn't always work.)
sudo /etc/init.d/networking restart