[SOLVED] Can not add vlan to a VM interface.

tbyte

New Member
Mar 26, 2024
4
1
3
The network card is set to "vmbr0". When I try to add vlan 2914 I get this error when trying to start the VM:
Error: argument "enp3s0f1np1.2914" is wrong: "name" not a valid ifname
can't add vlan tag 2914 to interface enp3s0f1np1 - command '/sbin/ip link add link enp3s0f1np1 name enp3s0f1np1.2914 type vlan id 2914' failed: exit code 255

kvm: -netdev type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on: network script /var/lib/qemu-server/pve-bridge failed with status 65280
TASK ERROR: start failed: QEMU exited with code 1
I might be wrong but I don't remember the older version of Proxmox trying to create such interfaces when I do that?
 
Hi,

The message said that the `enp3s0f1np1.2914` is not valid interface name. Can you please provide us with your network configuration and the VM config?

You can get the network config and the VM config by issuing the following commands:
Bash:
cat /etc/network/interfaces
qm config <VMID>
 
Hi,

The message said that the `enp3s0f1np1.2914` is not valid interface name. Can you please provide us with your network configuration and the VM config?

You can get the network config and the VM config by issuing the following commands:
Bash:
cat /etc/network/interfaces
qm config <VMID>
Here they are, thanks!

/etc/network/interfaces:
auto lo
iface lo inet loopback

iface eno1 inet manual

iface eno2 inet manual

iface enp3s0f0np0 inet manual

iface enp3s0f1np1 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.29.34.11/24
gateway 10.29.34.1
bridge-ports enp3s0f1np1
bridge-stp off
bridge-fd 0

auto vlan2935
iface vlan2935 inet static
address 10.29.35.11/24
vlan-raw-device vmbr0
#CEPH Net

source /etc/network/interfaces.d/*
qm config 102:
bios: ovmf
boot: order=scsi0;ide2
cores: 12
cpu: host,flags=+md-clear;+pcid;+spec-ctrl;+ssbd;+pdpe1gb;+aes
efidisk0: ceph01:vm-102-disk-0,efitype=4m,pre-enrolled-keys=1,size=1M
ide2: local:iso/AlmaLinux-8-latest-x86_64-minimal.iso,media=cdrom,size=2041M
machine: q35
memory: 65536
meta: creation-qemu=9.0.2,ctime=1725447819
name: WHAlma
net0: virtio=BC:24:11:8B:03:EA,bridge=vmbr0,tag=2914
numa: 1
ostype: l26
scsi0: ceph01:vm-102-disk-1,iothread=1,size=128G
scsihw: virtio-scsi-single
smbios1: uuid=938ad700-10f0-4885-85f7-5e7904a3dd48
sockets: 2
vmgenid: e8234444-455b-4cf5-8b69-cf8148471bf5
 
Hi,

Thank you for the output!

You may have to set VLAN-aware to the `vmbr0` bridge as the following:
Code:
bridge-vlan-aware yes
bridge-vids 2-4094

And issue the following command to take the effect:
Bash:
ifreload -a
 
  • Like
Reactions: tbyte
Hi,

Thank you for the output!

You may have to set VLAN-aware to the `vmbr0` bridge as the following:
Code:
bridge-vlan-aware yes
bridge-vids 2-4094

And issue the following command to take the effect:
Bash:
ifreload -a
Thanks, it worked!
 
  • Like
Reactions: Moayad
Glad to hear that the issue is solved :) I will go ahead and set your thread as [SOLVED] to help other users who have the same issue.
 
  • Like
Reactions: tbyte

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!