VM Lifecycle Management Commands

vm_lifecycle flavors

To create a flavor, use the vm_lifecycle flavors command in global configuration mode. To remove a flavor, use the no form of the command.

vm_lifecycle flavors flavor flavor-name vcpus vcpus memory_mb memory_mb root_disk_mb root_disk_mb ephemeral_disk_mb ephemeral_disk_mb [ swap_disk_mb swap_disk_mb]

no vm_lifecycle flavors flavor

Syntax Description

flavor flavor-name

Specifies the flavor name.

vcpus vcpus

Specifies the number of vCPUs.

memory_mb memory_mb

Specifies the memory size in megabytes.

root_disk_mb root_disk_mb

Specifies the virtual root disk size in megabytes.

ephemeral_disk_mb ephemeral_disk_mb

Specifies the size of a secondary ephemeral data disk.

swap_disk_mb swap_disk_mb

(Optional) Specifies the size of swap space allocation.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

When deploying or modifying a VM, you can specify a flavor in active state.

To verify that the VM flavor is created, use the following commands in privileged EXEC mode:

show running-config vm_lifecycle flavors [ flavor flavor-name]

show vm_lifecycle opdata flavors [ flavor flavor-name]

Examples


nfvis(config)# vm_lifecycle flavors flavor my_small vcpus 2 memory_mb 4096 root_disk_mb 8192 ephemeral_disk_mb 0 
swap_disk_mb 0
nfvis(config-flavor-my_small)# commit

vm_lifecycle images

To register a VM image, use the vm_lifecycle images command in global configuration mode. To remove the VM registration, use the no form of the command.

vm_lifecycle images image image-name src file-path [ properties property property-name value value]

no vm_lifecycle images image image-name

Syntax Description

image image-name

Specifies the image name.

src file-path

Specifies the location of the image.

property property-name

Specifies the name of the property to replace the corresponding value inside the tar.gz while registering the image. For detailed information about all supported properties, see the Usage Guidelines section.

value value

Specifies the property value to be replaced inside the tar.gz.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

A VM image registration is done only once per VM image. You can perform multiple VM deployments using the registered VM image.

The following table provides information about the resources supported or required for the VM operation.

Table 1. VM Image Properties

Property

Description

vnf_type

Specifies the VM functionality.

Possible values are router, firewall, Windows, Linux, and custom_type. Router and firewall are predefined types.

name

Specifies the name associated with the VM packaging. This name is referenced for VM deployment.

version

Specifies the version of the package.

bootup_time

Specifies the bootup time of the VNF before it can be reachable through ping. You can specify any value in seconds. Specify value of -1 to not monitor the VM.

root_file_disk_bus

Specifies the root image disk bus. Valid values are virtio, scsi, and ide.

disk_x_file_disk_bus

Specifies the disk bus for additional disk image. The VM package supports up to 10 disks to be bundled into the package such as disk_1_file_disk_bus, disk_2_file_disk_bus, and disk_10_file_disk_bus. Valid values are virtio, scsi, and ide.

root_image_disk_format

Specifies the root image disk format. Valid values are qcow2 and raw.

disk_x_image_format

Specifies the image format for additional disk image. The VM package supports up to 10 disks to be bundled into the package such as disk_1_image_format, disk_2_image_format, and disk_10_image_format. Valid values are qcow2 and raw.

console_type_serial

Enables the serial console. Valid values are true and false.

vcpu_min

Specifies the minimum vCPUs required for a VM operation.

vcpu_max

Specifies the maximum vCPUs supported by a VM.

memory_mb_min

Specifies the minimum memory in MB required for VM operation.

memory_mb_max

Specifies the maximum memory in MB supported by a VM.

root_disk_gb_min

Specifies the minimum disk size in GB required for VM operation.

root_disk_gb_max

Specifies the maximum disk size in GB supported by a VM.

vnic_max

Specifies the maximum number of vNICs supported by a VM.

sriov_supported

Enables SRIOV support by VM interfaces. Valid values are true and false.

sriov_driver_list

Specifies the list of drivers to enable the SRIOV support.

pcie_supported

Enables the PCI passthrough support by VM interfaces. Valid values are true and false.

pcie_driver_list

Specifies the list of vNICS to enable the PCI passthrough support.

bootstrap_cloud_init_drive_type

Mounts the day0 configuration file as disk. Default is CD-ROM.

bootstrap_cloud_init_bus_type

Default is IDE.

bootstrap_file

Specifies the bootstrap file.

custom_property

Specifies the custom properties that can be defined within the custom_property tree. For example, for ISRv, the technology packages are listed in this block.

If the Cisco Enterprise NFV portal is used to deploy the VM, the portal prompts you for inputs for custom properties fields, and can pass the values to the bootstrap configuration.

profiles

Specifies the list of VM deployment profiles. Minimum one profile is required.

default_profile

Specifies the default profile that is used when no profile is specified during deployment.

monitoring_supported

Specifies that the VM supports monitoring to detect failures. Valid values are true and false.

monitoring_methods

Specifies the method to monitor a VM. Currently, only ICMP ping is supported. This parameter is required if the monitoring_supported parameter is set to true.

low_latency

Specifies if a VM's low latency (for example, router and firewall) gets dedicated resource (CPU) allocation. Otherwise, shared resources are used. Valid values are true and false.

privileged_vm

Allows special features like promiscuous mode and snooping. Valid values are true and false. The default value is false.

virtual_interface_model

Specifies the virtual interface model.

thick_disk_provisioning

Configures thick disk provisioning. Valid values are true and false. The default value is false.

placement

Specifies placement datastore. For NFS, valid value is nfs-storage.

For Cisco ENCS external datastore, allowed values are datastore2, datastore3. The default value is datastore1.

profile

Specifies the profile for defining the resources required for VM deployment. This profile is referenced during VM deployment.

name

Specifies the profile name.

description

Specifies the description of the profile.

vcpus

Specifies the vCPU number in a profile.

memory_mb

Specifies the memory in MB in a profile.

root_disk_mb

Specifies the disk size in MB in a profile.

To verify that the VM image is registered, use the following commands in privileged EXEC mode:

show running-config vm_lifecycle images [ image image-name]

show vm_lifecycle opdata images [ image image-name]

Examples

The following example shows how to register a VM image:


nfvis(config)# vm_lifecycle images image isrv src file://data/intdatastore/uploads/isrv-universalk9.16.03.01.tar.gz
nfvis(config-image-isrv)# properties property vnf_type value router  
nfvis(config-property-vnf_type)# exit
nfvis(config-image-isrv)# properties property console_type_serial value true  
nfvis(config-image-isrv)# properties property bootup_time value -1   
nfvis(config-property-bootup_time)# exit
nfvis(config-image-isrv)# commit
nfvis(config-image-isrv)# end

vm_lifecycle tenants tenant admin deployments

To deploy a VM with its attributes, use the vm_lifecycle tenants tenant admin deployments command in global configuration mode along with the other commands given in the Usage Guidelines section. To undeploy a VM, use the no form of the command.

vm_lifecycle tenants tenant admin deployments deployment deployment-name vm_group vm-group-name bootup_time valueimage image-name flavor flavor-name

no vm_lifecycle tenants tenant admin deployments deployment deployment-name

Usage Guidelines

  1. Create a deployment and a vm_group.

    vm_lifecycle tenants tenant admin deployments deployment deployment-name vm_group vm-group-name bootup_time value image image-name flavor flavor-name

  2. In the vm_group configuration mode, configure VM interfaces and optional model name, IP address, and port forwarding.

    interfaces interface nicid network network-name [ model model-name] [ ip_address ip-address] [ port_forwarding port port-type protocol protocol-name vnf_port port-num external_port_range port-num-start port-num-end]

    exit

  3. In vm_group configuration mode, configure scaling rule.

    scaling min_active min_active max_active max_active

  4. (Optional) In vm_group configuration mode, configure placement.

    placement type zone_host host placement-host-name

  5. In vm_group configuration mode, configure monitoring policy rule for a monitored VM for which the bootup_time is specified.

    rules admin_rules rule rule-name action actions

    exit

    kpi_data kpi rule-name metric_value value metric_cond value metric_type metric_type metric_collector type type nicid vnic-id poll_frequency value polling_unit unit continuous_alarm continuous_alarm_value

  6. Commit the configuration.

    commit

To verify, use following two commands in privileged EXEC mode

show running-config vm_lifecycle tenants tenant admin deployments [ deployment-name]

show vm_lifecycle opdata tenants tenant admin deployments [ deployment-name]

Syntax Description

deployment deployment-name

Specifies the VM deployment name.

vm_group vm-group-name

Specifies the VM group name.

bootup_time value

Specifies the VM bootup time. Bootup time can vary depending on the VM image that you have selected. For example, bootup time is 600 seconds for a Cisco ISRv image. If no monitoring is required for the VM, set the bootup time as -1.

Note 
A monitored VM must have a valid bootup time. The corresponding KPI fields are mandatory for the monitored VM. For an unmonitored VM, the KPI fields are optional.

image image-name

Specifies the image name that was used for registering. The image must be in ACTIVE state.

flavor flavor-name

Specifies the flavor name. The flavor must be in ACTIVE state.

interfaces interface nicid

Specifies the virtual interface ID.

Note 
At least one NIC ID is required for monitored VMs. For unmonitored VMs, NIC ID is optional.

network network-name

Specifies the name of the network attached to the NIC ID. All networks (such as LAN and WAN), except the internal management network, require an IP address.

The vNIC attachment to the internal management network is required only for VMs that require monitoring. If this interface is used for monitoring, network must be set to int-mgmt-net .

model model-name

Specifies the model name. Possible values are: e1000, i82551, i82557b, i82559er, ne2k_pci, pcnet, rtl8139, and virtio.

The default value is virtio. This is an optional parameter.

ip_address ip_address

Specifies the IPv4 address. This is an optional parameter.

port_forwarding

Configures port forwarding.

When port forwarding is enabled, you must specify the values in the following fields: port, protocol, vnf_port, and external_port_range .

port port-type

Specifies the port type. Possible values are SSH, HTTPS, TCP, and Telnet.

protocol protocol-name

Specifies the protocol. Valid value is TCP.

vnf_port port-num

Specifies the port number corresponding to the specified protocol.

external_port_range port-num-start port-num-end

Specifies the unique port number to specify the start and end range for ports.

scaling

Specifies how many instances of a particular type of VM need to be instantiated, and whether elastic scale-in and scale-out are required.

min_active min_active

Defines the minimum number of VMs to be activated.

max_active max_active

Defines the maximum number of VMs to be activated.

placement

Configures placement datastore. This is an optional parameter.

type zone_host

Specifies the placement type. Value must be zone_host.

host placement-host-name

Specifies the name of the placement datastore. For NFS, valid value is nfs-storage. For Cisco ENCS external datastore, allowed values are datastore2, datastore3. The default value is datastore1.

rules admin_rules

Configures monitoring policy rule. These are the rules that an administrator specifies when the service is registered.

This parameter is mandatory if the VM is a monitored VM, that is, its bootup time is non-zero.

rule rule-name

Specifies the name of the monitoring event rule.

action actions

Specifies the list of actions which this policy triggers.

  • ALWAYS log—Whether the event is pingable or not, the details are always logged.

  • FALSE recover autohealing—The action identified by this keyword is triggered, and the VM is recovered without the administrator's intervention.

  • TRUE servicebooted.sh—The action identified by this keyword in the dynamic mapping file is triggered when the VM moves from a non-pingable to a pingable state.

You can specify actions in the following format: action [ "ALWAYS log" "FALSE recover autohealing" "TRUE servicebooted.sh" ] .

kpi_data

Specifies the Key Performance Indicators (KPI) data.

kpi rule-name

Specifies the KPI rule name.

metric_value value

Specifies the metric threshold value of the KPI.

metric_cond value

Specifies the direction of the metric value change for the KPI. Valid values are the following:

  • GE and GT : An alarm is sent when the metric value increases from a lower position to equal or exceed the specified value. 


  • LE and LT : An alarm is sent when the metric value decreases from a higher position to equal or go down the specified value.

metric_type type

Specifies the metric type. Valid metric types are INT8, UINT8, INT16, UINT16, INT32, UINT32, FLOAT, DOUBLE, and STRING.

metric_collector

Configures the metrics that needs to be monitored and at what frequency should the monitoring happen.

type type

Specifies the type to be monitored; for example, ICMPPing. If the image boot-up time is provided, monitoring must be set to ICMPPing.

nicid vnic-id

Specifies the card ID of the interface through which this VM is monitored. It should be the ID specified for one of interfaces in the payload.

poll_frequency value

Specifies the ICMP ping frequency value.

polling_unit unit

Specifies the ICMP ping frequency unit. Possible values are minutes and seconds.

continuous_alarm value

Specifies that the continuous events need to be generated. Valid values are true and false.

Command Default

None

Command Modes

Global configuration (config)

Command History

Release Modification
3.5.1

This command was introduced.

Examples

The following example shows how to deploy a VM:


nfvis(config)# vm_lifecycle tenants tenant admin deployments deployment dep1 vm_group router1 bootup_time 600 image 
isrv flavor ISRv-small
nfvis(config-vm_group-router1)# interfaces interface 0 network int-mgmt-net port_forwarding port ssh protocol tcp 
vnf_port 22 external_port_range 20024 20024
nfvis(config-port-ssh)# exit
nfvis(config-interface-0)# exit
nfvis(config-vm_group-router1)# interfaces interface 1 model virtio network lan-net
nfvis(config-interface-1)# exit
nfvis(config-vm_group-router1)# rules admin_rules rule VM_ALIVE action [ "ALWAYS log" "FALSE recover autohealing" 
"TRUE servicebooted.sh" ]
nfvis(config-rule-VM_ALIVE)# exit
nfvis(config-vm_group-router1)# kpi_data kpi VM_ALIVE metric_value 1 metric_cond GT metric_type UINT32 metric_collector 
type ICMPPing nicid 0 poll_frequency 3 polling_unit seconds continuous_alarm false
nfvis(config-kpi-VM_ALIVE)# exit
nfvis(config-vm_group-router1)# scaling min_active 1 max_active 1
nfvis(config-vm_group-router1)# placement zone_host host datastore1
nfvis(config-placement-zone_host)# exit
nfvis(config-vm_group-router1)# commit

vmAction

To specify a VM action, use the vmAction command in privileged EXEC mode.

vmAction action vmName name

Syntax Description

action

Specify the action. Valid values are DISABLE_MONITOR , ENABLE_MONITOR , REBOOT , RECOVER , START, and STOP .

name Specify the VM name. This VM name is the internally-generated name. Use the show vm_lifecycle opdata tenants tenant admin deployments command to get the VM NAME per deployment.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.6.1

This command was introduced.

Examples

nfvis# vmAction actionType STOP vmName 1513193832_ROUTER_0_15c32f49-0d95-4b7a-8a84-ba7de3c1d6f9

vmBackupAction

To back up a VM, use the vmBackupAction command in privileged EXEC mode.

vmBackupAction vmName name actionType action [ backupName backupname]

Syntax Description

vmName name

Specifies the VM name.

actionType action

Specifies the action type. Valid value is EXPORT .

backupName backupname

Specifies the backup name for the VM.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification

3.7.1

This command was introduced.

Examples

nfvis# vmBackupAction vmName isrvtest1 actionType EXPORT

vmConsole

To enable VM serieal console, use the vmConsole command in privileged EXEC mode.

vmConsole vm-domain-name

Syntax Description

vm-domain-name

Specifies the VM domain name.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.5.1

This command was introduced.

Usage Guidelines

If the VM does not support a serial console, the vmConsole command returns this message, "Serial console not available".

To exit the VM console you must enter ctrl+] and then enter send escape.

Examples

The following example shows how a VM is connected to its domain using the serial console:


nfvis#  vmConsole fortinet.fortinet
Connected to domain fortinet.fortinet

vncconsole start

To get information about the VNC console, use the vncconsole start command in privileged EXEC mode.

vncconsole start deployment-name name vm-name name

Syntax Description

deployment-name name

Specifies the deployment name.

vm-name name

Specifies the VM name.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.5.1

This command was introduced.

Examples


nfvis# vncconsole start deployment-name 1461784490 vm-name isrvtest1
vncconsole-url :6001/vnc_auto.html

show vm_lifecycle opdata

To display the overall operational status of VM life cycle, use the show vm_lifecycle opdata command in privileged EXEC mode.

show vm_lifecycle opdata [flavors flavor flavor-name | images image image-name | networks network network-name | stats | status | system-config | tenants tenant tenant-name [ deployments [ vm_group vm-group-name] ] ]

Syntax Description

flavors flavor flavor-name

Specifies the flavor name.

images image image-name

Specifies the image name.

networks network network-name

Specifies the network name.

stats

Displays the VM life cycle statistics.

status

Displays the VM life cycle status.

system-config

Displays the VM life cycle configuration.

tenants tenant tenant-name

Specifies the tenant name.

deployments

Displays the deployment status.

vm_group vm-group-name

Displays the deployment status for the specified VM group.

Command Default

Displays the overall operational status of the VM life cycle.

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.5.1

This command was introduced.

Examples


nfvis# show vm_lifecycle opdata      
vm_lifecycle opdata status OPER_UP
vm_lifecycle opdata stats hostname nfvis
vm_lifecycle opdata stats os_name Linux
vm_lifecycle opdata stats os_release 3.10.0-327.36.3.el7.x86_64
vm_lifecycle opdata stats arch amd64
vm_lifecycle opdata stats uptime 1395859
vm_lifecycle opdata stats cpu cpu_num 16
vm_lifecycle opdata networks network int-mgmt-net
 netid                 a5bc70f6-5841-4af5-bcec-6710d28e7f55
 shared                true
 admin_state           true
 provider_network_type local
 status                active
                                                                                    NO                         
NAME                 SUBNETID                              CIDR          GATEWAY    GATEWAY  DHCP   IPVERSION  
---------------------------------------------------------------------------------------------------------------
int-mgmt-net-subnet  004db62f-ae89-43f7-bc24-dfa2d9caa3eb  192.0.2.0/24  192.0.2.1  false    false  4          

vm_lifecycle opdata tenants tenant admin
 tenant_id AdminTenantId
 networks network int-mgmt-net
  netid                 a5bc70f6-5841-4af5-bcec-6710d28e7f55
  shared                true
  admin_state           true
  provider_network_type local
  status                active
                                                                                    NO                         
NAME                 SUBNETID                              CIDR          GATEWAY    GATEWAY  DHCP   IPVERSION  
---------------------------------------------------------------------------------------------------------------
int-mgmt-net-subnet  004db62f-ae89-43f7-bc24-dfa2d9caa3eb  192.0.2.0/24  192.0.2.1  false    false  4         

Examples


nfvis# show vm_lifecycle opdata tenants tenant admin deployments
deployment_id SystemAdminTenantIdisrv1
     vm_group isrv1
     name     SystemAdminTena_isrv1_0_72619ffd-df8e-4c32-b24a-3d7b03a31303
SystemAdminTena_isrv1_0_72619ffd-df8e-4c32-b24a-3d7b03a31303  VM_ALIVE_STATE  

Examples


nfvis# show vm_lifecycle opdata tenants tenant admin deployments vm_group isrv1
deployments isrv1 - -

 vm_group isrv1

  vm_instance 57b9a63a-9c9d-4765-baa6-2d7086ad3262

   name     SystemAdminTena_isrv1_0_72619ffd-df8e-4c32-b24a-3d7b03a31303

   host_id  NFVIS

   hostname nfvis

   interfaces interface 0

    model       virtio

    port_id     vnic1

    network     int-mgmt-net

    subnet      N/A

    ip_address  192.0.2.10

    mac_address 52:54:00:f1:5f:d9

    netmask     255.255.255.0

    gateway     192.0.2.1

   interfaces interface 1

    model       virtio

    port_id     vnic7

    network     wan-net

    subnet      N/A

    mac_address 52:54:00:2b:41:e9

   interfaces interface 2

    model       virtio

    port_id     vnic8

    network     lan-net

    subnet      N/A

    mac_address 52:54:00:7a:27:25

    netmask     255.255.255.0

    gateway     198.51.100.1

show running-config vm_lifecycle

To display the currently running VM life cycle configuration, use the show running-config vm_lifecycle command in privileged EXEC mode.

show running-config vm_lifecycle

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.6.1

This command was introduced.

Examples


nfvis# show running-config vm_lifecycle
vm_lifecycle tenants tenant admin
 description      "Built-in Admin Tenant"
 managed_resource false
 vim_mapping      true
!
vm_lifecycle networks network int-mgmt-net
 subnet int-mgmt-net-subnet
  ipversion ipv4
  dhcp      false
  address   192.0.2.0
  netmask   255.255.255.0
  gateway   192.0.2.1
 !
!

show running-config vm_packages

To display the running VM package configuration, use the show running-config vm_packages command in privileged EXEC mode.

show running-config vm_packages

Syntax Description

This command has no arguments or keywords.

Command Default

None

Command Modes

Privileged EXEC (#)

Command History

Release Modification
3.6.1

This command was introduced.

Examples


nfvis# show running-config vm_packages