KVM and VLAN trunks to VMs


#1

Hi,
I started looking around for virtualization solution and at the moment I am trying with KVM. I want to utilise a server where I intend to accomodate several Virtual Machines (VMs). In the attached picture I have shown how I would like to connect the servers.


Here is the explanation to the scheme.

  1. My host is runing Debian Lemmy and the VMs are Freebsd and Debian hosts (later there will be other OSs added to the system).

  2. I have two network providers (via BGP) and currently these are connected to one router via separate BGP sessions. I want to terminate them on separate routers as VMs.

  3. I have a DMZ that I want ot add as a VM.

  4. I have a router that connects my internal users (through VLANs) to the Internet. This router is connected to the other routers via BGP / OSPF. The VLANs on this machine are added and removed dynamically.

So far I can create the VMs and start some services on them but my problem is that I cannot add the VLANs to the VMs. I want ot be able to add and remove VLANs in VM3 without stopping the network service to the already working VLANs or without restarting the VM.
At the moment I am trying to achive this using Open vSwitch or linux native bridging. I also want to be able to connect to the Host Management over a VLAN through ETH0 on the host.
How can I configure this?