With OVH US Failover IPs, connecting your virtual machines to the Internet can be a breeze. Follow this tutorial to connect your Ubuntu 14.04 VM to the Internet.
- Creating a Virtual MAC for a Failover IP in the OVH US Manager
- Adding a Virtual MAC to the Virtual Machine's NIC in ESXi
- Configuring Network Settings in the Virtual Machine
- Failover IP through OVH US
- Dedicated Server running VMware ESXi 6.5
- Bootable VM in VMware ESXi 6.5 running a Debian-Based OS
Step One: Creating a Virtual MAC for a Failover IP in the OVH US Manager
In this section, we will be creating a vMAC (Virtual MAC Address) to be used by the NIC (Network Interface Card) which ESXi assigns to your VM. To begin, log in to the OVH US Manager. On the left-hand sidebar click the IP option.
Choose the Failover IP you wish to configure to your VM and click the ellipses (...) next to it. Then, select Add a virtual MAC from the drop-down menu.
In the popup menu, change the "Type" to "vmware" and enter the name of your virtual machine.
Step Two: Adding a Virtual MAC to the Virtual Machine's NIC in ESXi
In this step, we will be pairing the vMAC, which we generated in Step One, to the interface that ESXi has assigned to the VM. To complete this step, your VM must be powered off.
In ESXi, right-click your VM and select Edit settings from the drop-down menu.
Next, select the drop-down next to "Network Adapter 1" and change the "MAC Address" field to Manual. Enter the vMAC created in the OVH US Manager into the "Network Adapter" field.
Step Three: Configuring Network Settings in the Virtual Machine
In this step, we will be configuring our interface settings. To do this, you must first open your interface configuration file. Use the following command to do so:
$ sudo vim /etc/network/interfaces
Edit the interfaces file to make it appear as follows:
# This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5).
# The loopback network interface auto lo iface lo inet loopback # The primary network interface
auto eth0 iface eth0 inet static address x.x.x.x netmask 255.255.255.y dns-nameservers 188.8.131.52 184.108.40.206
post-up route add z.z.z.254 dev eth0
post-up route add default gw z.z.z.254
pre-down route del z.z.z.254 dev eth0
pre-down route del default gw z.z.z.254
In this file, replace the following pieces of information as instructed:
- 1. If you replace the VMXNET3 NIC with another one, your NIC may use a different naming convention. If it does, replace all instances of "eth0" in the file with the name of your interface. If you don't know the name of your interface, you can find it using the following command:
$ ip addr list
- 2. Next to "address", replace "x.x.x.x" with the Failover IP to which you have added the vMAC in the OVH US Manager.
- 3. Next to "netmask", replace the "y" in the final octet with the correct number depending on the size of the block of IPs you have purchased. For instance, if you are using a /29 block, put "248" in the last octet.
- 4. In the gateway routing portion, replace the "z.z.z." with the first three octets of your Dedicated Server's IP address with a final octet of "254". For instance, if your Dedicated Server IP was 220.127.116.11, you would use 18.104.22.168 as your gateway.
- 5. The DNS name servers listed are from OpenDNS. Feel free to use other name servers here, if you choose.
Now you will need to bring your NIC online. To do so, reboot the server using the following command:
$ sudo reboot
To test that the VM is fully connected to the Internet, ping example.com. If you get a response, you are good to go. If you do not, restart your VM and attempt the ping again.
Connecting your VM to the Internet is an essential task before it can be used as a web server, a mail server, or whatever other use you have in mind. Having read this article, you should be familiar with the steps that are required to connect an Ubuntu 14.04 VM to the Internet using VMware ESXi 6.5.