Vlan Networking

kris1351

Renowned Member
Nov 30, 2013
6
0
66
I am setting up a Proxmox VE 3.3 server and am having a little difficulty on setting the VLAN trunking properly. Here is how we want it to be configured:

eth0 - Management Network (currently working)

eth1 - Customer VM Network (not working)

Eth1 will have access to VLANs 4-300 on our switch potentially depending on which IPs we assign. We have this working with our OnApp setup and KVM, but have never set it up with yours. Here is a copy of the config so far and the errors we are receving are below that. I think we are close, but something is missing. The 20 and 100 are setup just alike in the interfaces file, but as you can see that interface does not work. The idea is that we can set these to access any segment of the network as our defunct OnApp did.

brctl show
bridge name bridge id STP enabled interfaces
vmbr0 8000.0015172e8e4e no eth0
vmbr100 8000.000000000000 no
vmbr20 8000.0015172e8e4f no eth1


no physical interface on bridge 'vmbr100'
/var/lib/qemu-server/pve-bridge: could not launch network script
kvm: -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown: Device 'tap' could not be initialized
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=899b7bae-c4df-485e-8b66-3fab8398ddb9' -name test01 -smp 'sockets=2,cores=2' -nodefaults -boot 'menu=on' -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -k en-us -m 2048 -cpuunits 1000 -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:6cd58b7220f6' -drive 'file=/var/lib/vz/template/iso/CentOS-6.4-x86_64-minimal.iso,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/var/lib/vz/images/100/vm-100-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=B2:85:37:7C:A9:CF,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1
 
This is what the machine setup in the latest try through the GUI.

# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

iface eth2 inet manual

iface eth3 inet manual

auto vmbr0
iface vmbr0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
gateway xxx.xxx.xxx.xxx
bridge_ports eth0
bridge_stp off
bridge_fd 0

auto vmbr20
iface vmbr20 inet manual
bridge_ports eth1:20
bridge_stp off
bridge_fd 0
vlan_raw_device eth1

auto vmbr100
iface vmbr100 inet manual
bridge_ports eth1:100
bridge_stp off
bridge_fd 0
vlan_raw_device eth1
 
Changed it as you stated and still same thing:

no physical interface on bridge 'vmbr100'
/var/lib/qemu-server/pve-bridge: could not launch network script
kvm: -netdev type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown: Device 'tap' could not be initialized
TASK ERROR: start failed: command '/usr/bin/kvm -id 100 -chardev 'socket,id=qmp,path=/var/run/qemu-server/100.qmp,server,nowait' -mon 'chardev=qmp,mode=control' -vnc unix:/var/run/qemu-server/100.vnc,x509,password -pidfile /var/run/qemu-server/100.pid -daemonize -smbios 'type=1,uuid=899b7bae-c4df-485e-8b66-3fab8398ddb9' -name test01 -smp 'sockets=2,cores=2' -nodefaults -boot 'menu=on' -vga cirrus -cpu kvm64,+lahf_lm,+x2apic,+sep -k en-us -m 2048 -cpuunits 1000 -device 'piix3-usb-uhci,id=uhci,bus=pci.0,addr=0x1.0x2' -device 'usb-tablet,id=tablet,bus=uhci.0,port=1' -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' -iscsi 'initiator-name=iqn.1993-08.org.debian:01:6cd58b7220f6' -drive 'file=/var/lib/vz/template/iso/CentOS-6.4-x86_64-minimal.iso,if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/var/lib/vz/images/100/vm-100-disk-1.qcow2,if=none,id=drive-ide0,format=qcow2,aio=native,cache=none' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -netdev 'type=tap,id=net0,ifname=tap100i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown' -device 'e1000,mac=B2:85:37:7C:A9:CF,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300'' failed: exit code 1
 
Both show up now and attached to eth1. There is nothing defined on eth1, that should not effect the outcome should it? We are using eth0 for the management network only and customer VMs on the eth1.

root@dalc1-c130-pmoxu20:~# brctl show
bridge name bridge id STP enabled interfaces
vmbr0 8000.0015172e8e4e no eth0
vmbr100 8000.0015172e8e4f no eth1.100
vmbr20 8000.0015172e8e4f no eth1.20
 
Why don't you assing VLANs on the VM network interfaces instead?

I am not following, we have the interfaces for eth1 setup with VLAN trunking on the Cisco switches like we had in our other platform. What are you referring to?
 
Hi All,

I read lot of threads regarding adding a vlan in proxmox and honestly i am pretty confused.
What i want to achieve is trunk my physical NICs on the node to a cisco switch (etherchannel),
This switch has a gateway trunk to a cisco router interface where i created 3 subinterfaces defining the subnet of each vlan (router on a stick).
then create a vmbr (virtual switch) in proxmox with lets say assign 3 vlans to it without defining the ip address of each.
Then create CTs in proxmox and per ex:
CT1 is a linux debian machine that has 2 interfaces , first one with IP belonging to Vlan 2 , second interface with IP belonging to vlan 3.
like this no need to create vlans on the CTs (vlans are transparent)
of course routing between the vlans is performed by the cisco router.
Can someone gives a step by step on how to do this via web? (only the proxmox config, the cisco part i already did).
What i have mentioned is that if you create a KVM , in the web it is easy to add an interface to the machine and assign it to a vlan.
However when creating a CT (openvz) it is not clear how to do it.

Also how to create additional vlans in the future to the vmbr without rebooting ?

Your help is much appreciated.

Regards,
 

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!