Proxmox VM bridge not working

Discussion in 'Systems Administration' started by DotRar, Mar 24, 2018.

  1. I run a couple of Windows VMs off of proxmox, however, I can't seem to get internet working with them. They are assigned to vmbr1. Interfaces file:
    Code (Text):
    auto lo
    iface lo inet loopback

    iface enp1s0 inet manual

    iface enp2s0 inet manual

    auto vmbr0
    iface vmbr0 inet static
            address 8.26.94.137
            netmask 255.255.255.0
            gateway 8.26.94.254
            broadcast 8.26.94.255
            bridge_ports enp1s0
            bridge_stp off
            bridge_fd 0
            network 8.26.94.0

    auto vmbr1
    iface vmbr1 inet static
            address  10.99.0.254
            netmask  255.255.255.0
            bridge_ports none
            bridge_stp off
            bridge_fd 0
            post-up echo 1 > /proc/sys/net/ipv4/ip_forward

            post-up iptables -t nat -A POSTROUTING -s '10.99.0.0/24' -o vmbr0 -j MASQUERADE
            post-down iptables -t nat -D POSTROUTING -s '10.99.0.0/24' -o vmbr0 -j MASQUERADE
    Additionally, I have correctly set up the network adapter inside of the VMs. It connects, but cannot send or receive any data. Thanks in advance.

    Ninja edit Forgot to mention that everything loads fine on the host machine. ip link show up tells me that all the interfaces above (apart from enp2s0) is up.
     
  2. Try to assign the VM a static IP and ping the VM ip on your host machine. I'd suggest you to replace proxmox with virtualizor if you're able to use it with a IP range.
     
  3. Works :)

    I should probably change that, I just copied it mindlessly from the old server changing the IP where need be
     
  4. MikeA

    MikeA Retired Moderator
    Retired Benefactor

    DHCP doesn't work with Proxmox OOB, at least from my experience,
     
  5. Not trying to use DHCP, hence the static. I bought a new IP from SYS for this VM so it should be a lot easier. I added this to my interfaces file however it doesn't seem to work (VM still can't connect to the internet):
    Code (Text):
    auto vmbr0
    iface vmbr0 inet static
            address  8.26.94.137
            netmask  255.255.255.0
            gateway  8.26.94.254
            bridge_ports none
            bridge_stp off
            bridge_fd 0
     
     
  6. MikeA

    MikeA Retired Moderator
    Retired Benefactor

    @DotRar Is the Proxmox host installed from the official Proxmox ISO or did you do a manual install via Debian?
     
  7. Manual install on Debian. I can do a fresh install if need be since I did one last night

    EDIT: Networking was playing up (interface wouldn't come up if there was a gateway option) so i reinstalled. Probably coulda fixed it but meh
     
    #7 DotRar, Mar 25, 2018
    Last edited: Mar 25, 2018
  8. Ended up reinstalling the server using the Proxmox ISO and buying another IP. Here's my interfaces file now:
    Code (Text):
    auto lo
    iface lo inet loopback

    # for Routing
    auto vmbr1
    iface vmbr1 inet manual
            bridge_ports dummy0
            bridge_stp off
            bridge_fd 0


    # vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
    auto vmbr0
    iface vmbr0 inet static
            address 8.26.94.137
            netmask 255.255.255.0
            network 8.26.94.0
            broadcast 8.26.94.255
            gateway 8.26.94.254
            bridge_ports eth0
            bridge_stp off
            bridge_fd 0

    iface vmbr0 inet6 static
            address 2607:5300:0060:a089::
            netmask 64
            post-up /sbin/ip -f inet6 route add 2607:5300:0060:a0ff:ff:ff:ff:ff dev vmbr0
            post-up /sbin/ip -f inet6 route add default via 2607:5300:0060:a0ff:ff:ff:ff:ff
            pre-down /sbin/ip -f inet6 route del default via 2607:5300:0060:a0ff:ff:ff:ff:ff
            pre-down /sbin/ip -f inet6 route del 2607:5300:0060:a0ff:ff:ff:ff:ff dev vmbr0
     
    Output of ifconfig:
    Code (Text):
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            ether 9c:5c:8e:51:69:7d  txqueuelen 1000  (Ethernet)
            RX packets 1684635  bytes 246407946 (234.9 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 41310  bytes 3413898 (3.2 MiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 241  bytes 27245 (26.6 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 241  bytes 27245 (26.6 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    vmbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 8.26.94.137  netmask 255.255.255.0  broadcast 8.26.94.255
            inet6 fe80::9e5c:8eff:fe51:697d  prefixlen 64  scopeid 0x20<link>
            inet6 2607:5300:60:a089::  prefixlen 64  scopeid 0x0<global>
            ether 9c:5c:8e:51:69:7d  txqueuelen 1000  (Ethernet)
            RX packets 15717  bytes 812631 (793.5 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 724  bytes 80216 (78.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    vmbr1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet6 fe80::78ac:79ff:fe0d:6158  prefixlen 64  scopeid 0x20<link>
            ether 7a:ac:79:0d:61:58  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 7  bytes 746 (746.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
     
    I want to assign 8.26.94.137 to my VM and 198.27.88.17 to the host, not sure how to do this though
     
  9. The IP: 8.26.94.137 Is the IP address of your machine (Atleast it sounds like it is). You'd have to get the gateway and the netmask of that gateway otherwise you're not able to get that IP routed. Crankly with Hetzner I was able to generate a vMAC and let the VM DHCP it's IP which is way more useful.. (I did that with XENSERVER)
     
  10. You're right. I'll grab another IP now
     
  11. Got another IP (begins in 144). I'd like to assign this one to the VM. I updated the interfaces file and now the Windows VM says that the adapter is enabled but not connected. Here's the interfaces file:

    Code (Text):
    auto lo
    iface lo inet loopback

    auto eth0:0
    iface eth0:0 inet manual
            address 198.27.88.17
            netmask 255.255.255.0
            broadcast 198.27.88.255
            gateway 198.27.88.254
            network 198.27.88.0

    auto eth0:1
    iface eth0:1 inet manual
            address 144.217.251.147
            netmask 255.255.255.0
            broadcast 144.217.251.255
            network 144.217.251.0
            gateway 144.217.251.254
    #        bridge_ports off
    #        bridge_stp off
    #        bridge_fd 0

    # for Routing
    #auto vmbr1
    #iface vmbr1 inet manual
    #       bridge_ports dummy0
    #       bridge_stp off
    #       bridge_fd 0


    # vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
    auto vmbr0
    iface vmbr0 inet static
            address 8.26.94.137
            netmask 255.255.255.0
            network 8.26.94.0
            broadcast 8.26.94.255
            gateway 8.26.94.254
            bridge_ports eth0
            bridge_stp off
            bridge_fd 0

    auto vmbr1
    iface vmbr1 inet static
            address 144.217.251.147
            netmask 255.255.255.255
            broadcast 144.217.251.147
            bridge_ports eth0:1
            bridge_stp off
            bridge_df 0

    iface vmbr0 inet6 static
            address 2607:5300:0060:a089::
            netmask 64
            post-up /sbin/ip -f inet6 route add 2607:5300:0060:a0ff:ff:ff:ff:ff dev vmbr0
            post-up /sbin/ip -f inet6 route add default via 2607:5300:0060:a0ff:ff:ff:ff:ff
            pre-down /sbin/ip -f inet6 route del default via 2607:5300:0060:a0ff:ff:ff:ff:ff
            pre-down /sbin/ip -f inet6 route del 2607:5300:0060:a0ff:ff:ff:ff:ff dev vmbr0

    post-up /sbin/ifconfig eth0:0 198.27.88.17 netmask 255.255.255.255 broadcast 198.27.88.17
    pre-down /sbin/ifconfig eth0:0 down

    post-up /sbin/ifconfig eth0:1 144.217.251.147 netmask 255.255.255.255 broadcast 144.217.251.147
    pre-down /sbin/ifconfig eth0:1 down