Make it possible to use a hostonly-network instead of a bridge
Change-Id: Idfb6930e97ce5373abc35c14adb753c0a4a15579
This commit is contained in:
parent
4a29af6db4
commit
b1e4ab7f07
|
@ -13,17 +13,26 @@ end
|
|||
|
||||
def configure_vm(name, vm, conf)
|
||||
vm.hostname = conf["hostname_#{name}"] || name
|
||||
# we do an L2 bridge directly onto the physical network, which means
|
||||
# that your OpenStack hosts (manager, compute) are directly in the
|
||||
# same network as your physical host. Your OpenStack guests (2nd
|
||||
# level guests that you create in nova) will be also on the same L2,
|
||||
# however they will be in a different address space (10.0.0.0/24 by
|
||||
# default).
|
||||
#
|
||||
# :use_dhcp_assigned_default_route true is important to let your
|
||||
# guests actually route all the way out to the real internet.
|
||||
|
||||
vm.network :public_network, :bridge => conf['bridge_int'], :use_dhcp_assigned_default_route => true
|
||||
if conf["use_bridge"] == false
|
||||
if conf["ip_address_#{name}"]
|
||||
vm.network :private_network, ip: conf["ip_address_#{name}"]
|
||||
else
|
||||
vm.network :private_network, type: "dhcp"
|
||||
end
|
||||
else
|
||||
# we do an L2 bridge directly onto the physical network, which means
|
||||
# that your OpenStack hosts (manager, compute) are directly in the
|
||||
# same network as your physical host. Your OpenStack guests (2nd
|
||||
# level guests that you create in nova) will be also on the same L2,
|
||||
# however they will be in a different address space (10.0.0.0/24 by
|
||||
# default).
|
||||
#
|
||||
# :use_dhcp_assigned_default_route true is important to let your
|
||||
# guests actually route all the way out to the real internet.
|
||||
vm.network :public_network, :bridge => conf['bridge_int'], :use_dhcp_assigned_default_route => true
|
||||
end
|
||||
|
||||
vm.provider :virtualbox do |vb|
|
||||
# you need this for openstack guests to talk to each other
|
||||
vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
|
||||
|
|
|
@ -34,3 +34,13 @@ bridge_int: eth1
|
|||
# on every create
|
||||
# mac_address_manager: 0800274a508c
|
||||
# mac_address_compute: 0800274a508d
|
||||
|
||||
# It is possible to use a hostonly-network instead of a bridged network
|
||||
# when setting the parameter use_bridge to false.
|
||||
# use_bridge: false
|
||||
|
||||
# When using a hostonly-network it is possible to specify static IP
|
||||
# addresses using the following parameters. If those parameters are
|
||||
# not specified DHCP will be used.
|
||||
# ip_address_manager: 10.0.10.10
|
||||
# ip_address_compute: 10.0.10.20
|
||||
|
|
Loading…
Reference in New Issue