How do I make my VMs accessible via a bridge?

~ 0 min
15.12.2021 10:39

Note: For information about the gateway, netmask, and IP address, see your customer account. 

 


Explanation

A bridge is created in Proxmox to make the VMs on the host system accessible via an additional IP. 
The network configuration for a VM on the host system is described here.

There are 2 ways to create a bridge in Proxmox:

  1. via the ssh console
  2. via the web interface

 

1. via the SSH console

1) Log in to your server via SSH.

2) Check which network interface is used. To do this, execute the command "ip r s | grep default".

ip r s | grep default
default via 192.168.178.1 dev eth0 proto static metric 100

eth0 -> the network interface used. The main IP of your server is also configured here.

 3) Now the bridge is created via the file /etc/network/interfaces . The network configuration looks like this:

--- /etc/network/interfaces ---

auto lo iface lo inet loopback
iface eth0 inet manual
auto vmbr0 iface vmbr0 inet static address <Main IPv4 of your server> netmask 255.255.255.255 gateway <Gateway of the main IP of your server> bridge_ports eth0 bridge_stp off bridge_fd 0

***Important***

Please note that you replace "eth0" in the example configuration with your previously queried network interface, otherwise you will lock yourself out of your system. Also the line "iface eth0 inet manual" (with your network interface) must be present, so that your server is accessible in the connection. 

 

2. Via the web interface

1) Open the Proxmox web interface: https://<Main-ipv4-IP>:8006/

2) Navigate on the left side to: datacenter -> "Your host system". 

3) Now select "Network".

4) Now double-click on the network interface and delete all entries.
Do NOT save the change yet, because you would lock yourself out. Please follow the steps to the end. 

5) Now the bridge is created. To do this, click on "Create" and select "Linux Bridge".

6) The following entries should be made there:

Name:                 vmbr0
IPv4/CIDR:         Main-IP of the host system
Gateway (IPv4): Gateway of the host system
IPv6/CIDR:         IPv6 Adresse of the host system
Gateway (IPv6): IPv6 Gateway of the host system
Autostart:            enable
VLAN aware:
Bridge ports:      Network interfaces of the host system

7) If you have now made all the settings and checked them again, restart the server via the "Restart" item at the top right of the screen.

 

Important for bridging setup to work

To make the Bridging setup to work, you need to change the routing of the additional ip you want to use in a virtual machine.

Go to the control center of your server in the customer panel and set the following setting for the correct additional ip:

Important for Debian 7 with Proxmox

If you want to run VM's and CT's at the same time, change the following entry via SSH:
Datei: /etc/vz/vz.conf

Look for the following entry there:
NEIGHBOUR_DEVS=detect

and replace it with this
NEIGHBOUR_DEVS=all

Average rating 1.57 (14 Votes)

You can comment this FAQ