Adding many network interfaces to KVM VM

yavuz

Renowned Member
Jun 22, 2014
24
1
68
Hi,

For an arping machine I need a VM with an address in all our subnets. Since I have setup my hv's with separate vmbr's per VLAN I need a VM with lots of interfaces.

Currently I'm getting the following error when adding the 33rd network interface:
Code:
Parameter verification failed. (400)

net32: property is not defined in schema and the schema does not allow additional properties

Is this a KVM/QEMU limitation or a Proxmox limitation? Is there a workaround?
 
Last edited:
this is a limitation in pve, and there is no easy workaround (besides changing the source code)

would it not be possible to have one vmbr with 'vlan-aware' on and have one network interface configured as trunk in the vm ?
 
So I tried this but might need a push in the right direction.

1. I added to /etc/network/interfaces on the host:
Code:
auto vmbr0
iface vmbr0 inet manual
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes
#VLAN aware

2. Brought the interface up on the host:
Code:
ifup vmbr0
3. Installed vlan utilities on guest:
Code:
apt install vlan
4. Updated network config on guest:
Code:
auto ens18
iface ens18 inet manual

auto vlan3043
iface vlan3043 inet static
  address x.x.x.253/24
  gateway x.x.x.1
  vlan_raw_device ens18
5. Assigned the network interface to vmbr0
6. Rebooted guest

Unfortunately this didn't work. What did I miss?
 
Last edited:
you also have to add the 'trunks' config to the virtual network interface
in the vm config

net0: xxxxxx,trunks=<vlanid[;vlanid...]>

so for example:

net0: xxxxx,trunks=1;2;3;4;5;6;7;8;9;10;20;30;40;50;60;....
 
I added trunks=1;2;3;4;5;6;7;8;9;10;20;30;40;50;60;.... (with my own vlan id's ofcourse) to /etc/pve/qemu-server/147.conf, shutdown the guest and powered up. Unfortunately still not working. Any suggestions?
 
is that a debian guest? if yes
then maybe this works:

auto eth0.222
iface eth0.222 inet static
address 10.10.10.1
netmask 255.255.255.0
vlan-raw-device eth0

(of course replace the values with your own)

it seems also you had a typo:
you wrote

auto vlan 3043
iface vlan3043 inet static

instead of

auto vlan3043
iface vlan3043 inet static

(notice the space between vlan and 3043)
 
The space between vlan and 3043 was only on the forum, in my interfaces file it's without a space, I corrected the post above.

Yes, the guest is Debian, I just updated the interfaces file and replaced vlan3043 by ens18.3043, unfortunately still no traffic. Anything else I'm overlooking?
 
mhmm what does ip -d addr and ip -d link report ?
 
See screenshot.
 

Attachments

  • Screenshot at Feb 20 09-42-22.png
    Screenshot at Feb 20 09-42-22.png
    71.1 KB · Views: 13
See attachments. The links which are of importance are ens3f0 and ens4f0 in bond0.
 

Attachments

  • link.txt
    152.5 KB · Views: 3
  • addr.txt
    154.5 KB · Views: 3
And just to be complete: here is my interfaces file
 

Attachments

  • interfaces.txt
    8.6 KB · Views: 4
looks all correct to me, are the vlan/ip configs correct (also the vlan tags on the switch ports ?)
 
100% correct, can use the IP addresses if added in the vmbr3043 which is in bond0.3043. Any other ideas / suggestions?
 
ah maybe because you already defined the vlan device on the host, the packages do not get forwarded to the vlan aware bridge,
can you try with a vlan which is not already defined on the host?
 
I just did ifdown vmbr3044 on hv01, and added an IP from vlan 3044 to the guest (ens18.3044), still doesn't work. Do I need to do something else?

By the way this wouldn't solve my initial problem, I'm merely interested in why it doesn't work at the moment :)
 
sorry i am out of ideas, such setups did always work for me, there is something we miss ...
 

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!