How to: Increase memory (RAM), or CPU allocation in a VIRL image



    This document explains how to override the VM image, memory allocation, and CPU allocation used when simulating a node in VIRL PE.


    When you launch a topology simulation, the nodes will generally be simulated as virtual machines (VMs).  VIRL PE uses default versions of the various operating systems, such as IOSv, and allocates a specific amount of memory and CPU to each VM.  Each VM image requires a minimum memory and CPU allocation to function properly, and VIRL PE will use those minimum values by default.  In some cases, you may need to allocate more memory or CPU to a node.  For example, an NX-OSv 9000 node will run with a 4 GB memory and 1 vCPU allocation, but some features will be disabled or limited.  To enable full functionality of all features, the NX-OSv 9000 node may need 8+ GB of memory  and 2+ vCPUs.   To see how to override the default VM image, memory, and CPU, let's first look at how the default values are specified in VIRL PE.


    Each node in your topology has three associated properties:

    • subtype
    • VM image
    • VM flavor


    You can see these settings in the Node tab of the Properties view of VM Maestro when you select a node:



    The subtype roughly specifies the type of the node.  The subtype often indicates a specific type of operating system for the node, and it may imply the node's role in the topology.  Node subtypes include IOSv, IOSvL2, ASAv, and server.  The items in Nodes drawer in VM Maestro's Topology Palette represent nodes with a specific subtype.



    VM image

    VM image is a particular version of a particular operating system.  For example, IOSv 15.6(3)M and IOSv 15.6(2)T and ASAv 9.7(1) are different virtual machine images.  Both IOSv images would be used with nodes that have subtype IOSv, and the ASAv 9.7(1) image would be used with a node that has subtype ASAv.


    VM flavor

    When VIRL PE starts a simulation, each node in your topology generally runs as a separate virtual machine (VM).  The VM flavor is a bundle of properties that are used to configure the virtual machine for a node.  The flavor specifies the amount of memory, number of CPU cores, and the maximum size of disk for the virtual machine.  The disk size may and should be specified as 0, in which case the image size is not checked against the flavor when the VM is started, avoiding a hard-to-pinpoint failure to start the node.


    Launching a topology simulation

    When creating a topology, you usually only need to specify the node subtype.  The VM Image and VM Flavor properties are normally optional.  Since each node in the VM Maestro Topology Palette adds a node with a specific subtype to the topology, most of the time you'll simply drop a node on the topology editor and connect it to other nodes in the topology.


    When you launch a topology simulation, the VIRL server will start a virtual machine for each node in your topology*.  To determine the VM Image to use for the node's VM, the VIRL server looks for a VM Image whose name is the same as the node's subtype.  Similarly, the VIRL server uses the VM flavor with a name that matches the node's subtype.  Therefore, the default VM image for a node with subtype IOSv is the VM image with the name IOSv, and the virtual machine for that node will be configured using the settings in the VM flavor with the name IOSv.


    * = unless the node in the topology is a container, like an LXC, or a non VM-type, like a FLAT connector node or an unmanaged switch.


    Overriding VM Image, Memory, and CPU


    Overriding the VM image


    If you wish to override the default VM image for a node, you may select that node in VM Maestro, click the Browse... button for the VM Image field in the Node tab of Properties view for that node, and select an alternate VM image.  Be sure to select a VM image that is appropriate for the node's subtype.  That custom image will be used for that specific node in the topology simulation.  For example, the default IOSv image in VIRL PE 1.5.145 is IOSv 15.6(3)M.  If you have added the IOSv 15.5(2)T image to your VIRL server as image iosv-15.5.2, you could select the iosv-15.5.2 VM Image for a specific IOSv node in your topology.  When you launch a simulation of that topology, that node will be simulated as a virtual machine running IOSv 5.5(2)T instead of the default IOSv 15.6(3)M.


    VIRL PE comes with a default list of VM images with a matching subtype, such as IOSv, IOSvL2, ASAv, and server.  You may download alternate versions of IOSv and most of the other bundled operating systems.  Go to your CLN Store account,, and click on the Download VIRL button associated with your purchase of VIRL PE.  The download site offers alternate versions of some of IOSv, ASAv, CSR1000v, etc.


    If you'd like to add your own custom VM image to VIRL PE, see3rd Party VMs in VIRL or Cisco #VIRL: How to work with third-party custom VMs in VIRL - YouTube.


    Overriding the memory or CPU


    If you want to override the default memory or CPU allocation for a particular node, you may specify an alternate VM Flavor for that node.

    • In VM Maestro, select that node.
    • In the Node tab of the Properties view, click the Browse... button next to the VM Flavor field.
    • Select the flavor with the memory and CPU (and disk size) value that you want to use.
    • Note: you may need to create a custom flavor first with the values that you want to use.  See below for instructions on creating a new flavor.


    If you want to override the default memory or CPU allocation for all nodes of a particular subtype, then you'll need to replace the default flavor that's associated with that subtype.  For example, let's say that you would like all NX-OSv 9000 VMs in your router simulations to use 8 GB of RAM and 2 vCPUs.

    • First, you need to delete the existing default flavor associated with the subtype.
      • Open the VIRL PE server's UWM web app in a web browser.
      • Login as the uwmadmin user.
      • Select Node Resources > Flavors in the navigation menu.
      • Find the flavor whose name matches the subtype that you'd like to replace, in this example, NX-OSv 9000.
      • Click the Delete button for that flavor.
      • Confirm that you want to delete the flavor on the Delete Flavor page.
    • Next, you'll need to create a new flavor with the same name as the one you deleted.  See below for instructions on creating a new flavor.  In this example, you'd use these values:
      • Name: NX-OSv 9000
      • RAM (MB): 8192
      • Virtual CPUs: 2
      • Disk (GB): 0
    • After you have replaced the default flavor, your VIRL PE server will use the new flavor's values for nodes with the associated subtype when launching new simulations.


    Creating a new flavor


    • Open the VIRL PE server's UWM web app in a web browser.
    • Login as the uwmadmin user.
    • Select Node Resources > Flavors in the navigation menu.
    • Click the Add button.
    • Specify the new subtype name and properties.
    • Click the Create button.