Open vSwitch Mirror Select-All Configuration

0xBEN

Member
May 6, 2020
13
0
6
Hello, brief question.

I've got a handle of technical details of port mirroring on Open vSwitch, but one question remains:

With the select-all statement in the ovs-vsctl command, will this dynamically follow VMs and containers as they are started and shutdown? At any given time an interface for a VM or container could either exist or not exist on the switch depending on its state.

I've made a good effort to search the web for answers, even finding one blog that suggests the mirror doesn't follow VMs after full stop and start. Just looking for some clarification. Thank you in advance.
 
I did some controlled tests in my environment using both VMs and Linux Containers to see if Open vSwitch would dynamically forward traffic from newly created guests to the target port when the select-all parameter is set. I made sure to disable any jobs/scripts that monitor the port mirroring in case they might interfere with the testing.

My findings were that when I created new guests --- VMs and LXCs alike --- Open vSwitch automatically began forwarding the traffic dynamically from the new tap interfaces. So, there is no need to add any kind of monitoring functionality to scripts/jobs that might attempt to track when guests are added/removed when the select-all parameter is set.

For any kind of scenarios where specific guests would need to mirror to specific ports, it would probably be best to use hook scripts.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!