Failover IP configuration for VMs on Bare Metal Cloud servers

Virtualization - Overview

Virtualization technologies allow to create multiple virtual machines on one physical host. This allows better usage of the available computing power and associated resources like storage and RAM.

It is possible to create virtual machines (VM) on Bare Metal Cloud Servers using available solutions, like VMware ESXi, XEN or KVM.

The management of these virtual interfaces is possible either via the command line from a command-line-interface, or by using web based administration panels. These can either come directly built-in within the virtualization solution like it is the case for ESXi or they can be third-party software built around an existing solution like Proxmox, an interface for KVM based virtual machines or LXC paravirtualized containers.

The network connectivity of these virtual machines can be assured by assigning them a failover IP with a virtual MAC address. While the virtual MAC address can be configured using the management tool of your hypervisor, the failover IP has to be configured directly from the guest OS of the virtual machine.

Below you find configuration instructions for virtual machines running on:

Requirements

  • You have an account and are logged into console.scaleway.com
  • You have a Bare Metal Cloud Server running a hypervisor.
  • You have a failover IP with assigned virtual MAC address.
  • You have sudo privileges or access to the root user.

Note: The unique Gateway for all failover IPs is: 62.210.0.1. The DNS resolvers provided by Scaleway are 62.210.16.6 and 62.210.16.7.

Network Configuration on a Ubuntu VM

On Ubuntu Bionic Beaver (18.04 LTS) or later, you can use Netplan to configure the networking of the virtual machine. If you prefer a more traditonal configuration, refer to the Debian section.

1 . Open the Netplan configuration file /etc/netplan/01-netcfg.yaml in a text editor of your choice, for example nano:

nano /etc/netplan/01-netcfg.yaml

The IP address must be written in CIDR notation inside the configuration file. The netmask for all failover IPs is /32.

2 . To make the virtual machine reachable over the Internet, the route information must be specified in the configuration file. Once edited, your configuration file looks like the following example. Remember to replace fail.over.ip.address with your failover IP address:

network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      dhcp4: no
      dhcp6: no
      addresses: [fail.over.ip.address/32]
      gateway4: 62.210.0.1
      nameservers:
        addresses: [62.210.16.6, 62.210.16.7]
      routes:
      - to: 62.210.0.1/32
        via: fail.over.ip.address
        scope: link

3 . Activate the new configuration by running the following command:

netplan apply

Network Configuration on a Debian VM

1 . Open the file /etc/network/interfaces in your favourite text editor, i.e nano:

nano /etc/network/interfaces

2 . Edit the network configuration as shown in the following example. Do not forget to replace fail.over.ip.address with your failover IP.

auto eth0
iface eth0 inet static
    address fail.over.ip.address
    netmask 255.255.255.255
    pointopoint 62.210.0.1
    gateway 62.210.0.1

3 . Save the filex, exit the text editor. Then open the file /etc/resolv.conf in the text editor:

nano /etc/resolv.conf

4 . Enter the information about the DNS resolver. You can either use Scaleway’s DNS resolvers or any other you want to use:

nameserver 62.210.16.6
nameserver 62.210.16.7

5 . Save the file and activate the new configuration by activating the network interface:

ifup eth0

Network Configuration on a CentOS VM

1 . Open the file /etc/sysconfig/network-scripts/ifcfg-eth0 in a text editor, for example nano:

nano /etc/sysconfig/network-scripts/ifcfg-eth0

2 . Edit the file as shown below. Do not forget to replace fail.over.ip.address with your failover IP and virtual:mac:address with the virtual MAC addressociated to the IP.

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=fail.over.ip.address
GATEWAY=62.210.0.1
DNS1=62.210.16.6
DNS2=62.210.16.7
ARP=yes
HWADDR=virtual:mac:address

3 . Save the file and exit the text editor.

4 . Open the file /etc/sysconfig/network-scripts/route-eth0 in a text editor, for example nano:

nano /etc/sysconfig/network-scripts/route-eth0

5 . Edit the file as shown below to configure the default route of the virtual machine:

62.210.0.1 dev eth0
default via 62.210.0.1 dev eth0

6 . Activate the new configuration by enabling the network interface of the virtual machine:

ifup eth0

Network Configuration on a CentOS VM

1 . Connect to the desktop of your virtual machine using the console interface of your hypervisor.

2 . Open the Network configuration in the Windows Control Panel.

3 . Double click on the network adapter of your virtual machine and enter the following information. Replace fail.over.ip.address with your failover IP address:

Address: fail.over.ip.address
Subnetmask: 255.255.255.255
Gateway: 62.210.0.1
DNS 1: 62.210.16.6
DNS 2: 62.210.16.7

Discover New Bare Metal Cloud servers

Deploy 100% dedicated servers that are billed by the hour and available in minutes.