Configuring vRack on the Public Cloud
Find out how to configure the vRack on the Public Cloud
Find out how to configure the vRack on the Public Cloud
Last updated 21st December 2021
The vRack is a private network that allows you to configure addressing between multiple compatible OVHcloud services. It also 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.
Creating a vRack or adding an instance into the network can be done using the OVHcloud Control Panel, the OVHcloud APIv6, the OpenStack API, or the Horizon interface.
Depending on your technical profile and needs, it is mostly up to you which interface or method to use. For each option, the guide instructions below describe the necessary steps.
To begin with, the following provides a brief description of the possible actions according to the chosen method/interface.
The OVHcloud Control Panel is a completely visual interface, making it an ideal interface if you have only one VLAN to manage. You will not be able to customise the private IP range, which will be in 10.x.x.x/16.
The VLAN will be deployed by default to all zones. You will only have the option of activating the gateways or not.
You can also manage billing for your services through your OVHcloud Control Panel.
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 multifunctional, technical interface allows you to manage almost all OpenStack actions. It is one of the necessary interfaces if you need to manage more than two VLANS, add private network interfaces to your instances, manage custom images, etc.
Consult the following guide to familiarize yourself with Horizon.
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.).
Every action you take in your OVHcloud Control Panel can be called with the OVHcloud API. 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 simply 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, optimize your own functions and much more.
You may need to retrieve various information before using some API calls because a specific input is required.
See the guide First Steps with OVHcloud APIs to get started with the OVHcloud APIv6.
It is possible to manage Public Cloud Services 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 latest addition to the family, the Openstack client, allows you to manage almost all Openstack layers directly.
With the OpenStack API, you can also easily automate this management through your scripts.
To get familiar with the OpenStack API, please consult these guides:
You will then be able to use the APIs dedicated to OpenStack, depending on your needs:
In some cases, it will be easier to use the OpenStack APIs and in others, Nova APIs, Neutron APIs, etc.
Moreover, some features may be missing from the OpenStack API depending on the version of your client and operating system. For the purpose of making this guide more accessible, it presents the simplest and most intuitive options. You can consult the OpenStack official documentation at any time if you wish to go further in learning about its use.
Using the vRack itself is free of charge and it can be delivered within a few minutes. However, it requires the creation and validation of an order form first.
Once the vRack is activated, you will find this service under the name "pn-xxxxxx".
Log in to your OVHcloud Control Panel and open your Public Cloud
project.
Click on Private Network
in the left side menu.
Click the To get started, create a vRack
button. You will then have to choose to create a new vRack or to use an existing vRack. In our example, we will create a new vRack. Once you have made your choice, click Create
.
To continue configuring the vRack from the OVHcloud Control Panel, skip to the section Create a VLAN from the OVHcloud Control Panel of this guide.
To enable and manage a vRack from the OVHcloud APIv6, please refer to this section of the corresponding guide.
It is necessary to create a VLAN (or virtual local area network) so that the vRack instances can communicate with each other.
On the Public Cloud, you can create up to 4,000 VLANs within a single vRack. This means that you can use each private IP address up to 4,000 times. Thus, for example, IP 192.168.0.10 of VLAN 2 is different from IP 192.168.0.10 of VLAN 42.
This can be useful for segmenting your vRack between multiple virtual networks.
From the OVHcloud Control Panel, you can assign the VLAN of your choice, but you won't be able to customize the IP range. The vRack will be active in all zones.
From the OVHcloud API, you can customize all settings: IP range (e.g. 10.0.0.0/16), deployment zone, DHCP, Gateway, etc.
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.
For more information about vRack VLAN management for dedicated servers, see this guide: Creating multiple vLANs in a vRack.
Because vRack is managed at the OVHcloud infrastructure level, you can only administer it through the OVHcloud Control Panel and the OVHcloud API.
Since OpenStack is not located at the same level of the infrastructure, you will not be able to customize VLANs through the Horizon interface or the OpenStack APIs.
Once the vRack is created, navigate to the Private Network
section.
Click on the button Add Private Network
. The following page allows you to customise multiple settings.
If you select the Set a VLAN ID
option, you will need to choose a VLAN ID number between 2 and 4,000.
If you have not ticked the box Set a VLAN ID
, VLAN 0 will be set automatically.
In case you need to be able to communicate with dedicated servers in this VLAN, please consult the guide Create multiple vLANs in a vRack.
The default DHCP range is 10.0.0.0/16. To change this IP range, you must use the OVHcloud API.
In the next step, choose the regions you want, enter a name for your private network, and then click Create
to start the process.
Creating the private network can take several minutes.
To create a VLAN from the OVHcloud APIv6, click here to view the specific guide.
There are two possible scenarios:
If you need assistance, follow this guide first: Creating your first Public Cloud instance. When creating an instance, you can specify, in Step 4, a private network to integrate your instance into. Choose your previously created vRack from the drop-down menu.
You will be able to connect your instance to only one vRack from the OVHcloud Control Panel. To add multiple interfaces, you will need to go through the OpenStack or Horizon APIs.
Please refer to this section of the corresponding guide.
To use the OpenStack APIs, if you have not already done so, consider preparing your work environment as indicated in the first part of this guide.
The following steps are necessary to create an instance directly in the vRack.
Identifying public and private networks:
openstack network list
+--------------------------------------+------------+-------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+------------+-------------------------------------+
| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx|
| 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx|
| 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx|
+--------------------------------------+------------+-------------------------------------+
or
nova net-list
+--------------------------------------+------------+------+
| ID | Label | CIDR |
+--------------------------------------+------------+------+
| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None |
| 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None |
| 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVLAN_0 | None |
+--------------------------------------+------------+------+
You will need to note the network IDs of interest:
- Ext-Net for a public IP address
- The VLAN(s) required for your configuration
Also, note the following information, as indicated in the Nova API User's Guide:
With the previously obtained information, an instance can be created by including it directly in the vRack:
nova boot --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [name-of-instance]
Ex :
nova boot --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_vLan] name_of_instance
+--------------------------------------+------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | xxxxxxxxxxxx |
| config_drive | |
| created | YYYY-MM-DDTHH:MM:SSZ |
| flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) |
| hostId | |
| id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) |
| key_name | [Key Name] |
| metadata | {} |
| name | [Name of instance] |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz |
| updated | YYYY-MM-DDTHH:MM:SSZ |
| user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz |
+--------------------------------------+------------------------------------------------------+
or
openstack server create --key-name SSHKEY --flavor [ID-flavor] --image [ID-Image] --nic net-id=[ID-Network 1] --nic net-id=[ID-Network 2] [instance_name]
Ex :
openstack server create --key-name my-ssh-key --flavor xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx --image yyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy --nic net-id=[id_Ext-Net] --nic net-id=[id_vLan] instance_name
+--------------------------------------+------------------------------------------------------+
| Property | Value |
+--------------------------------------+------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| adminPass | xxxxxxxxxxxx |
| config_drive | |
| created | YYYY-MM-DDTHH:MM:SSZ |
| flavor | [Flavor Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) |
| hostId | |
| id | xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
| image | [Image Type] (xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) |
| key_name | [Key name] |
| metadata | {} |
| name | [Name of instance] |
| os-extended-volumes:volumes_attached | [] |
| progress | 0 |
| security_groups | default |
| status | BUILD |
| tenant_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz |
| updated | YYYY-MM-DDTHH:MM:SSZ |
| user_id | zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz |
+--------------------------------------+------------------------------------------------------+
You can set the IP address of the instance of your vRack interface at the OpenStack level.
To do this, you can add a single argument to the function "--nic":
--nic net-id=[ID-Network],v4-fixed-ip=[IP_static_vRack]
Example:
—nic net-id=[ID-vRack],v4-fixed-ip=192.168.0.42
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 | [instance_name] | ACTIVE | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] | [instance_name]|
+--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+
nova list
+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+
| xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | [instance_name]| ACTIVE | - | Running | Ext-Net=[IP_V4], [IP_V6]; MyVrack=[IP_V4_vRack] |
+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+
The OVHcloud Control Panel allows you to attach an instance to one or more private networks but does not provide advanced configuration of network interfaces. If you want to further customize these, you will need to manage them either through the OVHcloud APIv6, through the OpenStack APIs or via Horizon.
The action will be to simply 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.
The configuration of this new interface is rarely automatic. You will need to configure it in DHCP or a static IP depending on your infrastructure.
Log in to your OVHcloud Control Panel, go to the Public Cloud
section and select the relevant Public Cloud project in the top left.
Click on Instances
in the left side menu and then on ...
to the right of the instance concerned. Select Instance details
.
The dashboard of your instance is presented to you. Click on the ...
button to the right of "Private networks" and then on Attach a network
.
In the popup window that appears, select the private network(s) to attach to your instance and click Attach
.
Please refer to this section of the corresponding guide.
Log in to the Horizon interface using the method specified in the first part of this guide.
Select your region:
Select Compute
and then Instances
from the menu.
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.
Your OVHcloud instance will have a new network interface in addition to the public interface (Ext-net).
You can see in the instance summary the private IP address 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.
Removing an interface is permanent.
If you remove 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 necessary if you want to isolate your server in the vRack (Ext-Net interface) or remove it from a VLAN.
To remove an interface, click on the arrow in the "Actions" column to access the possible actions on the instance. Select Detach Interface
.
Select the interface you want to remove and confirm:
To use the OpenStack APIs, if you have not already done so, consider preparing your working environment as indicated in the first part of this guide.
The following steps are necessary to integrate an existing instance into the vRack.
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 |
+--------------------------------------+--------------+--------+------------+-------------+----------------------------------------------------------------------+
Identifying public and private networks:
openstack network list
+--------------------------------------+------------+-------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+------------+-------------------------------------+
| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | xxxxxxxx-yyyy-xxxx-yyyy-xxxxxxxxxxxx|
| 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | zzzzzzzz-yyyy-xxxx-yyyy-xxxxxxxxxxxx|
| 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVlan-0 | yyyyyyyy-xxxx-xxxx-yyyy-xxxxxxxxxxxx|
+--------------------------------------+------------+-------------------------------------+
or
nova net-list
+--------------------------------------+------------+------+
| ID | Label | CIDR |
+--------------------------------------+------------+------+
| 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx | MyVLAN-42 | None |
| 34567890-12ab-cdef-xxxx-xxxxxxxxxxxx | Ext-Net | None |
| 67890123-4abc-ef12-xxxx-xxxxxxxxxxxx | MyVlan-0 | None |
+--------------------------------------+------------+------+
You will need to note the network IDs of interest:
- Ext-Net for a public IP address
- The VLAN(s) required for your configuration
To attach a new interface, execute the following command:
nova interface-attach --net-id <VLAN-ID> <ID-instance>
For example:
nova interface-attach --net-id 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx
You can verify that the action has been taken into account:
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 an interface is permanent.
If you delete 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 necessary if you want to isolate your server in the vRack (Ext-Net interface) or remove it from a VLAN.
In order to detach an interface, you will first need to identify the Neutron port that has been created.
To do this, you can use the following commands:
neutron port-list
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+
| id | name | mac_address | fixed_ips |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+
| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | {"subnet_id": "01234567-8901-abscdef12345678910abcd", "ip_address": "192.168.0.x"} |
| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | {"subnet_id": "65432109-abcd-ef09-8765-43210abcdef1", "ip_address": "2001:41d0:xxx:xxxx::xxxx"} |
| | | | {"subnet_id": "abcdef12-3456-7890-abcd-ef1234567890", "ip_address": "YY.YY.YY.YY"} |
+--------------------------------------+------+-------------------+---------------------------------------------------------------------------------------------------+
or
openstack port list
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+
| ID | Name | MAC Address | Fixed IP Addresses |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+
| 12345678-abcd-ef01-2345-678910abcdef | | fa:xx:xx:xx:xx:xx | ip_address='192.168.0.xx', subnet_id='301234567-8901-abscdef12345678910abcd' |
| 09876543-210a-bcde-f098-76543210abcd | | fa:yy:yy:yy:yy:yy | ip_address='2001:41d0:xxx:xxxx::xxxx', subnet_id='65432109-abcd-ef09-8765-43210abcdef1' |
| | | | ip_address='YY.YY.YY.YY', subnet_id='abcdef12-3456-7890-abcd-ef1234567890' |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+
Once you have identified the port to remove, you can execute the following command:
nova interface-detach <ID_instance> <port_id>
For example:
nova interface-detach 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef
Configuring vRack for Public Cloud using OVHcloud APIv6
Creating multiple vLANs in a vRack
Join our community of users on https://community.ovh.com/en/.
Please feel free to give any suggestions in order to improve this documentation.
Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.
Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.
Thank you. Your feedback has been received.
Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.
Discuss with the OVHcloud community