[SOLVED] Interface on VM not working

Oct 20, 2017
3
0
1
Berlin
Hi,

our Proxmox server is using two 10G networkin interfaces as bond0. vmbr0 is fine, because I can connect to the Proxmox server via SSH:
Code:
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

iface eth2 inet manual

iface eth3 inet manual

auto eth4
iface eth4 inet manual

auto eth5
iface eth5 inet manual

iface eth6 inet manual

iface eth7 inet manual

auto bond0
iface bond0 inet manual
        slaves none
        bond_miimon 100
        bond_mode balance-rr
        bond-slaves eth4 eth5
        bond-mode 4
        bond-miimon 100
        bond-lacp-rate 1

auto vmbr0
iface vmbr0 inet static
        address  172.21.0.16
        netmask  255.255.255.0
        gateway  172.21.0.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes
#Proxmox-Management

auto vmbr1
iface vmbr1 inet manual
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0
        bridge_vlan_aware yes
#bond0, VM-Trunk

bond0 with LACP and vmbr1 is already working, because there is traffic on VLAN 501:
Code:
root@hn-vm06:~# tcpdump -n -i vmbr1 -e | grep 'vlan 501' | grep '172\.21\.0\.31'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on vmbr1, link-type EN10MB (Ethernet), capture size 262144 bytes
16:43:55.752030 00:1f:6d:c5:15:4a > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 501, p 0, ethertype ARP, Request who-has 172.21.0.31 tell 172.21.0.1, length 46
16:44:00.751643 00:1f:6d:c5:15:4a > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 501, p 0, ethertype ARP, Request who-has 172.21.0.31 tell 172.21.0.1, length 46
16:44:05.754825 00:1f:6d:c5:15:4a > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 501, p 0, ethertype ARP, Request who-has 172.21.0.31 tell 172.21.0.1, length 46
16:44:15.750483 00:1f:6d:c5:15:4a > ff:ff:ff:ff:ff:ff, ethertype 802.1Q (0x8100), length 64: vlan 501, p 0, ethertype ARP, Request who-has 172.21.0.31 tell 172.21.0.1, length 46

The interfaces are connected:
Code:
root@hn-vm06:/etc/network# ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master vmbr0 state UP mode DEFAULT group default qlen 1000
    link/ether 68:b5:99:b3:ca:f0 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 68:b5:99:b3:ca:f1 brd ff:ff:ff:ff:ff:ff
4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 68:b5:99:b3:ca:f2 brd ff:ff:ff:ff:ff:ff
5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 68:b5:99:b3:ca:f3 brd ff:ff:ff:ff:ff:ff
6: eth4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 portid 0002c903004dac9c state UP mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4d:ac:9c brd ff:ff:ff:ff:ff:ff
7: eth5: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 portid 0002c903004d4f44 state UP mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4d:ac:9c brd ff:ff:ff:ff:ff:ff
8: eth6: <BROADCAST,MULTICAST> mtu 1500 qdisc mq portid 0002c903004da6d4 state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4d:a6:d4 brd ff:ff:ff:ff:ff:ff
9: eth7: <BROADCAST,MULTICAST> mtu 1500 qdisc mq portid 0002c903004e83c4 state DOWN mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4e:83:c4 brd ff:ff:ff:ff:ff:ff
10: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr1 state UP mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4d:ac:9c brd ff:ff:ff:ff:ff:ff
13: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 7e:0f:45:97:4f:5b brd ff:ff:ff:ff:ff:ff
24: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 68:b5:99:b3:ca:f0 brd ff:ff:ff:ff:ff:ff
25: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 00:02:c9:4d:ac:9c brd ff:ff:ff:ff:ff:ff

My VM with Ubuntu 16.04 has the interface 'ens18', so I created the interface ens18.501 for VLAN 501. Nevertheless I cannot ping the interface of that VM and my bridge is not seeing the IP or MAC address. I have attached screenshots of that VM.

What do I need to configure to connect my VM to vmbr1 so I can use VLAN 100, 501 and so on?

Thanks for your help,
Martin
 

Attachments

  • ifconfig.PNG
    ifconfig.PNG
    108.2 KB · Views: 11
  • interfaces.PNG
    interfaces.PNG
    87.4 KB · Views: 10
  • ip_link_show.PNG
    ip_link_show.PNG
    54.7 KB · Views: 9
you have to enable the vmids on the vm config
see 'man qm.conf'

netX: .....,trunks=<vlanid[;vlanid...]>

this needs a vlan aware bridge though

or you give the vm a nic for each vlan it needs (this works also for non vlan-aware bridges)
 
Thanks for your reply! As I only have one VM configured via the web GUI the config for /etc/pve/qemu-server/100.conf is as follows:
Code:
bootdisk: virtio0
cores: 12
ide2: local:iso/ubuntu-16.04.3-server-amd64.iso,media=cdrom
memory: 80000
name: observium
net0: virtio=1A:91:A8:74:75:F2,bridge=vmbr1
numa: 1
onboot: 1
ostype: l26
scsihw: virtio-scsi-pci
smbios1: uuid=6fdb620a-1022-454f-a55c-73292cba65d5
sockets: 1
virtio0: local-lvm:vm-100-disk-1,size=600G

[PENDING]
agent: 1
boot: c

So I have changed the line to the following content:
Code:
net0: virtio=1A:91:A8:74:75:F2,bridge=vmbr1,trunks=100;500;501

Shutting down and starting the VM is now working, thanks a lot!

Nevertheless I have attached a screenshot from the web GUI, because it's not possible to configure that trunk via web GUI?
 

Attachments

  • web_gui.PNG
    web_gui.PNG
    55.3 KB · Views: 28
What I'm missing here is the git repository and bugtracker for the front end development. Which one is it? :)
gui related things are in 'proxmox-widget-toolkit' and 'pve-manager' (in the www/manager6 directory)

here is also a link for the extjs documentation:
https://docs.sencha.com/extjs/6.0.1/index.html

if you are interested in developing i would recommend to subscribe to the pve-devel mailing list (and also ask your dev related questions there)
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
 

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!