Sunday, December 23, 2012
Install a Secondary/Failover IP in an Ubuntu Server 12.04 VM hosted in a VMWare ESXi 5.0 Update 1 physical machine on an OVH dedicated server
Assumptions:
- You have a dedicated server from OVH http://www.ovh.ie/ which supports virtualization
- You installed and configured the VMWare ESXi 5.0 Update 1 image from OVH (using their web interface manager and their OS image)
- You installed an Ubuntu Server 12.04 VM in ESXi
- You requested and got (by e-mail) a Failover IP by selecting your server in the OVH manager, going to Services at the bottom, clicking on on IP Failover, then clicking on "Order an IP Fail-Over" and following their wizard.
Steps (after you got the IP):
- In the OVH Manager, select your physical server from the drop down at the top.
- Click on Services at the bottom (on the page that opens about the physical server)
- Click on "Virtual Mac for VPS"
- Click on "Associate a virtual MAC to an IP address"
- Select the Failover IP you want to use, give the VM a name, and select the Virtual Mac Type (I used "OVH", it works fine with ESXi).
- Click Validate
- Copy paste the new MAC in the vSphere Client - stop your VM, right click on the VM name > Edit Settings > Network Adapter > On the right under Mac Address click on "Manual", then paste the new Mac there. Click OK and start the VM.
- Open the Console to the VM.
- Add the following to /etc/network/interfaces (I assume this file is mostly empty):
iface eth0 inet static
address FFF.FFF.FFF.FFF
netmask 255.255.255.255
broadcast FFF.FFF.FFF.255
auto eth0:1
iface eth0:1 inet static
address FFF.FFF.FFF.FFF
netmask 255.255.255.255
post-up route add MMM.MMM.MMM.254 dev eth0
post-up route add default gw MMM.MMM.MMM.254
post-down route del MMM.MMM.MMM.254 dev eth0
post-down route del default gw MMM.MMM.MMM.254
dns-search YOUR.DOMAIN.NAME.THIS.IS.OPTIONAL
dns-nameservers DDD.DDD.DDD.DDD DD2.DD2.DD2.DD2
- Here is the explanation of the IP "variables" above:
MMM.MMM.MMM.MMM = Main (physical) server IP
MMM.MMM.MMM.254 = Main (physical) server IP but with the last part set to 254
FFF.FFF.FFF.FFF = Failover IP
FFF.FFF.FFF.254 = Failover IP but with the last part set to 254 instead of the original part
FFF.FFF.FFF.255 = Failover IP but with the last part set to 255 instead of the original part
DDD.DDD.DDD.DDD = First DNS nameserver
DD2.DD2.DD2.DD2 = Second DNS nameserver (optional)
- Run /etc/init.d/networking restart
- Try to ping the VM IP
Good luck!
Subscribe to:
Post Comments (Atom)
2 comments:
Very well.
It works fine.
Thanks.
Hi,
I've done and does not work. It does not recognize the ping to host.
Can you help me?
Thanks
Post a Comment