From ISPWiki
Revision as of 13:24, 21 August 2018 by Ksenya (talk | contribs) (Configuring bridged networking manually)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Hierarchy: VMmanager KVM ->NETWORKS
VMmanager Cloud ->NETWORKS

VMmanager uses two network types:

  • bridge — a bridge is created on a cluster node. VN interfaces are included into the bridge;
  • NAT — a pool of IP addresses is assigned to the network. Virtual machines in the network receive and transmit packages through the cluster node IP using the address translation (NAT).

The same network types must be configured on all cluster nodes. A new network will be automatically added into every cluster node.

Network management in VMmanager

Creating a network

Navigate to Cluster settings -> Networks -> Add to add a new network:

Module «Networks»
  • Name - enter the name for the network.
  • Network type - select a network type. Normally, this is a bridged networking.
    • Bridged networking - enter the name of the bridge. The field is available only for the "Bridged networking" type;
    • NAT.
  • Enable the interface - select the check box to enable the network interface to which network will be connected.
  • External interface - enter the network interface the network will be connected to. The default value is 'auto'. VMmanager will connect the first available interface. Otherwise, it will check that the interface with the specified name exists and adds in to the bridge. If the interface is not found or you leave the field blank, no interfaces will be connected. The field is available only for the "Bridged networking" type;
  • IP address (gateway) — enter the IPv4 or IPv6 that belong to the gateway. The filed is displayed only for the NAT network;
  • Network mask. The filed is displayed only for the NAT network.

Managing networks

Virtual machines can be connected to one or several networks. To connect the existing virtual machine to an additional network, navigate to Management -> Virtual machines -> Interfaces -> Add and enter the required data. To have new virtual machines connected to additional networks automatically, add them to the resources of a VM template. Click on Cluster settings -> VM templates -> Resources -> Add. The system connects the virtual network card to every virtual machine.

Managing IP and MAC addresses

IP and MAC addresses are used to define the correspondence IP↔MAC:

  • the virtual machine is allocated the IP address for which the correspondence is set. The MAC-address will be allocated automatically. You cannot provide another MAC-address unless you delete the corresponding IP address;
  • the virtual machine is allocated the MAC address for which the correspondence is set. The IP address will be allocated automatically. You cannot provide another IP address unless you delete the corresponding MAC-address;

Navigate to Cluster settingsNetworksMAC addressesAdd to add new MAC and IP address or the name of the virtual machine.

How the control panel creates a network

1. The panel creates a network in libvirt. 2. Configures the network and run one of the following processes depending on the operating system:

a. Generates the XML-file with network settings and processes it in libvirt (the same as the virsh iface-bridge command).
b. Start the internal utility for network configuration:
/usr/local/mgr5/sbin/netctl bridge create <bridge> <iface> --live --config

3. If you create the bridged networking type, all IP addresses from the connected interface are redirected to the bridged networking. The networks connected to the bridges will be added into libvirt.

Manual management

Viewing a list of networks

To view a list of networks in libvirt execute the command on the cluster node:

virsh net-list

To view the network configuration in libvirt, execute the command:

virsh net-dumpxml <имя сети>

The example of the Basic network configuration:

virsh net-dumpxml Basic
<network connections='1'>
  <forward mode='bridge'/>
  <bridge name='vmbr0' />

To view the list of bridged networking on the cluster node, execute the command:

brctl show

Configuring bridged networking manually

By default VMmanager automatically creates and configures the bridges. The manual configuration looks like the following:

1. Stop the libvirtd daemon:

service libvirtd stop

2. Restart network:

service network restart

3. Add the Option BuildBridgesManually option into VMmanager configuration file (by default /usr/local/mgr5/etc/vmmgr.conf).

4. Start the libvirtd daemon:

service libvirtd start

When activating the manual configuration to start virtual machines, create the bridges that you added in the control panel.