Learn how to activate a vRack, create a private network, and add Public Cloud instances to your private network using the OVHcloud Control Panel, API, or CLI.
Objective
The OVHcloud vRack is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud services. At the same time, it allows you to add Public Cloud instances to your private network to create an infrastructure of physical and virtual resources.
This guide explains how to configure Public Cloud instances within your vRack.
Navigation path:Public Cloud > Select your project
Interfaces
Creating a vRack or adding an instance into the network can be done using the OVHcloud Control Panel, the OVHcloud APIv6, the OpenStack API, the Horizon interface, the OVHcloud CLI or Terraform.
Choose the interface or method that best suits your technical profile and needs. For each option, the guide instructions below describe the necessary steps.
The sections below describe the available actions for each interface/method.
OVHcloud Control Panel
The is a fully visual interface, ideally suited for managing multiple VLANs. You can also customise the private IP range, which by default is in 10.1.0.0/16.
The VLAN is deployed to the selected Region. You can also activate or deactivate gateways, enable DHCP distributions, etc.
You can also manage billing for your services in the OVHcloud Control Panel.
Horizon
The Horizon interface (independent from OVHcloud) is the original implementation of the OpenStack dashboard, which provides a web user interface to OpenStack services, including Nova, Swift, Keystone, etc.
This interface lets you manage almost all OpenStack actions. Use it if you need to manage more than 2 VLANs, add private network interfaces to your instances, manage custom images, etc.
Horizon functions zone-specific, therefore you need to remember to choose your logical (geographic) work zone at the top left of your interface (GRA5, SBG3, BHS1, etc.).
OVHcloud APIv6
Every action available in your OVHcloud Control Panel can also be performed via the OVHcloud APIv6.
It even offers more possibilities than the graphical interface.
The API interface is less visual than the OVHcloud Control Panel but will allow you to perform a large number of actions. You can manage and customise your VLAN, add interfaces to your instances, or create highly customised servers.
You can access it from our web page but also use it to create your PHP or Python scripts.
This way, you can freely automate basic tasks with scripts, optimise your own functions and much more.
Some API calls require specific input — retrieve the necessary information beforehand.
Public Cloud services can be administrated using Linux or Windows command lines after downloading and installing OpenStack tools.
This method requires a good knowledge of Linux or Windows to take advantage of it, but it allows you to leverage all the power of OpenStack.
Depending on the layer you want to manage, you will need to use the Nova (compute), Neutron (network), Glance (image) or Swift (Object Storage) client. The OpenStack client, the latest addition, lets you manage almost all OpenStack layers directly.
With the OpenStack API, you can also easily automate this management through your scripts.
For more information about the OpenStack API, see:
In some cases, the OpenStack APIs are easier; in others, use Nova, Neutron, etc. directly.
Moreover, some features may be missing from the OpenStack API depending on the version of your client and operating system.
This guide presents the simplest and most intuitive options.
See the official OpenStack documentation to learn more.
OpenStack CLI
You can manage your OVHcloud Public Cloud services and vRacks directly from your Linux or Windows terminal using the OpenStack CLI.
This interface allows you to manage all OpenStack layers:
Nova: instances (compute)
Neutron: networks
Glance: images
Cinder: volumes
The CLI centralizes these features and can be integrated into your scripts to automate your tasks.
The OpenStack CLI is useful for managing your vRack, but some functions may vary depending on the version of the client or operating system. Please refer to the official OpenStack documentation.
Terraform
Terraform can also be used to manage OVHcloud infrastructures.
You need to select the correct Terraform provider and resource. Find more information in our guide on using Terraform with OVHcloud.
Instructions
Step 1: Activating and managing a vRack
Warning
The vRack is managed at the OVHcloud infrastructure level, which means that you can only administer it in your OVHcloud Control Panel and the OVHcloud APIv6.
Via the OVHcloud Control Panel
Via the OVHcloud APIv6
Info
This does not apply to newly created projects which are now automatically delivered with a vRack. To view the vRack once the project has been created, go to the Network section and click on vRack private network to view the vRack(s).
If you have an older project without a vRack, you need to order one. The vRack itself is free and delivered within a few minutes.
In the left-hand menu, click Add a service (shopping cart icon). Use the filter at the top of the page or scroll down to find the service vRack.
You will be redirected to another page to validate the order, it will take a few minutes for the vRack to be setup in your account.
Once active, find it in your Control Panel under the Network section > vRack private network, labelled "pn-xxxxxx".
Click on your vRack, then select the project you want to add to the vRack from the list of eligible services and click the Add button.
This call is optional and only allows you to check the status of the task. Once it is complete, you can proceed to the next step.
Step 2: Creating a private network in the vRack
Create a private network with a VLAN (virtual local area network) so that connected instances can communicate with each other.
With the Public Cloud service, you can create up to 4 000 VLANs within one vRack. This means that you can use each private IP address up to 4 000 times.
Thus, for example, 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42.
This is useful to segment your vRack across multiple virtual networks.
From the OVHcloud Control Panel and OVHcloud APIv6, you can customise all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g. 10.0.0.0/16), DHCP, and gateway.
Info
On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires to specify your VLAN ID directly at the infrastructure level.
Unlike dedicated servers, there is no need to tag a VLAN directly on a Public Cloud instance.
vRack is managed at the OVHcloud infrastructure level, meaning you can only administrate it in the OVHcloud Control Panel and the OVHcloud APIv6.
Because OpenStack is not located at the same level, you will not be able to customise VLANs through the Horizon interface or OpenStack APIs.
Via the OVHcloud Control Panel
Via the OVHcloud APIv6
Via Terraform
Via the OpenStack CLI
Via the ovhcloud CLI
Once your vRack is set up, create a private network.
In the Public Cloud tab, click on Private Network in the left-hand menu under Network.
Click on the button Add Private Network. The following page allows you to customise multiple settings.
Select a deployment mode and the region where you want to create the private network.
The next step presents several options:
In the Private Network Name field, set a name for your private network.
Layer 2 network option
If you tick the Set VLAN ID box, you will be able to manually choose a VLAN ID number between 0 and 4 000.
If you do not tick the box, the system will assign a random VLAN ID number to your private network.
If you want to be able to communicate with dedicated servers in this VLAN, please consult the guide: Creating multiple vLANs in a vRack.
DHCP address distribution options
The default DHCP range is 10.1.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network.
Network Gateway Options
Announce the first address of a given CIDR as the default gateway (DHCP option 3): When this option is enabled, the DHCP server advertises the first address in the CIDR as the default gateway to machines connected to the network.
If the second option is greyed out, it means the region selected does not support it. For more information, please refer to our regions availability page.
Once done, click on Configure your private network to start the process.
Info
Creating the private network may take several minutes.
ID of the instance type (example: D2-2, B2-7, WIN-R2-15, etc.).
imageId
ID of the image for the deployment (example: Debian 9, Centos 7, etc.).
name
Name for your instance.
networks
In the "networkId" section, indicate the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx_yy). You can click the "+" button to add more networks.
region
Region for your instance deployment (example: GRA5).
sshKeyId
ID of your OpenStack SSH key.
If all information is correct, the instance is created with one or more network interfaces.
Warning
Depending on operating systems, you will need to manually configure your private network interfaces to be considered.
Because OpenStack is unable to prioritise the public interface of the vRack interface, the vRack interface may sometimes pass as the default route.
The direct consequence is that the instance is unreachable from a public IP.
One or more reboots of the instance from the Control Panel can resolve this situation.
The other solution is to connect to the instance via another server in the same private network. You can also correct the network configuration of the instance through Rescue mode.
The following steps are necessary to create an instance directly in the vRack.
After a few moments you can check the list of existing instances to find the server you created:
openstack server list+--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+| ID | Name | Status | Networks | Image Name |+--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+| xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxxx | [Name of instance] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [Name-of-instance] |+--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+
nova list+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+| ID | Name | Status | Task State | Power State | Networks |+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+| xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [Name of instance] | ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] |+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+
Use the ovhcloud CLI to create an instance in your vRack. Set your cloud project with --cloud-project <project_id> or configure it in your profile.
Retrieve available networks
ovhcloud cloud network private list --region <region>
Remove the public network block if you want a private-only instance.
Tip
openstack_networking_network_v2.tf_network refers to the private network resource created in Step 2. If managing separately, replace with the network ID directly.
In case of an existing instance
The OVHcloud Control Panel lets you attach an instance to one or more private networks but does not offer advanced network interface configuration. To customise further, use the OVHcloud APIv6, the OpenStack APIs, or Horizon.
Add a new network interface to your server alongside the existing one.
For example, if you have a public interface eth0, you will add the interface eth1.
Warning
The configuration of this new interface is rarely automatic.
You will therefore need to set a static IP or configure DHCP, depending on your infrastructure.
Via the OVHcloud Control Panel
Via the OVHcloud APIv6
Via Horizon
Via the OpenStack CLI
In your Public Cloud project, click on Instances in the left-hand navigation bar and then on ⁝ to the right of the instance. Select Instance details.
This will open the instance dashboard. Click on the ⁝ button in the box "Networks", next to "Private networks", and select Attach a network.
In the popup window that appears, select the private network(s) to attach to your instance and click Confirm.
You cannot integrate an existing instance into the vRack from the OVHcloud Control Panel. You will need to use Horizon, the OpenStack API or the OVHcloud APIv6.
The required action is simply to add a new network interface to your server, in addition to the existing one.
For example, if you have a public interface eth0, you will add the interface eth1.
Warning
The configuration of this new interface is rarely automatic.
You will therefore need to set a static IP or configure DHCP, depending on your infrastructure.
The steps below explain how to manage your instance network interfaces.
To add an interface, click on the arrow in the Actions column to access the possible actions on the instance. Select Attach Interface.
Select your interface and confirm.
Info
Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-Net).
In the instance summary, you can see the private IP address that is automatically assigned to your interface.
It is your responsibility to correctly configure the interface through DHCP or by using the proper IP addresses through a static IP configuration.
Detaching a network private interface
Warning
Detaching a network interface is permanent.
However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs.
To detach a private interface, click on the arrow in the Actions column to access the possible actions on the instance. Select Detach Interface.
Select your interface and confirm.
The following steps are necessary to integrate an existing instance into the vRack.
Retrieving the required information
Identify your instances:
openstack server list+--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+| ID | Name | Status | Networks | Image Name |+--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | Ext-Net=xx.xx.xx.xx, 2001:41d0:yyyy:yyyy::yyyy; MyVrack=192.168.0.124 | Debian 9 |+--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+
or
nova list+--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+| ID | Name | Status | Task State | Power State | Networks |+--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | My-Instance | ACTIVE | - | Running | Ext-Net=xx.xx.xx.xx,2001:41d0:yyyy:yyyy::yyyy;MyVrack=192.168.0.124 |+--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+
You will need to note the network IDs of interest:
Ext-Net for a public IP address
The VLAN(s) required for your configuration
Adding a private network interface
To attach a new interface, run:
nova interface-attach --net-id <ID-VLAN> <ID-instance>
Example:
nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx
You can verify that the action has been performed:
nova show <ID-instance>+--------------------------------------+----------------------------------------------------------+| Property | Value |+--------------------------------------+----------------------------------------------------------+| Ext-Net network | xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx | => your public IP| MyVLAN-42 network | 192.168.0.x | => your private IP[...]
or
openstack server show <ID-instance>+--------------------------------------+-------------------------------------------------------------------------+| Field | Value |+--------------------------------------+-------------------------------------------------------------------------+[...]| addresses | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x | => your public IP ; your private IP[...]
Removing a network interface
Warning
Detaching a network interface is permanent.
However, it is important to note that if you detach the "Ext-Net" interface (public IP), this address will be released and put back into circulation. It is not possible to just reassign it.
This action is only required if you wish to isolate your server in the vRack (private network), or if you wish to remove it from one or more VLANs.
To detach an interface, first identify the Neutron port.
Use the following commands: