Here’s something that’s not too obvious. Recently I migrated from OneProvider to OVH. I installed Proxmox on the server, and bought additional failover IPs to be assigned to my VMs. However, what is not obvious is how to configure the VM to use the IP.
The gist of the configuration is that your VM uses the FAILOVER_IP on a /32 subnet, however, it needs the gateway of the dedicated server’s IP (DEDICATED_SERVER_GATEWAY x.x.x.254), which is outside the configured IP subnet.
The configuration using Netplan is this:
network:
ethernets:
ens18:
addresses:
- FAILOVER_IP/32
routes:
- to: default
via: DEDICATED_SERVER_GATEWAY
on-link: true
The step-by-step for OVH is as follows:
- Purchase failover IP for your service
- Add a virtual MAC for the failover IP
- Configure the VM network device to the virtual MAC in step 2
- Edit Netplan as above, the key config beingon-link: true
- Done! The VM should have Internet, and you should be able to ping FAILOVER_IP