Shutdown != Reboot for network interfaces

kthun

New Member
Apr 26, 2019
2
0
1
32
Hi,

so I've encountered an interesting issue:
I have a 3 node Cluster of pve 5.4 machines. Restarting the network interface vmbr0 (bridge) with ifdown vmbr0 and ifup vmbr0 let my running VM on this node loose its connection.
The PVE node has internet connection after the commands, the VM has not. Restarting the VM does not bring it back, BUT a shutdown does. Also a live-migration brings the connection back. Why is that a thing? Shouldn't reboot perform the same as a shutdown and restart?

I've read that performing a reboot might skip the power on self test.

After some testing I found out that switching the network device also brings back the connection. Restarting the network service does not help. LXC are reconnecting after rebooting them.


Best regards,

kthun
 
I have a 3 node Cluster of pve 5.4 machines. Restarting the network interface vmbr0 (bridge) with ifdown vmbr0 and ifup vmbr0 let my running VM on this node loose its connection.
This is (sadly) expected behavior (and has been like that for a very long time) in this case -> restarting the network (with ifdown and ifup) removes the bridge and thus all guest's tap-devices also lose their bridge.
PVE recently also provides the 'ifupdown2' package, which offers the `ifreload` command (see `man ifreload`), which handles this case more gracefully! You can install it and it should work as a drop-in replacement.
Apart from that the only consistent way to make changes to your network configuration is to edit the config and reboot the node (this also makes sure that your changes are reboot-safe)

Restarting the VM does not bring it back, BUT a shutdown does. Also a live-migration brings the connection back.
This is also quite expected (for now) - a reboot/reset keeps the qemu-process running, thus it does not reinitialize the device (which would result in the tap device being recreated and associated with the bridge), and during migration - qemu gets started on the new node's side (again with the initialization)

Hope this helps!
 
  • Like
Reactions: kthun
This sounds like it may be changed in the future?
Well - qemu recently added a patch which enables the caller to see a difference between reboot and shutdown - so we're considering on integrating such a detection - however there is no date set of when/if this will be implemented and shipped.

Hope this helps!
 
  • Like
Reactions: kthun

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!