Proxmox VE uses Linux bridge technology by default to set up the virtual network, but it also supports Open vSwitch (also known as OVS). Here I'll show you how to install OVS and replace the default bridge with an OVS one.
Open a shell in your Proxmox VE system as mgrsys
and then execute:
$ sudo apt install -y openvswitch-switch
After the installation, OVS will have two daemons running: ovs-vswitchd
and ovsdb-server
. Check them out with htop
, noticing also the increase in RAM usage. These services won't do anything to your network on their own: you have to setup OVS explicitly.
Log in the PVE web console and go to the System > Network
tab of your pve
node.
In the capture above you can see the initial setup on my PVE host, which I already explained (and reconfigured) in the G017 guide.
Before going forward with the new OVS-based configuration, make a backup of your current network intefaces setup. To do so, open a shell on your PVE host with your mgrsys
user and do the following.
$ sudo cp /etc/network/interfaces /etc/network/interfaces.bkp
Go back to the web console and, again, in the System > Network
screen of your PVE node do the following.
-
Select the
vmbr0
interface and click on theRemove
button.The web console will ask for your confirmation.
-
The
vmbr0
interface should disappear from the list and aPending changes
read-only diff console will appear below.The diff console shows you how the affected configuration files are going to be modified with the change. In this case, only the
/etc/network/interfaces
file is affected by this reconfiguration.BEWARE!
Don't click on theApply Configuration
button or reboot just yet! Wait till you've created and set your new OVS bridge up completely! -
Now click on the
Create
button and selectOVS Bridge
from the list. -
In the resulting window, just fill the
Bridge ports
field with the name of your main real and active network interface.In my case it's the
enp2s0
interface, as it was for the removed Linux bridge. After clickingCreate
, you should see the new bridge appearing in the interfaces list. -
The OVS bridge is created but lacks an in-band interface to have access to the Proxmox VE host itself. So, to create an OVS InPort for in-band management, click on
Create
and chooseOVS IntPort
. -
In the new window, you'll have to fill up the
Name
,IPv4/CIDR
andGateway (IPv4)
fields to set up your in-band.Regarding the relevant fields at this step.
Name
: can be any strictly alphanumerical (only 'a-z
', '_
' and '0-9
' are admitted) lower-cased string between 2 and 21 characters.IPv4/CIDR
: this is were you input the IP of your host, plus the subnet mask (/24
in my case). In other words, it's just the same IP you had in the previously removed Linux bridge.Gateway (IPv4)
: the IP of your network's gateway, which could be your home router.OVS Bridge
: to indicate to which bridge this IntPort has to be connected to. By default you'll have this field filled by the name of the only one OVS bridge you have now.Comment
: any string you might like to leave here.
After filling the proper fields, click on
Create
, and find your new OVS IntPort in the interfaces list.Notice that it's not
Active
yet, and that it has been added to thePorts/Slaves
list of your newvmbr0
OVS Bridge. -
To organize (or partition) the traffic among your VMs and containers better, you can create VLANs. To create an VLAN, click on
Create
, chooseOVS IntPort
like you did for the in-band interface, and fill the form like below.You can type anything as the
Name
, but make it meaningful and don't use anything beyond alphanumeric characters. TheVLAN Tag
can only be a number, so just put any you prefer there between 1 and 4096. Click onCreate
after you've filled those values. In my case, I've created two VLANs that also have been automatically added asPorts/Slaves
to thevmbr0
OVS bridge. -
Now that you have everything ready, you can hit the
Apply Configuration
button.It will ask for your confirmation.
-
After applying the new configuration, you should see the in-band port and the vlans active in your
Network
screen.Also, with
htop
you'll see how, under theovs-vswitchd
daemon process, there are now several threads or subprocesses running.
/etc/network
/etc/network/interfaces
/etc/network/interfaces.bkp
- Open vSwitch
- Open vSwitch in Proxmox VE wiki
- Proxmox VE with Open vSwitch
- Proxmox – KimSufi, OVH, SoYouStart – IPv6 – Host Multiple Containers and Virtual Machines on a Single KimSufi Server using IPv6 and ProxMox
<< Previous (G909. Appendix 09) | +Table Of Contents+ | Next (G911. Appendix 11) >>