Ubuntu – OVH: How to configure Proxmox VM with static IP

networkingovhproxmoxUbuntu

This has been frustrating me immensely for the past week. I have an OVH server with the IP of 144.217.76.xxx. I purchased an additional 2 IP addresses for VM configuration: 66.70.243.x81 66.70.243.x85

No matter what I do, I cannot seem to get the IP addresses to work with the VM's. I am not sure if it on the guest OS side or on the proxmox networking side. Normally this wouldn't be an issue for me, however, the Proxmox networking setup and the fact that the addresses are on a completely separate subnet has thrown me off a bit.

Current Ubuntu VM /etc/network/interfaces/

Please help if you can! I greatly apologize if there is another question like this, I was unable to find anything. Thanks again.

Best Answer

Okay, so on the OVH system there is a particular way of actually utilising IP's as vaguely laid out in their documentation.

(I'm guessing your bridge already works...)

  1. Turn the virtual machine off.

To use any additional IP / or also known as failover IPs (since OVH do not actually do plain additional IPs) you will need to first create a virtual mac address.

How do you do this?

  1. Login to your OVH Control Panel
  2. Once logged in -> Click IP (Manage IP) http://prntscr.com/ftqd89
  3. Find the IP which you wish to use
  4. (http://prntscr.com/ftqe6n) (Click the COG next to the IP)
  5. Click 'Add Virtual Mac'
  6. Enter Information (does not really matter what you enter)
  7. Now you have created the virtual mac address. (Keep that saved we'll need it for the configuration within proxmox)

So now we need to setup the VM inside proxmox; we do this by setting the primary NIC interface Mac Address to that of the one just created.

http://prntscr.com/ftqi9p http://prntscr.com/ftqiht

Once you have done this turn the virtual machine back on - then once it boots, configure the interface. (spelling broadcast right this time would be a big help ;)

The network settings for 'ens18' should look something like:

auto ens18 iface ens18 inet static
        address 66.70.243.181
        netmask 255.255.255.0
        broadcast 66.70.243.255
        gateway 66.70.243.254
        dns-nameservers 8.8.8.8 8.8.4.4

OVH Gateway IP is always .254 of the subnet - good tip

Now once you have saved this configuration - reboot the network service network-manager restart

If that is successfull you should be able to successfully ping google using the following command ping -c3 google.com (If this is successful then your DNS resolution and network is working)

I am quite tired so forgive any mistakes I made - however this should work fine. ;)

Related Topic