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

  • python mysql install error: /bin/sh: 1: mysql_config: not found /bin/sh: 1: mariadb_config: not found /bin/sh: 1: mysql_config: not found mysql_config --version
  • FreePBX 17 How To Add a Trunk
  • Docker Container Onboot Policy - How to make sure a container is always running
  • FreePBX 17 How To Add Phones / Extensions and Register
  • Warning: The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes. solution
  • Cisco How To Use a Third Party SIP Phone (eg. Avaya, 3CX)
  • Cisco Unified Communication Manager (CUCM) - How To Add Phones
  • pptp / pptpd not working in DD-WRT iptables / router
  • systemd-journald high memory usage solution
  • How to Install FreePBX 17 in Linux Debian Ubuntu Mint Guide
  • How To Install Cisco's CUCM (Cisco Unified Communication Manager) 12 Guide
  • Linux Ubuntu Redhat How To Extract Images from PDF
  • Linux and Windows Dual Boot Issue NIC Won't work After Booting Windows
  • Cisco CME How To Enable ACD hunt groups
  • How to install gns3 on Linux Ubuntu Mint
  • How to convert audio for Asterisk .wav format
  • Using Cisco CME Router with Asterisk as a dial-peer
  • Cisco CME How To Configure SIP Trunk VOIP
  • Virtualbox host Only Network Error Failed to save host network interface parameter - Cannot change gateway IP of host only network
  • Cisco CME and C7200 Router Testing and Learning Environment on Ubuntu 20+ Setup Tutorial Guide