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.
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:
- 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.
- Click Create Flavor. The Create Flavor dialog box appears, as shown in Figure 2.
- Enter a name in the Name box for this vSRX flavor.
- Enter the appropriate value in the vCPUs box for your configuration. The minimum required for vSRX is 2 vCPUs.
- Enter the appropriate value in the RAM MB box. The minimum required for vSRX is 4096 MB.
- Enter the appropriate value in the Root Disk GB box. The minimum required for vSRX is 20 GB.
- Enter the appropriate values in the Emphemeral Disk GB and Swap Disk MB boxes. The minimum required for vSRX is 0 for each.
- 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:
- 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.
See the official OpenStack documentation for a complete description of available options for the nova flavor-create command.
Table 1: nova flavor-create Command
Set the flavor as publicly available.
Name the vSRX flavor.
Select auto to automatically assign the flavor ID.
Allocate RAM for the VM, in megabytes.
Specify disk storage size for the VM.
Allocate the number of vCPUs for the vSRX VM.
Use nova help flavor-create for more details on the command options.
- 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