For every failover IP address, you'll have to create route in node.
Example: ip r add FAIL.OVER.IP.ADDRESS/32 dev vmbr0
Actual problem is, if yo want to do live migration between cluster nodes, then you have to:
1) migrate VM
2) change default route inside VM
3) remove route from source node
4) add route to destination node
5) change route for this ip to new node in hetzner robot interface, or ropot api
I have created debian package (my proxmox is installed to debian servers) what does exactly that (hetzner specific).
Not recommended to use by beginners, use at your own risk.
Also: READ! readme file first, by default nothing is done, script expects configuration (vm failover ip addresses, physical node addresses, etc)
Should work on debian 8 and debian 9.
Code:
wget -O - https://deb.inlink.ltd/repo.key | apt-key add -
echo 'deb https://deb.inlink.ltd/debian stretch main' > /etc/apt/sources.list.d/inlink.list
apt update ; apt install clusterhelper
Code:
# README #
# This is proxmox cluster helper for Hetzne specific network configuration.
# It should be installed on every host and every VM that has public failover IP address.
# It will help to create routes inside VM's and hosts in case of VM migration.
# First, install ca-certificates and apt-transport-https package, since deb.inlink.ltd uses LetsEncrypt ssl certificate, their CA does not come by default with Debian.
# Then add inlink repository to hosts and VM's apt config.
# This procedure is same for cluster hosts and virtual machines.
$ apt install ca-certificates apt-transport-https
$ wget -O - https://deb.inlink.ltd/repo.key | apt-key add -
$ echo 'deb https://deb.inlink.ltd/debian jessie main' > /etc/apt/sources.list.d/inlink.list
$ apt update ; apt install clusterhelper
# If you installed this on VM, you must create hostlist configuration file, since VM has no idea what hosts are in cluster.
# Replace X's with your cluster node addresses.
$ echo -e "XXX.XXX.XXX.XXX\nXXX.XXX.XXX.XXX\nXXX.XXX.XXX.XXX\n" > /opt/inlink/clusterhelper/hostlist.conf
# If you installed it on cluster host, then you must have VM iplist configuration file in every cluster node.
# Since proxmox cluster synchronizes /etc/pve/ folder to every cluster node, create VM list in there:
$ echo -e "#First VM description\nXXX.XXX.XXX.XXX\n#Second VM description\nXXX.XXX.XXX.XXX\n" > /etc/pve/vmlist.conf
# In future, when adding failover IP addresses to cluster, you must add those IP addresses also to vmlist.conf file.
# In cluster host, you must also create Hetzner api helper script, this can be stored also in /etc/pve/ so it wil be replicated automatically to every cluster host.
# Example helper script /etc/pve/hetzner.sh (replace username and password with Hetzner webinterface username and password.)
------
cat <<'EOF'>> /etc/pve/hetzner.sh
#!/bin/bash
/usr/bin/curl -s -u XXXXXXX:XXXXXXX https://robot-ws.your-server.de/failover/${1} -d active_server_ip=${2}
EOF
------
# Files in folder /etc/pve/ cannot be made executable, so do't do that.
# Clusterhelper program will execute hetzner.sh regardless of execute bit existence.