When you add a node to the cluster, VMmanager configures the network. Usually a single bridge is used, on which the IP address of the cluster node is located. All virtual machines are connected to the same bridge. In this case, you cannot add a VLAN to the virtual machines other than the one used on the cluster node to manage it. This is how the standard version of the Switching network configuration works in VMmanager:
However, this setup is not suitable for everyone. Sometimes it is required that a cluster node be accessible by the IP address that functions in one VLAN, while the virtual machines are created in a bridge with other VLANs. This may be relevant, for example, if the task is to increase security or if the architecture of the data center requires it.
VMmanager allows you to create an unlimited number of bridges and add any VLANs to them. Let us complicate the scheme presented above:
The scheme has the following parameters:
- The eth0 physical interface is present;
- The cluster node is available at 172.31.225.21/20, this address works on VLAN 118;
- The virtual machines must be working on the 10.18.102.0/24 network, which is in VLAN 1802.
Now let us configure the network in VMmanager according to this scheme.
- Create a new cluster, or use an existing one. Creating a cluster, documentation
- Adding the new node to the cluster. Check the "Do not configure network automatically" option on the node connection form. This is necessary so that when you add a node, the platform does not configure the main bridge - we will make this setting manually.
Adding a node in VMmanager. Be sure to select the "Do not configure network automatically" option
- Wait until the cluster node is fully configured. It usually takes 5 to 10 minutes.
- After configuring the cluster node, open the node card and enter the "Network settings" section.
- Press "Add device -> Bridge" and create the bridge.
Adding a network device to VMmanager.
Write the name vmbr0, specify VLAN 1802, specify the physical interface eth0 and enable the "Make default bridge to create VM” option.
We should end up with the following (the name of the physical interface may vary):
Added bridge vmbr0 with VLAN 1802 with connected physical interface eth0 - Press "Apply changes" and wait for the network on the node to be configured and restarted.
You do not have to worry about losing access to the cluster node if it is configured incorrectly. If the new settings cause the network to stop functioning on the node, VMmanager will restore its previous settings.
- After configuring the network on the server, the required bridge vmbr0 with VLAN 1802 will appear, to which the virtual machines will be connected.
- The next step is to create a virtual machine and check that the network inside the virtual machine is functioning. If everything is set up correctly on the network equipment, the network will be present in the virtual machine.
Now, if we need to use virtual machines in another VLAN, we can configure additional bridges. When creating a virtual machine, you can choose which bridge to connect it to. VMmanager documentation describes in detail the flexible network configuration functionality, see network settings on the cluster node.
In this way, you can separate or combine services in different network segments. For example, you can place all internal services in one VLAN and client services in other VLANs.
Try the VMmanager 6 virtualization platform
- Supports KVM-based virtualization and LXD container virtualization;
- High availability clusters;
- IaaS support: users can configure private networks for virtual machines. VxVLAN technology is used;
- IP-Fabric network configuration to reduce service traffic and increase security.