Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Creating an Image Flavor with OpenStack

 

Before you begin, ensure that you have a working OpenStack installation. See the OpenStack Installation Guide for more details.

OpenStack launches instances of images, based on the image installed and VM templates called flavors. Flavors set the memory, vCPU, and storage requirements for the vSRX image. You can use the Horizon GUI or the OpenStack nova commands to create flavors for the vSRX VMs. See Requirements for vSRX on Contrail for the software requirement specifications for a vSRX VM.

Caution

The packet forwarding engine (PFE) on the vSRX might become unresponsive if the NUMA nodes topology properties in OpenStack includes the line hw:numa_nodes=2 to spread the instance’s vCPUs across multiple host NUMA nodes. We recommend that you remove the hw:numa_nodes=2 line from OpenStack to ensure that the PFE functions properly.

Creating an Image Flavor for vSRX with Horizon

OpenStack uses VM templates, or flavors, to set the memory, vCPU, and storage requirements for an image. OpenStack includes a default set of flavors, but we recommend that you create a flavor to match the vSRX image requirements.

To create an image flavor for vSRX with Horizon:

  1. From the Horizon GUI, select your project, and select Admin>System Panel>Flavors. The list of existing image flavors appears, as shown in Figure 1.
    Figure 1: OpenStack Flavors
    OpenStack Flavors
  2. Click Create Flavor. The Create Flavor dialog box appears, as shown in Figure 2.
    Figure 2: Create a Flavor
    Create a Flavor
  3. Enter a name in the Name box for this vSRX flavor.
  4. Enter the appropriate value in the vCPUs box for your configuration. The minimum required for vSRX is 2 vCPUs.
  5. Enter the appropriate value in the RAM MB box. The minimum required for vSRX is 4096 MB.
  6. Enter the appropriate value in the Root Disk GB box. The minimum required for vSRX is 20 GB.
  7. Enter the appropriate values in the Emphemeral Disk GB and Swap Disk MB boxes. The minimum required for vSRX is 0 for each.
  8. Click Create Flavor. The flavor appears on the Flavors tab.

Creating an Image Flavor for vSRX with the Nova CLI

To create an image flavor for vSRX with the nova CLI command:

  1. Use the nova flavor-create command on the OpenStack compute node that will host the vSRX VM. See Table 1 for a list of mandatory parameters. Note

    See the official OpenStack documentation for a complete description of available options for the nova flavor-create command.

    Table 1: nova flavor-create Command

    Command Option

    Description

    --is-public true

    Set the flavor as publicly available.

    flavor_name

    Name the vSRX flavor.

    auto

    Select auto to automatically assign the flavor ID.

    ram_megabytes

    Allocate RAM for the VM, in megabytes.

    disk_gigabytes

    Specify disk storage size for the VM.

    vcpus

    Allocate the number of vCPUs for the vSRX VM.

    Note

    Use nova help flavor-create for more details on the command options.

  2. Optionally, use the nova flavor-list to verify the flavors.

The following example creates a vSRX flavor with 4096 MB RAM, 2 vCPUs, and disk storage up to 20 GB:

$ nova flavor-create --is-public true vsrx_flavor auto 4096 20 2