---
title: "Deploying the vNIOS Instances in an OpenStack Environment"
canonical: "https://docs.infoblox.com/space/vniosopstack/1097564184/Deploying%20the%20vNIOS%20Instances%20in%20an%20OpenStack%20Environment"
format: markdown
---
As prerequisites, ensure that you have specified the vNIOS flavors and provided unique names for the instances you want to deploy.

# Deploying a Standalone Instance

To deploy a standalone vNIOS instance in OpenStack, complete the following steps:

1. Sign in to the system as a root user.
2. Run the `openstack port create` command to create port IDs for the MGMT, LAN1 and HA network interfaces:  
`openstack port create --network <network_name> --vnic-type direct --fixed-ip subnet=<subnet> ip-address=<ip_address> <mgmt/lan1/ha/lan2_port_name>`  
Example:  
`openstack port create --network hostonly-ens3f0 --vnic-type direct --fixed-ip subnet=b07c0390-7029-4c05-a506-df0c86cd5fae ip-address=10.36.162.11 mgmt1_port`
  - For <port_name>, specify the port name according to the port you are creating.
  - For the vNIOS appliance to run in OpenStack, you must specify at least two networks, MGMT and LAN1.
  - If you need to create a LAN2 port, then you must create an HA port.
  - To set up high availability (HA) with vNIOS, you must specify three network interfaces, MGMT, LAN1, and HA on each node of the HA pair.
3. Run the `openstack port list` command to view the network and port IDs generated for all network interfaces. You can copy the port IDs from this output to the `openstack server create` command.
4. Deploy the instance using the `openstack server create` command as follows:
  - For Red Hat OpenStack Platform, use the command:  
`openstack server create <instance_name> --flavor <flavor_name> --image <image_name> --nic port-id=<mgmt_port_id> --nic port-id=<lan1_port_id> --nic port-id=<ha_port_id> --nic port-id=<lan2_port_id>`
  - For Ubuntu, use the command:  
`openstack server create <instance_name> --flavor <flavor_name> --image <image_name> --network <network_name_mgmt> --network <network_name_lan1> --network <network_name_ha> --network <network_name_lan2>`  
Note: If you are setting up HA, ensure that the LAN 1 and HA interfaces are in the same subnet.
    Parameter description:
    - `flavor` specifies the flavor of the vNIOS instance. For information about how to define flavors, see the *[Setting up the OpenStack Flavors for vNIOS](https://infoblox-docs.atlassian.net/wiki/spaces/vniosopstack/pages/1098055742)* section*.*
    - `image` defines the name of the image created in an earlier step. For information about supported vNIOS for OpenStack models, see *[vNIOS for OpenStack X6 Series](https://docs.infoblox.com/space/vniosspec/1488322601/vNIOS+for+OpenStack+X6+Series)* and *[vNIOS for OpenStack X5 Series](https://docs.infoblox.com/space/vniosspec/1488846894/vNIOS+for+OpenStack+X5+Series)*.
    - `nic port-id` specifies the port ID of an interface (MGMT, LAN1, LAN2, and/or HA).
    - `network` specifies the name of the network in which the port must reside.

The vNIOS instance automatically starts after the `openstack server create` command is run.

> ⚠️ **Note**
> ⚠️ 
> ⚠️ To remove networks, use the `openstack net-delete` command. If some of the networks remain, remove them manually from OpenStack Horizon.

# Deploying the vNIOS Instances in an HA Setup

Ensure that you meet the prerequisites before following the steps to deploy vNIOS for OpenStack in an HA environment.

## Prerequisites for vNIOS for OpenStack HA Deployments

- Before deploying OpenStack, please see the Red Hat documentation and make sure to follow all the recommendations such as for HA SRIOV environments, port security must be disabled for a successful operation when a NIC is configured as DPDK (instead of DIRECT).
- In an HA configuration, you must unblock the VRRP port 112 in your security group. This is applicable to both SRIOV and non-SRIOV environments.
- In HA deployments, port mapping communication must be allowed between all of the following:
  - Physical IP addresses
  - Physical IP address and NIC
  - Physical IP address and the virtual MAC address

The following is an example of adding the virtual MAC address as an additional address:

`openstack port set <port_name> --allowed-address ip-address=<physical IP address>,mac-address=00:00:5E:00:01:5A`

## Deploying vNIOS for OpenStack in an HA Environment

To deploy the vNIOS instances in an HA setup in OpenStack, complete the following steps:

1. Sign in to the system and export appropriate OpenStack credentials.
2. For each of the active and passive nodes, run the `openstack port create` command individually to create port IDs for the MGMT, LAN1 and HA network interfaces:
  `openstack port create --network <mgmt/lan1/ha_network_name_node1> --vnic-type direct --fixed-ip subnet=<subnet> ip-address=<ip_address> <mgmt/lan1/ha_port_name_node1>`
  `openstack port create --network <mgmt/lan1/ha_network_name_node2> --vnic-type direct --fixed-ip subnet=<subnet> ip-address=<ip_address> <mgmt/lan1/ha_port_name_node2>`
  - For <port_name>, specify the port name according to the port you are creating.
  - To deploy the vNIOS instance over RHOSP with SR-IOV enabled, specify `vnic-type` as `direct`.
3. Create a port for HA-VIP in the same subnet as that of LAN1 by using the command:  
`openstack port create --network <lan1_network_name> --vnic-type direct --fixed-ip subnet=<subnet> ip-address=<ip_address> <ha_vip_port_name>`
4. Run the `openstack port list` command to view the network and port IDs generated for all network interfaces. You can copy the port IDs from this output to the `openstack server create` command.
5. Deploy active and passive nodes by using the `openstack server create` command for each node:
  - For Red Hat OpenStack Platform, use the command:  
`openstack server create <instance_name> --flavor <flavor_name> --image <image_name> --nic port-id=<mgmt_port_id> --nic port-id=<lan1_port_id> --nic port-id=<ha_port_id>`
  - For Ubuntu, use the command:  
`openstack server create <instance_name> --flavor <flavor_name> --image <image_name> --network <network_name_mgmt> --network <network_name_lan1> --network <network_name_ha> --network <network_name_lan2>`
    Parameter description:
    - `flavor` specifies the flavors of the vNIOS for OpenStack instance. For information about how to define flavors, see the *[Setting up the OpenStack Flavors for vNIOS](https://infoblox-docs.atlassian.net/wiki/spaces/vniosopstack/pages/1098055742)* section*.*
    - `image` defines the name of the software package you downloaded. For information about supported vNIOS for OpenStack models, see *[vNIOS for OpenStack X6 Series](https://docs.infoblox.com/space/vniosspec/1488322601/vNIOS+for+OpenStack+X6+Series)* and *[vNIOS for OpenStack X5 Series](https://docs.infoblox.com/space/vniosspec/1488846894/vNIOS+for+OpenStack+X5+Series)*.
    - `nic port-id` specifies the port ID of the MGMT, LAN1, LAN2, or HA interface.
    - `network` specifies the name of the network in which the port must reside.  
  
The vNIOS for OpenStack instance automatically spins up after the command is run. You must set up the HA port of both nodes to form a bond with the HA interface. For instructions, see step 7 in the *[Configuring the vNIOS Instance](https://infoblox-docs.atlassian.net/wiki/spaces/vniosopstack/pages/1098055720)*.
6. Proceed to configure the instances as explained in the *[Configuring the vNIOS Instance](https://infoblox-docs.atlassian.net/wiki/spaces/vniosopstack/pages/1098055720)* topic.