How to recover VM networking when I change /etc/networking/interfaces

akballow

New Member
Oct 29, 2024
16
0
1
Hello all,

I have an issue where whenever I make changes to /etc/networking/interfaces, specifically to the bridge like vmbr0 that all the VMs are on they loose networking until i do something silly like turn the VM Nic firewall off/on to get the networking back.

Is there any official documented or more sophisticated way to recover the VM networking after making changes than doing some big script that goes to each and every VM to toggle each and every nic Firewall On/Off?


Like my method works but it takes forever to run the firewall toggle with the pvesh for 300 vms with 5 nics each.

Thanks
 
Last edited:
do you have done a reload or a restart of networking service after change ? (a reload shouldn't break you vm, but a restart with detach all vms interfaces, as they are not defined in /etc/network/interfaces)
Thanks this is probably my problem. I am restarting and not reloading. Noted

Edit: Actually this might not be working for my use case. Sure when i reload the networking the VMs stay up but, the new item which i put into the interfaces config to allow for ipv6 does not apply unless i restart the service.

iface vmbr0 inet6 static auto
accept_ra 1
autoconf 1
 
Last edited:
Thanks this is probably my problem. I am restarting and not reloading. Noted

Edit: Actually this might not be working for my use case. Sure when i reload the networking the VMs stay up but, the new item which i put into the interfaces config to allow for ipv6 does not apply unless i restart the service.

iface vmbr0 inet6 static auto
accept_ra 1
autoconf 1
mmm, it's possible that some value are not applied at reload.

btw, "static auto" is invalid, it's static or auto

ifupdown is able to detect inet|inet6 or static|auto automatically,
so it should work if you put accept_ra && autoconf 1 directly in main vmbr0

you can do : "ifreload -a -d" command line to see debug log and check that they are correctly applied