proxmox vm networking breaks when you restart your network on the hostnode

I did a systemctl restart networking and it broke Proxmox VM connectivity!


#proxmox is the problem after restarting the network the tap devices go to disabled state
[2230884.919905] vmbr0: port 7(tap118i0) entered disabled state
[2230884.948864] vmbr0: port 8(tap122i0) entered disabled state
[2230884.972748] vmbr0: port 6(tap119i0) entered disabled state
[2230885.004745] vmbr0: port 5(tap117i0) entered disabled state
[2230885.036736] vmbr0: port 4(tap112i0) entered disabled state
[2230885.060693] vmbr0: port 3(tap111i0) entered disabled state
[2230885.100729] vmbr0: port 2(tap110i0) entered disabled state
[2230885.227515] vmbr0: port 1(enp0s8) entered blocking state
[2230885.227518] vmbr0: port 1(enp0s8) entered disabled state
[2230885.228071] device enp0s8 entered promiscuous mode


As we can see the tap devices went disabled which makes sense BUT they didn't come back so all VMs now have no network connection (the equivalent of basically unplugging the cable from the server):


#use brctl to fix

brctl addif vmbr0 tap118i0

Feb 25 06:30:42 proxmoxdal01 kernel: [2231303.128510] vmbr0: port 2(tap118i0) entered blocking state
Feb 25 06:30:42 proxmoxdal01 kernel: [2231303.128513] vmbr0: port 2(tap118i0) entered disabled state
Feb 25 06:30:42 proxmoxdal01 kernel: [2231303.128754] vmbr0: port 2(tap118i0) entered blocking state
Feb 25 06:30:42 proxmoxdal01 kernel: [2231303.128756] vmbr0: port 2(tap118i0) entered forwarding state

Here is a handy bash script that will automatically readd all of your tap devices to vmbr0

for tapdev in `ip a|grep tap| awk '{print $2}'|sed s/://`; do
brctl addif vmbr0 $tapdev
done

 

And they all came back:

Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.163869] vmbr0: port 3(tap110i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.163873] vmbr0: port 3(tap110i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.164059] vmbr0: port 3(tap110i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.164062] vmbr0: port 3(tap110i0) entered forwarding state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.165739] vmbr0: port 4(tap111i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.165742] vmbr0: port 4(tap111i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.165926] vmbr0: port 4(tap111i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.165928] vmbr0: port 4(tap111i0) entered forwarding state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.167515] vmbr0: port 5(tap112i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.167520] vmbr0: port 5(tap112i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.167717] vmbr0: port 5(tap112i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.167721] vmbr0: port 5(tap112i0) entered forwarding state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.169253] vmbr0: port 6(tap117i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.169260] vmbr0: port 6(tap117i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.169396] vmbr0: port 6(tap117i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.169398] vmbr0: port 6(tap117i0) entered forwarding state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.170867] vmbr0: port 7(tap119i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.170869] vmbr0: port 7(tap119i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.171023] vmbr0: port 7(tap119i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.171026] vmbr0: port 7(tap119i0) entered forwarding state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.172605] vmbr0: port 8(tap122i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.172608] vmbr0: port 8(tap122i0) entered disabled state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.172768] vmbr0: port 8(tap122i0) entered blocking state
Feb 25 06:31:52 proxmoxdal01 kernel: [2231373.172770] vmbr0: port 8(tap122i0) entered forwarding state

 


Tags:

proxmox, vm, networking, restart, hostnodei, systemctl, connectivity, restarting, devices, disabled, vmbr, enp, blocking, promiscuous, mode, didn, vms, equivalent, unplugging, server, brctl, addif, feb, proxmoxdal, kernel, forwarding, bash, automatically, readd, tapdev, ip, grep, awk, sed,

Latest Articles

  • ImageMagick Convert PDF Not Authorized
  • ImageMagick Converted PDF to JPEG some files have a black background solution
  • Linux Mint Mate Customize the Lock screen messages and hide username and real name
  • Ubuntu/Gnome/Mint/Centos How To Take a partial screenshot
  • ssh how to verify your host key / avoid MIM attacks
  • Cisco IP Phone CP-8845 8800/8900 Series How To Reset To Factory Settings Instructions
  • ls how to list ONLY directories
  • How to encrypt your SSH private key file id_rsa
  • Linux Mint 18 Disable User Name List from showing on Login Screen
  • Firefox Cannot Hit Enter Key In Address Bar and Location History Not Working
  • Cisco Unified Communications Manager / CUCM IP 8.6,10,12 Install Error Solution
  • Ubuntu Debian Mint Linux SSHD OpenSSH Server Not Starting After Reboot Solution
  • nmap how to scan for all ports and not just the 1000 most common ports
  • Windows 7,8,10 and Server 2008, 2012, 2016, 2019 Read Only Attribute Won't Go Away
  • bind / named how to make a wildcard record and retain defined A records
  • Cisco Unified Communications Manager 12 Install Errors on Proxmox/KVM
  • Local Vs Universally Administered MAC Address NIC Refuses to come up
  • Cisco Unified Communications Manager 12 CUCM 12 - How To Enable Video Calling
  • Windows 7, 8, 10, Windows Server 2008, 2012, 2016, 2019 How To AC97 Audio Drivers and Other Unsigned Drivers
  • Cisco Unified Communications Manager / CUCM IP Telephony Definitions