I'm sharing the way what I used to bring a VM online using OVH's IP failover.
I hope it helps someone who is going through the same difficulties I encountered.
DEFINITIONS
ens3f0 = Main network interface in proxmox
51.xxx.xxx.xxx = Main IP PROXMOX server
51.xxx.xxx.254 = Your gateway, in OVH uses the server's main IP replacing the last digits by 254
158.xx.xxx.xx/29 = Your IP FAILOVER range at OVH
158.xx.xxx.23 = VM IP of the FAILOVER range above, the IP must not be the first or the last of the range
Before starting, create a virtual MAC address on the OVH panel, do not use the first and last IP of your FAILOVER IP range.
To create the virtual MAC use the following tutorial: https://docs.ovh.com/gb/en/dedicated/network-bridging/
Change to:
Your /etc/network/interfaces file should look like this:
IMPORTANT
For IP FAILOVER it is essential that bridge-ports has the value none, you must not set a bridge port, this way it is as if your VM were directly connected to the OVH network.
SETTING VM CENTOS 7
First step disable NetworkManager
Setting routes
File /etc/sysconfig/network-scripts/route-eth0 will only work if NetworkManger is disabled, make sure you have done the above step.
Replace to:
Setting network interface
Must look like this:
insert this
https://docs.ovh.com/gb/en/dedicated/network-bridging/
https://pve.proxmox.com/wiki/Network_Configuration
https://pve.proxmox.com/pve-docs/images/default-network-setup-routed.svg
I hope it helps someone who is going through the same difficulties I encountered.
DEFINITIONS
ens3f0 = Main network interface in proxmox
51.xxx.xxx.xxx = Main IP PROXMOX server
51.xxx.xxx.254 = Your gateway, in OVH uses the server's main IP replacing the last digits by 254
158.xx.xxx.xx/29 = Your IP FAILOVER range at OVH
158.xx.xxx.23 = VM IP of the FAILOVER range above, the IP must not be the first or the last of the range
Before starting, create a virtual MAC address on the OVH panel, do not use the first and last IP of your FAILOVER IP range.
To create the virtual MAC use the following tutorial: https://docs.ovh.com/gb/en/dedicated/network-bridging/
Code:
# /etc/sysctl.conf
Change to:
Code:
net.ipv4.ip_forward=1
Code:
# sysctl -p
Code:
# cat /etc/network/interfaces
Your /etc/network/interfaces file should look like this:
Code:
auto lo
iface lo inet loopback
auto ens3f0
iface ens3f0 inet manual
iface ens13f0 inet manual
iface ens13f1 inet manual
iface ens3f1 inet manual
iface enp0s20f0u2u2c2 inet manual
auto vmbr0
iface vmbr0 inet manual
bridge-ports ens3f0
bridge-stp off
bridge-fd 0
address 51.xxx.xxx.xxx/24
gateway 51.xxx.xxx.254
auto vmbr1
iface vmbr1 inet static
address 158.xx.xxx.xx/29
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr1/proxy_arp
IMPORTANT
For IP FAILOVER it is essential that bridge-ports has the value none, you must not set a bridge port, this way it is as if your VM were directly connected to the OVH network.
SETTING VM CENTOS 7
First step disable NetworkManager
Code:
# systemctl stop NetworkManager.service
Code:
# systemctl disable NetworkManager.service
Code:
# systemctl restart network.service
Code:
# systemctl enable network.service
Setting routes
File /etc/sysconfig/network-scripts/route-eth0 will only work if NetworkManger is disabled, make sure you have done the above step.
Code:
# nano /etc/sysconfig/network-scripts/route-eth0
Replace to:
Code:
51.xxx.xxx.254 dev eth0
default via 51.xxx.xxx.254 dev eth0
Setting network interface
Code:
# nano /etc/sysconfig/network-scripts/ifcfg-eth0
Must look like this:
Code:
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=eth0
UUID=e1641beb-1xxxxxxxxxxxx #UUID generated automatically
DEVICE=eth0
ONBOOT=yes
USERCTL=no
PEERDNS=no
NETMASK=255.255.255.255
IPADDR=158.xx.xxx.23
GATEWAY=51.xxx.xxx.254
ARP=yes
HWADDR=02:00:XXXXXXXX #VIRTUAL MAC ADDRESS obtained from OVH
#
NM_CONTROLLED=no
Code:
# nano /etc/resolv.conf
insert this
Code:
nameserver 213.186.33.99
https://docs.ovh.com/gb/en/dedicated/network-bridging/
https://pve.proxmox.com/wiki/Network_Configuration
https://pve.proxmox.com/pve-docs/images/default-network-setup-routed.svg
Last edited: