Published On: August 6ᵗʰ, 2019 02:05
Cisco Enterprise Network Function Virtualization Infrastructure Software Command Reference
VM Lifecycle Management Commands
- vm_lifecycle flavors
- vm_lifecycle images
- vm_lifecycle tenants tenant admin deployments
- vmAction
- vmBackupAction
- vmConsole
- vncconsole start
- show vm_lifecycle opdata
- show running-config vm_lifecycle
- show running-config vm_packages
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]
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 History
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]
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 History
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.
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
Usage Guidelines
-
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
-
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
-
In vm_group configuration mode, configure scaling rule.
scaling min_active min_active max_active max_active
-
(Optional) In vm_group configuration mode, configure placement.
placement type zone_host host placement-host-name
-
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
-
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
Command History
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
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 History
vmBackupAction
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
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 History
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.
Syntax Description
Command History
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 ! !