Adding a virtual bridge

proxmoxAdding a virtual bridge allows virtual machines to connect to physical and virtual networks.  By default a virtual bridge gets created when you first install Proxmox VE, so that you can connect VMs to your primary network interface card.  This article describles the process of adding further virtual bridges.


Additional NIC Bridge

If your Proxmox VE server has more than one NIC, you might add a bridge to allow your VMs to access the physical NIC.

  1. Select the Node where you want to configure the bridge.
  2. Select the Network tab.
  3. Click Create Linux Bridge.
  4. Enter an IP address: 192.168.100.1
  5. Enter a Subnet Mask: 255.255.255.0
  6. Enter Bridge Ports: eth1

 

Host only bridge

You might find it useful to have a bridge that isn't connected to a NIC.  We might call this a host-only bridge.

  1. Start by logging on to Proxmox.
  2. Select your node.
  3. Select the Network tab.
  4. Click Create Linux Bridge.
  5. Click Create.

Because we have used the GUI to make these changes, we will now need to restart the node to apply our changes.

 

Manual Bridge Configuration

If restarting the node isn't an option you can simply edit the /etc/network/interfaces file as follows:

auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
        address  192.168.0.51
        netmask  255.255.255.0
        gateway  192.168.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet static
        address  192.168.100.1
        netmask  255.255.255.0
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

auto vmbr2
iface vmbr2 inet manual
        bridge_ports none
        bridge_stp off
        bridge_fd 0

And then activate the bridges by running the following commands

# ifup vmbr1
# ifup vmbr2 

 

Multiple Nodes

If you are running Proxmox on multiple nodes, you will need to make sure that each node has the same Virtual Bridge configuration, in order that VM migration can work.

 

Thanks for visiting.