On a simple Xen or KVM host system there is only one network interface (such as eth0), typically connected to the Internet. All Xen systems have their own virtual eth0 interface which is bridged to the host system via Xen's xenbr0 interface. Similarly, KVM systems bridge eth0 to the br0 interface on the host.
However, you may want to configure host systems with two interfaces, one connected to the Internet and one on a private network for transfers between host or virtual systems. This involves adding an additional bridge (usually xenbr0) to the Xen configuration on the host, and configuring Cloudmin to create new Xen systems with a second interface this is connected to the bridge.
This configuration must be done manually, as Cloudmin does not yet support managing the xend configuration file on a host. The steps to follow are :
/etc/xen/scripts/multiple-bridge with the following contents :
#!/bin/sh dir=$(dirname "$0") "$dir/network-bridge" "$@" vifnum=0 netdev=eth0 bridge=xenbr0 "$dir/network-bridge" "$@" vifnum=1 netdev=eth1 bridge=xenbr1
chmod +x /etc/xen/scripts/multiple-bridge/etc/xen/xend-config.sxp and find the line like (network-script network-bridge) line, and change it to (network-script multiple-bridge)/etc/init.d/xend restartifconfig -a command.If you have multiple host systems, these steps must be performed on each of them.
This can be done by logging into Webmin on the host, and going to Networking -> Network Interfaces -> Activated at boot. Create a new bridge interface named br1 that is connected to an un-used ethernet interface (like eth1) , and then save and apply the configuration.
Once the additional bridge is active on the Xen host, you can configure Cloudmin to use it as follows :
xenbr0 and xenbr1.xenbr1 bridge in the For interface column.How you can create a new Xen virtual system, and it should be configured with two network interfaces, with eth1 connected to eth1 on the host system, and an IP assigned from the 192.168.1 range.
In Cloudmin 5.8 and later, you can select on the creation form which bridges to connect the virtual system's network interfaces to. This can be used to create a VM that is only on your internal network, for example.
When adding a network interface to a Xen instance, you can also select which network bridge the new interface will be connected to.