2 network interfaces in one VM doesn't work

Miroslav

New Member
Nov 21, 2013
2
0
1
Croatia
Hi *,
I have one question regarding 2 network interfaces in one virtual machine. I created Oracle Linux VM like in the picture:

screenshot2.jpg

I have 2 physical interfaces on the machine running proxmox 3.0-20. First one uses vmbr0 and second uses vmbr1.
This is my /etc/network/interfaces setup:
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
address 10.50.61.23
netmask 255.255.252.0
bridge_ports eth1
bridge_stp off
bridge_fd 0
up ip route add 192.168.99.0/24 via 10.50.60.1 dev vmbr0
down ip route del 192.168.99.0/24 via 10.50.60.1 dev vmbr0
up ip route add 10.0.0.0/8 via 10.50.60.1 dev vmbr0
down ip route add 10.0.0.0/8 via 10.50.60.1 dev vmbr0

auto vmbr1
iface vmbr1 inet static
address 192.168.0.20
netmask 255.255.255.0
gateway 192.168.0.36
bridge_ports eth2
bridge_stp off
bridge_fd 0

I have few virtual machines, on some of them I have configured either communication over vmbr0 or vmbr1, but cannot configure to use 2 interfaces on one VM.
The problem is I cannot see 2 network interfaces in the VM Linux machine, only first one:
# ls /sys/class/net
eth0 lo
# ifconfig -a
eth0 Link encap:Ethernet HWaddr BF:10:xx:xx:xx:xx
inet addr:192.168.0.25 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::bc16:53ff:fe71:118/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:22146 errors:0 dropped:0 overruns:0 frame:0
TX packets:1475 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2063340 (1.9 MiB) TX bytes:181241 (176.9 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

I will apreciate any hint, thank you in advance!

Best regards,
Miroslav
 
VMs don't automatically use both bridge interfaces (vmbr#).
In the web GUI, manually add the second network interface to the VM (while it's down) and be sure to specify which vmbr# you wish to use.
Then boot the VM and it should see the new interface.
 
Hi sgtfoo, thank you a lot! You helped me very much.It works. So this means, if you have live system you cannot add second interface, without reboot.
 

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!