Hi all,
we're trying to improve the robustness of our IT deployment by moving one node to an offsite location. The nodes will stay in the same subnet using a site-2-site VPN handled by the external firewall. A test setup of this works already, but one potential issue has surfaced: When a VM is migrated from site A to site B, it will keep its IP configuration and have the default gateway still pointing at the firewall of site A. If site A then goes down, this will cause trouble for the VM, even though it would have perfectly fine hardware to run on.
The idea is now to have the VMs get their IP configuration via DHCP from the firewall. The IP address would be configured the same in each case, so this wouldn't change, but the default gateway would then be set to the proper firewall. This, however, requires that a DHCP renew is triggered when a VM has been migrated. This could be done manually, but an automated way would be beneficial. Is there a mechanism available in PVE to do this? Like a hook or something to invoke a command on the guest after the migration?
A workaround would be just set the DHCP lease time to something like 5min, but that feels like the second best idea at most...
Thanks and best regards,
Philipp
we're trying to improve the robustness of our IT deployment by moving one node to an offsite location. The nodes will stay in the same subnet using a site-2-site VPN handled by the external firewall. A test setup of this works already, but one potential issue has surfaced: When a VM is migrated from site A to site B, it will keep its IP configuration and have the default gateway still pointing at the firewall of site A. If site A then goes down, this will cause trouble for the VM, even though it would have perfectly fine hardware to run on.
The idea is now to have the VMs get their IP configuration via DHCP from the firewall. The IP address would be configured the same in each case, so this wouldn't change, but the default gateway would then be set to the proper firewall. This, however, requires that a DHCP renew is triggered when a VM has been migrated. This could be done manually, but an automated way would be beneficial. Is there a mechanism available in PVE to do this? Like a hook or something to invoke a command on the guest after the migration?
A workaround would be just set the DHCP lease time to something like 5min, but that feels like the second best idea at most...
Thanks and best regards,
Philipp