Virtualisation Xen

Important: Never configure your network card as bridge. You may broadcast a virtual MAC address on the network, causing the emergency shutdown of your network port and the suspension of your server. Configure only NAT or routed mode!

Failover IP Xen

Change the file xend-config.sxp for the usage of the “route” scripts of Xen

(network-script network-route) 
(vif-script     vif-route)

add to the script

echo  'echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp' >> /etc/xen/scripts/network-route

in the XEN configuration of the VM:

vif  = [ 'ip=my_ip_failover' ]
netmask = "255.255.255.0" 
gateway = "ADDR_IP_MACHINE_HOST" 

in the configuration of the VM

auto eth0
iface eth0 inet static address my_ip_failover
netmask 255.255.255.255
post-up /sbin/ip route add ADDR_IP_MACHINE_HOST/32 dev eth0
post-up /sbin/ip route add default via ADDR_IP_MACHINE_HOST