Initiate VM migration if host loses network connectivity to VM network

Wodel

Member
Jul 31, 2022
13
0
6
Hi,

Is there a way to initiate VM migration if a host loses its connectivity to VM network.
In my HCI deployment I have 4 networks.
  • Management network : vmbr0 on bond0
  • Ceph strorage : bond1
  • DMZ : vmbr1 on vlan10 bond2
  • LAN : vmbr3 on vlan20 on bond2

Proxmox hosts have IP addresses only in the Mgmt and Ceph networks.

I am searching for a way to initiate VM migration if a host loses connection on bond2

Regards.
 
Hi @Wodel , there is no built-in, i.e. PVE native, way to do what you want.

You have to define what "looses connection" mean.
Is it physical link down?
Is it no icmp connectivity?
Is it no tcp connectivity?
Is it no tcp connectivity to local router? local server?
Is it no tcp connectivity to upstream router?
What is the timeout on decision to failover? 1 missed packed? 1 second? 60 seconds?
Do you have redundant network? (LACP, A/P bond, etc) What has to happen to declare network outage event?

Given that your hypervisor does not have IP connectivity on network in question, your options really depend on questions above. You may need to place a non-HA VM on each host for probing/decision making. There you can run either a predefined service or a self-built script that will initiate a failover.

If this is above your skill level, I am certain there are Proxmox Partners that would be willing to assist for a fee.

Cheers


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Is there a way to initiate VM migration if a host loses its connectivity to VM network.
this is a chicken and egg problem.

IF your host loses cluster connection it will be fenced and the vm will be restarted on a surviving host.

IF you are concerned with any of the other networks, you will need to write a monitoring routine and call the proxmox api (which would have to be reachable for this to work.)

LASTLY- if you really want true application level HA, make your application multiheaded and serve it from multiple hosts with a dns load balancer in the front.