Connecting vRack to OVH Public Cloud Instance
Date: October 12, 2017
|
Posted by:

Prerequisites

This guide assumes that you have already created a Public Cloud instance at OVH and have also ordered a vRack (giggity). The purpose of these notes are to explain how to first modify the vRack IP ranges, etc. using the OVH API and how to then attach the new private network interface to your existing instances.

Configure vRack VLANs

First, the OVH API is available here: https://ca.api.ovh.com/

To modify a vRack network in a public cloud instance, all changes should be made within the section

Once you get here, it is quite self-explanatory, first use the relevant GET calls to find out all the information you need such as serviceName and so on. I won’t go into great detail here because it really depends what you are trying to modify and common sense can get you through the general usage of the API.

Attaching LAN Interface to Instances

This is the tricky bit. You must create a new network interface on your VPS instance in order to connect it to the vRack network. OVH documentation shows that you can use their API to do this when creating a new instance, but a limitation of it is that you cannot attach a new private network to an existing VPS. In order to do this, you must connect to the OpenStack API.

Connect to OpenStack and Modify Network Interfaces

  1. Create a new OpenStack user in the OVH management portal (Click + Add User)
  2. Click on the wrench icon on the right and select Downloading an Openstack configuration file
  3. Choose the datacenter region you are working in and select Confirm
  4. This will download a file called openrc.sh
  5. Now fire up an SCP client like WinSCP or similar and connect to the VPS you would like to modify
  6. Upload the openrc.sh file to the /root directory on your server
  7. Connect to the server you just uploaded the file to via SSH using a client like PuTTY or OpenSSH
  8. On same server, run the following command:
  9. List the available networks:
  10. With the OpenStack APIs, you can add the private network interface to an existing instance

Configuring the network interface

You can check that your 2 interfaces are on your instance using the following command:

You will normally see three network interfaces:

  • lo: Loopback
  • eth0: your public interface
  • eth1: your private interface

You then just have to configure your private IP:

And then enable your network interface:

emaktech

2 Comments

  • great! i had issues to configure the ovh’s public cloud, and all the official docs seem to be uncompleted or wrong.
    many thanks!!!

  • The OVH docs claim(ed) that it is impossible to connect existing server to existing VLAN, surprise:) To make it persitent I had to add following to /etc/network/interfaces:

    # VLAN
    auto eth1
    iface eth1 inet static
    address 192.168.0.5
    netmask 255.255.0.0
    # End VLAN

  • Leave a Reply

    Your email address will not be published. Required fields are marked *