---
title: "Configuring vRack for Public Cloud"
description: "The OVHcloud vRack is a private network solution that enables our customers to route traffic between OVHcloud dedicated servers as well as other OVHcloud servic"
url: https://docs.us.ovhcloud.com/en/public-cloud/network-services/configure-vrack
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Configuring vRack for Public Cloud

The OVHcloud [vRack](https://us.ovhcloud.com/network/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](https://us.ovhcloud.com/public-cloud/) to your private network to create an infrastructure of physical and virtual resources.

 

## Requirements

- A [Public Cloud project](https://us.ovhcloud.com/public-cloud/) in your OVHcloud account
- An [OpenStack user](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/create-and-delete-a-user.md) (optional)
- Basic networking knowledge

#### OVHcloud Control Panel Access

- **Direct link:** [Public Cloud projects](https://manager.us.ovhcloud.com/#/public-cloud/pci/projects/)
- **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 [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) is a fully visual interface, ideally suited for managing multiple VLANs. You can customize the private IP range, which will be 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](https://horizon.cloud.ovh.us/auth/login) 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 two VLANs, add private network interfaces to your instances, manage custom images, etc.
See our [Introducing Horizon](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/introducing-horizon.md) guide to familiarize yourself with the Horizon interface.

**Note:** Horizon functions are zone-specific; therefore, you need to remember to choose your logical (geographic) work zone at the top left of your interface (US-EAST-VA-1, US-WEST-OR, US-EAST-LZ-ATL, etc.).

### OVHcloud APIv6

Every action you take in your OVHcloud Control Panel can be called with the [OVHcloud APIv6](https://api.us.ovhcloud.com/). 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 customize your VLAN, add interfaces to your instances, or create highly customized servers.
You can simply access it from [our web page](https://api.us.ovhcloud.com/), but also use it to create your PHP or Python scripts.
This way, you can freely automate basic tasks with scripts, optimize your functions, and much more.
Some API calls require specific input - retrieve the necessary information beforehand.
See our [First steps with the OVHcloud API](https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps.md) guide to get started with the OVHcloud APIv6.

### OpenStack API

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 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:
- [Preparing an environment for using the OpenStack API](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-prepare-openstack-api-environment.md)
- [Setting OpenStack Environment Variables](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-set-openstack-environment-variables.md)

You will then be able to use the APIs dedicated to OpenStack as needed:
- Nova (compute)
- Glance (image)
- Cinder (image)
- Neutron (network)

**Note:** In some cases, it will be easier to use the OpenStack APIs, and in others, Nova, Neutron, etc.
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](https://docs.openstack.org/) 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.
Before you begin, see:
- [Preparing an environment for using the OpenStack API](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-prepare-openstack-api-environment.md)
- [Setting OpenStack Environment Variables](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-set-openstack-environment-variables.md)

**Note:** 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](https://docs.openstack.org/2026.1/).

### Terraform

Terraform can be used to manage OVHcloud infrastructures.
You need to select the correct Terraform provider and resource. Find more information in our [Using Terraform with OVHcloud](https://docs.us.ovhcloud.com/en/manage-and-operate/terraform/using-terraform-with-ovhcloud.md) guide.

### OVHcloud CLI

The [OVHcloud CLI](https://docs.us.ovhcloud.com/en/manage-and-operate/cli/getting-started-ovhcloud-cli.md) lets you manage Public Cloud resources from your terminal, including private networks and instance interfaces.
Before you begin, [install and configure the OVHcloud CLI](https://github.com/ovh/ovhcloud-cli#installation). Set your cloud project with `--cloud-project <project_id>` or configure it in your profile.

 

## Instructions

### Step 1: Activating and managing a vRack

**Warning:**

**NOTE:** 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.

#### OVHcloud Control Panel

**Note:** 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`.

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.
Click the `Order` button and choose the `vRack` tile. Once you have agreed to the Terms of Service and Privacy Policy, click `Order my vRack`.
Once delivered, click your new vRack, select the project you want to add to the vRack from the list of eligible services and click the `Add` button.

#### OVHcloud APIv6

#### Order a vRack service

Log in to the OVHcloud APIv6 (see [this guide](https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps.md) for more information) and follow these steps:
1. Create the cart.

   `POST /order/cart`

   **Note:**

   This call creates an ID for your shopping cart. You can add as many articles as you want before checking out.

   Ordering a vRack is free, but be sure to save your cart number (cartId), which will be needed later in the process.

2. Retrieve the necessary information for the vRack order.

   `GET /order/cart/{cartId}/vrack`

   **Note:**

   This call will retrieve all the information required to order the vRack. Copy the following:

   _cartId_, _duration_, _planCode_, and _pricingMode_.

3. Add the vRack to the cart.

   `POST /order/cart/{cartId}/vrack`

   **Note:**

   This call allows you to add the vRack to the cart by filling in the required information.

   For vRack:

   cartId: \[The ID copied from the first step]

   duration: "P1M

   planCode: "vrack"

   pricingMode: "default"

   quantity: 1

   Once you have added the vRack to the cart, you should receive an itemID. Copy this, it will be useful for making modifications before checking out.

4. Validate the cart.

   Once the items have been placed in the cart, you will need to check out:

   `POST /order/cart/{cartId}/checkout`

   **Note:**

   This call will check out the card and will generate a purchase order (orderID). Save this ID; it will be required to validate the order.

5. Validate the final order.

   To validate the order, choose from two methods:

   - Go to the URL provided when checking out.

   - Validate using the following API call:

     `POST /me/order/{orderId}/pay`

   **Note:**

   Even if it is a $0 purchase order, it is necessary to simulate a payment (orderId). Your order is then validated and processing will begin.

   Once the free order has been validated, it may take a few minutes for the vRack to be activated.
 
#### Add your Public Cloud project to the vRack

Once vRack is active, integrate your Public Cloud project(s) into it.
Log in to the OVHcloud APIv6 (see [this guide](https://docs.us.ovhcloud.com/en/manage-and-operate/api/first-steps.md) for more information).
1. Identify the project.

   `GET /cloud/project`

   **Note:**

   This call retrieves the list of projects.

   `GET /cloud/project/{serviceName}`

   **Note:**

   This call identifies the project by the "description" field.

2. Add the project to the vRack.

   Once the project ID and the vRack name are known, their association is made through the following call:

   `POST /vrack/{serviceName}/cloudProject`

   Fill in the fields with the information previously collected:

   **serviceName**: name of the vRack in the form "pn-xxxxxx".

   **project**: The Public Cloud project ID in the form of a 32-character string.

   **Note:**

   This call initializes the association of the project to the vRack. The task ID must then be retrieved to check the progress.

3. Check the progress of the task with this call:

   You can view the progress of the task with this call:

   `GET /vrack/{serviceName}/cloudProject/{project}`

   **Note:**

   This call only allows you to check the status of the task. Once the task is done, you can proceed to the following 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 can be useful to segment your vRack between multiple virtual networks.

From the OVHcloud Control Panel and OVHcloud APIv6, you can customize all settings: deployment mode and region, VLAN name and ID, private IP address range (e.g., 10.0.0.0/16), DHCP, and gateway.

**Note:**

On dedicated servers, you are using VLAN 0 by default. The OpenStack infrastructure requires you 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.

To learn more about this topic, please refer to our [Creating Multiple vLANs in a vRack](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/creating-multiple-vlans-vrack.md) guide.

**Warning:**

**NOTE:** 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 customize VLANs through the Horizon interface or OpenStack APIs.

#### OVHcloud Control Panel

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 `Add Private Network`. The following page allows you to customize multiple settings.
Select a deployment mode and the region where you want to create the private network, and then set a name for your network.
- **Layer 2 network options**

  If you tick the `Set a VLAN ID` box, you will need to 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.

  If you want to be able to communicate with dedicated servers in this VLAN, please consult our [Creating Multiple vLANs in a vRack](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/creating-multiple-vlans-vrack.md) guide.

- **DHCP address distribution options**

  The default DHCP range is 10.0.0.0/16. You can use a different private range of your choice, or disable DHCP for this private network.

  **Important:**

  **WARNING:** If you choose to disable DHCP, you **MUST ALSO** untick for "Announce the first address of a given CIDR. as the default gateway (DHCP option 3)" box. Otherwise, instances created with this private network attached will not be accessible on their public IP.

- **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 CIDE as the default gateway to machines connected to the network.

  **Assign a Gateway and connect to the private network:** Select this option if you intend to create instances with a private network only. For more information, please consult the following guides: [Creating a Private Network with a Gateway](https://docs.us.ovhcloud.com/en/public-cloud/network-services/create-private-network-gateway.md) and [Creating and Connecting a Public Cloud Instance](https://docs.us.ovhcloud.com/en/public-cloud/compute/getting-started.md).

  **Warning:**

  **NOTE:** If the option is grayed out, it means the region selected does not support it. For more information, please refer to our [availability by region](https://us.ovhcloud.com/public-cloud/regions-availability/) page.

  Once done, click on `Configure your private network` to start the process.

  **Note:**

  Creating the private network may take several minutes.

#### OVHcloud APIv6

Once logged into the [OVHcloud APIv6 interface](https://api.us.ovhcloud.com/), follow these steps:

#### Retrieve the required information

- Public Cloud Project

  `GET /cloud/project`

  **Note:**

  This call retrieves the list of projects.

  `GET /cloud/project/{serviceName}`

  **Note:**

  This call identifies the project via the "description" field.

- vRack

  `GET /endpoint`

  **Note:**

  In the **serviceName** field, enter your Project ID. Save the serviceName of the vRack in the form of “pn-xxxxx".

 
#### Create a private network

[POST /cloud/project/{serviceName}/network/private](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/network/private)

**Note:** Fill in the fields with the previously retrieved information:
**serviceName**: ID of the project
**name**: name of the VLAN.
You can leave the “Region” field empty to enable it for all regions.
The VLAN identifier (vlanId) is required to create a specific VLAN.

The creation will take a few minutes.
To check your VLAN information with the following API call:

[GET /cloud/project/{serviceName}/network/private](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#get-/cloud/project/-serviceName-/network/private)

**Note:** This call retrieves the **networkId** in this form: name-vrack\_vlanId.
For example, for VLAN 42 it would appear as: pn-xxxxxx\_42

 
#### Create a subnet

By default, if you do not specify a subnet, the IP range used is the following:
```
10.0.0.0/16
```
To manage the IP assignments yourself, create a subnet for each affected area using the following call:

[POST /cloud/project/{serviceName}/network/private/{networkId}/subnet](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/network/private/-networkId-/subnet)

You can fill out the fields according to the following:
| **Field**   | **Description**                                                                    |
| ----------- | ---------------------------------------------------------------------------------- |
| serviceName | ID of the project                                                                  |
| networkId   | Your network ID, retrieved with previous steps. Example: pn-xxxxxx\_42 for VLAN 42 |
| dhcp        | Check box for enabling / uncheck for disabling DHCP in the VLAN                    |
| end         | Last address of the subnet in this region. Example: 192.168.1.50                   |
| network     | Subnet IP block. Example: 192.168.1.0/24                                           |
| region      | Example: VIN1                                                                      |
| start       | First address of the subnet in this region. Example: 192.168.1.15                  |

**Note:** This is the step of creating the subnet by region. You can enable or disable private IP address assignment dynamically through DHCP.
You will have to do the same for each area where your instances are present.

**Warning:** **NOTE:** Be careful to separate your IP address pools for different regions. For example:
From 192.168.0.2 to 192.168.0.254 for VIN1
From 192.168.1.2 to 192.168.1.254 for HIL1

##### Terraform

In Terraform, you will need to use the OpenStack provider. Download a complete example Terraform script from [this repository](https://github.com/yomovh/tf-at-ovhcloud/tree/main/private_network).
The OVHcloud-specific part for vRack integration is the `value_specs` parameter.
```
resource "openstack_networking_network_v2" "tf_network" {
  name = "tf_network"
  admin_state_up = "true"
  value_specs = {
    "provider:network_type"    = "vrack"
    "provider:segmentation_id" = var.vlan_id
  }
}
resource "openstack_networking_subnet_v2" "tf_subnet"{
  name       = "tf_subnet"
  network_id = openstack_networking_network_v2.tf_network.id
  cidr       = "10.0.0.0/16"
  enable_dhcp       = true
}
```

##### OpenStack CLI

In the following example, we specify the `VLAN_ID` to which we want the network to be part through `--provider-network-type` and `--provider-segment`.
You can remove those parameters. In that case, an available `VLAN_ID` will be used.
```
openstack network create --provider-network-type vrack --provider-segment 42 OS_CLI_private_network
openstack subnet create --dhcp --network OS_CLI_private_network OS_CLI_subnet --subnet-range 10.0.0.0/16
```

##### OVHcloud CLI

Use the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) to create your private network. Set your cloud project with `--cloud-project <project_id>` or configure it in your profile.
**Create the private network**
```
ovhcloud cloud network private vrack create <region> \
  --cloud-project <project_id> \
  --name my-vrack-network \
  --vlan-id 42
```

**Tip:** The `--vlan-id` flag is optional. If omitted, an available VLAN ID is assigned automatically.

**Create a subnet**
```
ovhcloud cloud network private vrack subnet create <network_id> \
  --cloud-project <project_id> \
  --region <region> \
  --cidr 10.1.0.0/16 \
  --ip-version 4 \
  --enable-dhcp
```

 

### Step 3: Integrating an instance into vRack

There are two possible scenarios:

- The instance to be integrated does not exist yet.
- An existing instance needs to be added to the vRack.

#### In case of a new instance

##### OVHcloud Control Panel

For help, see [How to create a Public Cloud instance and connect to it](https://docs.us.ovhcloud.com/en/public-cloud/compute/getting-started.md). When creating an instance, choose a network mode, then a private network.

**Warning:** **NOTE:** 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.

##### OVHcloud APIv6

Once logged in to the [OVHcloud APIv6 interface](https://api.us.ovhcloud.com/), follow these steps:

#### Retrieve the required information

- Retrieve project ID:

  `GET /cloud/project`

- Retrieve the network ID of the public network (Ext-Net)

  `GET /cloud/project/{serviceName}/network/public`

- Retrieve the network ID of the private network (previously created vRack interface)

  `GET /cloud/project/{serviceName}/network/private`

  **Note:**

  The identifier will have the form: “pn-xxxxx\_yy” in which yy is the VLAN number.

- Retrieve the ID of the chosen instance type (flavorId)

  `GET /cloud/project/{serviceName}/flavor`

  **Note:**

  You can limit the list by specifying the creation region of your instance.

- Retrieve the ID of the chosen image (imageId)

  `GET /cloud/project/{serviceName}/image`

  **Note:**

  You can limit the list by specifying the creation region of your instance.

- Retrieve your OpenStack SSH key ID (sshKeyId)

  `GET /cloud/project/{serviceName}/sshkey`

  If you haven’t added an SSH key to your OVHcloud Control Panel yet, you can do so using the following call:

  `POST /cloud/project/{serviceName}/sshkey`
 
#### Deploy the instance

- Once you have gathered all the required information, you can use the following call:

  `POST /cloud/project/{serviceName}/instance`

  You will need to enter at least the following fields:

  | **Field**   | **Description**                                                                                                                                               |
  | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | serviceName | ID of the Public Cloud project                                                                                                                                |
  | flavorId    | ID of the instance type (example: B3-8, R3-32, L4-90)                                                                                                         |
  | imageId     | ID of the image for the deployment (example: Debian 12, Ubuntu 26.04)                                                                                         |
  | 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: VIN1)                                                                                                           |
  | sshKeyId    | ID of your OpenStack SSH key                                                                                                                                  |
If all information is correct, the instance is created with one or more network interfaces.

**Warning:** **NOTE:** Depending on operating systems, you will need to manually configure your private network interfaces for consideration.
Because OpenStack is unable to prioritize the public interface of the vRack interface, so the vRack interface may 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 client space can restore the situation.
The other solution is to connect to the SSH instance through another of your servers in the same private network. You can also correct the network configuration of the instance through Rescue mode.

##### OpenStack CLI

The following steps are necessary to create an instance directly in the vRack.

#### Retrieving the required information

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 |
+--------------------------------------+------------+------+
```

**Note:** 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 information in [this guide](https://docs.us.ovhcloud.com/en/public-cloud/compute/starting-with-nova.md):
- ID or name of the OpenStack SSH key.
- ID of the instance type (flavor).
- ID of the desired image (operating system, snapshot, etc.).
 
#### Deploying the instance

Using the previously retrieved information, create an instance 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] [instance name]
```
Example:
```
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] NameOfInstance

+--------------------------------------+------------------------------------------------------+
| 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                             | [Name of key]                                        |
| 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]
```
Example:
```
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] NameOfInstance

+--------------------------------------+------------------------------------------------------+
| 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                             | [Name of key]                                        |
| 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 `--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`
 
#### Verify the instance

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]|
+--------------------------------------+---------------------+--------+--------------------------------------------------+--------------------+
```
or
```
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] |
+--------------------------------------+--------------------+--------+------------+-------------+--------------------------------------------------+
```

##### OVHcloud CLI

Use the [OVHcloud CLI](https://github.com/ovh/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>
```
 
#### Create the instance

```
ovhcloud cloud instance create <region> \
  --name my-instance \
  --flavor <flavor_id> \
  --boot-from.image <image_id> \
  --ssh-key.name <key_name> \
  --network.private.id <network_id> \
  --network.public
```
Remove `--network.public` to create a private-only instance.

##### Terraform

Use the [OpenStack Terraform provider](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_instance_v2) to create an instance with vRack connectivity. This is consistent with the private network created in Step 2.
```
resource "openstack_compute_instance_v2" "instance" {
  name      = "my-instance"
  flavor_id = var.flavor_id
  image_id  = var.image_id
  key_pair  = var.key_pair

  network {
    uuid = var.ext_net_id
  }

  network {
    uuid = openstack_networking_network_v2.tf_network.id
  }
}
```
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 customize 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:**

**NOTE:** 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.

##### OVHcloud Control Panel

In your Public Cloud project, click on `Instances` in the left-hand navigation bar and then on the _more options_ `...` button to the right of the instance. Select `Instance details`.
This will open the instance dashboard. Click on the _more options_ `...` button in the **Networks** panel, next to "Private networks", and select `Attach a network`.
In the pop-up window that appears, select the private network(s) to attach to your instance and click `Confirm`.

##### OVHcloud APIv6

#### Retrieve the required information

- Retrieve the project ID:

  `GET /cloud/project`

- Retrieve the instance ID:

  `GET /cloud/project/{serviceName}/instance`

- Retrieve the public network ID (Ext-Net):

  `GET /cloud/project/{serviceName}/network/public`

- Retrieve the network ID from the private network (previously created vRack interface):

  `GET /cloud/project/{serviceName}/network/private`

  **Note:**

  The identifier will have the form: “pn-xxxxx\_yy” in which yy is the VLAN number.

 
#### Add an interface to your instance

Once all the necessary information is retrieved, you can use the following call:

[POST /cloud/project/{serviceName}/instance/{instanceId}/interface](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#post-/cloud/project/-serviceName-/instance/-instanceId-/interface)

Fill in the following fields:
| **Field**   | **Description**                                                            |
| ----------- | -------------------------------------------------------------------------- |
| serviceName | ID of the Public Cloud project                                             |
| instanceId  | ID of the instance                                                         |
| networkId   | Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxxx\_yy) |
| ip          | Define a specific IP (only works for private interfaces)                   |
If all information is correct, a new interface is added to your instance.

**Note:** 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.

 
#### Removing an interface from your instance

**Warning:** **NOTE:** Detaching a network interface is permanent.
However, if you detach the “Ext-Net” interface (public IP), this address will be released and put back into circulation; it cannot be reassigned.
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.

Once all the necessary information is retrieved, you can use the following call to remove an interface:

[DELETE /cloud/project/{serviceName}/instance/{instanceId}/interface/{interfaceId}](https://api.us.ovhcloud.com/console/?section=/cloud&branch=v1#delete-/cloud/project/-serviceName-/instance/-instanceId-/interface/-interfaceId-)

Fill in at least the following fields:
| **Field**   | **Description**                                                           |
| ----------- | ------------------------------------------------------------------------- |
| serviceName | ID of the Public Cloud project                                            |
| instanceId  | ID of the instance                                                        |
| networkId   | Enter the public network identifier (Ext-Net) or your VLAN (pn-xxxxx\_yy) |

##### Horizon

Log in to the [Horizon interface](https://horizon.cloud.ovh.us/auth/login) as mentioned [above](#interfaces).
Choose the proper work zone.

 
#### Adding a private interface

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.

**Note:** 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:** **NOTE:** Detaching a network interface is permanent.
However, if you detach the “Ext-Net” interface (public IP), this address will be released and put back into circulation; it cannot be reassigned.
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 delete an 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.

##### OpenStack CLI

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   |
+--------------------------------------+--------------+--------+------------------------------------------------------------------------+------------+
```
List the available 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|
+--------------------------------------+------------+-------------------------------------+
```
You will need to note the network IDs of interest:
- `Ext-Net` for a public IP address
- The VLAN(s) required for your configuration
 
#### **Add a private interface**

To attach a new interface, execute the following command:
```
openstack server add network <instance_id> <network_id>
```
Verify the new interface:
```
openstack server show <instance_id>
+--------------------------------------+-------------------------------------------------------------------------+
| Field                                | Value                                                                   |
+--------------------------------------+-------------------------------------------------------------------------+
[...]
| addresses                            | Ext-Net=xx.xx.xx.xx, 2001:41d0:xxx:xxxx::xxxx ; MyVLAN-42=192.168.0.x  |
[...]
```
 
#### **Removing a private interface**

**Warning:** **NOTE:** Detaching a network interface is permanent.
However, if you detach the “Ext-Net” interface (public IP), this address will be released and put back into circulation; it cannot be reassigned.
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, you will first need to identify the port attached to your instance:
You can do this by using the following commands:
```
openstack port list --server <instance_id>
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+
| 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'   |
+--------------------------------------+------+-------------------+-------------------------------------------------------------------------------------------+
```
Once you have identified the port, detach it:
```
openstack server remove port <instance_id> <port_id>
```
Example:
```
openstack server remove port 12345678-90ab-cdef-xxxx-xxxxxxxxxxxx 12345678-abcd-ef01-2345-678910abcdef
```

##### OVHcloud CLI

Use the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) to manage network interfaces on an existing instance. Set your cloud project with `--cloud-project <project_id>` or configure it in your profile.
**List existing interfaces**
```
ovhcloud cloud instance interface list <instance_id> --cloud-project <project_id>
```
**Attach a private network interface**
```
ovhcloud cloud instance interface create <instance_id> <network_id> --cloud-project <project_id>
```
To assign a specific IP address:
```
ovhcloud cloud instance interface create <instance_id> <network_id> <ip_address> --cloud-project <project_id>
```
**Detach an interface**
```
ovhcloud cloud instance interface delete <instance_id> <interface_id> --cloud-project <project_id>
```

 

## Go further

- [Configuring the vRack between the Public Cloud and a Dedicated Server](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/configuring-the-vrack-between-the-public-cloud-and-a-dedicated-server.md)
- [Creating multiple VLANs in a vRack](https://docs.us.ovhcloud.com/en/bare-metal-cloud/dedicated-servers/creating-multiple-vlans-vrack.md)

Browse all the [Networking guides](https://docs.us.ovhcloud.com/en/public-cloud/network-services/landing-page-network-services.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Public Cloud Network](https://us.ovhcloud.com/public-cloud/network/) on the OVHcloud US website.
