Debian Like (Debian, Ubuntu...)
Important:
The gateway you need to use in your virtual machine should not be, The IP of your dedicated server or IP failover but you must use the gateway provides for your dedicated server. You must in no case use: route add default gw dev eth0 otherwise you may cut your IP for the virtual server. To determine the correct gateway to use:
IP failover is: YYY.YYY.YYY.YYY
Main IP of your dedicated server: XXX.XXX.XXX.XXX
So the IP of the gateway for your virtual machine(GATEWAY_VM) : XXX.XXX.XXX.254
This gateway will be used as GATEWAY_VM later in the guide.
Contents of the file: /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address IP.FAIL.OVER
netmask 255.255.255.255
broadcast IP.FAIL.OVER
post-up route add GATEWAY_VM dev eth0
post-up route add default gw GATEWAY_VM
pre-down route del GATEWAY_VM dev eth0
pre-down route del default gw GATEWAY_VM
Contents of the file: /etc/resolv.conf
nameserver 213.186.33.99