VMware Networking 4.4
This guide describes how to use the VMware network driver in OpenNebula. This driver optionally provides network isolation through VLAN tagging. The VLAN id will be the same for every interface in a given network, calculated by adding a constant to the network id. It may also be forced by specifying an VLAN_ID parameter in the Virtual Network template.
In order to use the dynamic network mode for VM disks, some extra configuration steps are needed in the ESX hosts.
<xterm> $ su $ chmod +s /sbin/esxcfg-vswitch </xterm>
It should be noted that the drivers will not create/delete/manage VMware virtual switches, these should be created before-hand by VMware administrators.
Since the dynamic driver will however create VMware port groups, it should be noted that there's a default limit of 56 port groups per switch. Administrators should be aware of these limitations.
The vSphere hosts can work in two different networking modes, namely:
dummy
network driver. To configure this mode use dummy
as the Virtual Network Manager driver parameter when the hosts are created:<xterm> $ onehost create host01 -i vmware -v vmware -n dummy </xterm>
vmware
as the VNM driver for the hosts:<xterm> $ onehost create host02 -i vmware -v vmware -n vmware </xterm>
Dynamic and pre-defined networking modes can be mixed in a datacenter. Just use the desired mode for each host.
In this mode there the VMware admin has created one or more port groups in the ESX hosts to bridge the VMs. The port group has to be specified for each Virtual Network in its template through the BRIDGE
attribute (check the Virtual Network usage guide for more info).
The NICs of the VM in this Virtual Network will be attached to the specified port group in the vSphere host. For example:
NAME = "pre-defined_vmware_net" TYPE = "fixed" BRIDGE = "VM Network" # This is the port group LEASES = ...
In this mode the driver will dynamically create a port-group with name one-pg-<network_id>
in the specified vSwitch of the target host. In this scenario the vSwitch is specified by the
BRIDGE
attribute of the Virtual Network template.
Additionally the port groups can be tagged with a vlan_id. You can set VLAN=“YES” in the Virtual Network template to automatically tag the port groups in each ESX host. Optionally the tag can be specified through the VLAN_ID attribute. For example:
NAME = "dynamic_vmware_net" TYPE = "fixed" BRIDGE = "vSwitch0" # In this mode this is the vSwitch name VLAN = "YES" VLAN_ID = 50 # optional LEASES = ...
The predefined mode (dummy driver) does not execute any operation in the pre, post and clean steps (see for more details on these phases).
The strategy of the dynamic driver is to dynamically create a VMware port group attached to a pre-existing VMware virtual switch (standard or distributed) for each Virtual Network.
Action | Description |
---|---|
Pre | Creates the VMware port group with name one-pg-<network_id> . |
Post | No operation |
Clean | No operation |
The vlan id is calculated by adding the network id to a constant defined in /var/lib/one/remotes/vnm/OpenNebulaNetwork.rb
. The administrator may customize that value to their own needs:
CONF = { :start_vlan => 2 }