How to configure OVH Failover IP on a VM with Netplan

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:

  1. Purchase failover IP for your service
  2. Add a virtual MAC for the failover IP
  3. Configure the VM network device to the virtual MAC in step 2
  4. Edit Netplan as above, the key config being
    on-link: true
  5. Done! The VM should have Internet, and you should be able to ping FAILOVER_IP

Leave a Reply

Your email address will not be published. Required fields are marked *