Registering VM Images
You must register all VM images before deploying them.
Note |
Register all the VM images required for the VM deployment depending on the topology. A VM image registration is done only once per VM image. You can perform multiple VM deployments using the registered VM image. |
To register a Cisco ISRv image:
-
Set up the http/https server to host the VM image.
-
Register the Cisco ISRv image using the following API method:
curl -k -v -u admin:admin -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -X POST https://<NFVIS_IP>/api/config/vm_lifecycle/images -d '<image><name>isrv-k9.16.03.01</name><src>http://filename_with_full-path-of the-file/isrv-universalk9.16.03.01.tar.gz</src></image>'
-
Verify the image status using the following API method:
curl -k -v -u admin:admin -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -X GET https://<NFVIS_IP>/api/operational/vm_lifecycle/opdata/images/image/isrv-9.16.03.01?deep
-
Now, repeat Steps 1 to 3 to register the Cisco ASAv and Linux server images. Ensure that you provide the exact image name and source file location when running the API commands.
Note |
You can run API commands from any console/server that can reach Cisco Enterprise NFVIS. |
Single VM Deployment
In this example, a Cisco ISRv image with three network interfaces is deployed. The following diagram illustrates the deployment topology:
Steps for Deploying a VM
To deploy a Cisco ISRv image:
-
Verify that all networks required for your deployment are configured.
curl -k -v -u admin:admin -H content-type:application/vnd.yang.data+xml -X GET https://<NFVIS_IP>/api/config/networks?deep
-
Before deploying the VM, you can perform a resource check to ensure that you have sufficient resources for the deployment.
curl -k -v -u "admin:admin" -X GET https://<NFVIS_IP>/api/operational/resources/precheck/vnf/newvnf,isrv-small,true ?deep
-
Deploy the Cisco ISRv VM.
curl -k -v -u admin:admin -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -X POST https://<NFVIS_IP>/api/config/vm_lifecycle/tenants/tenant/admin/deployments --data <deployment> <name>ISR</name> <vm_group> <name>ISR</name> <image>isrv-universalk9.16.03.01/image> <bootup_time>600</bootup_time> <recovery_wait_time>0</recovery_wait_time> <recovery_policy> <action_on_recovery>REBOOT_ONLY</action_on_recovery> </recovery_policy> <flavor>isrv-small</flavor> <interfaces> <interface> <nicid>0</nicid> <network>int-mgmt-net</network> <port_forwarding> <port> <type>ssh</type> <protocol>tcp</protocol> <vnf_port>22</vnf_port> <external_port_range> <start>20022</start> <end>20022</end> </external_port_range> </port> </port_forwarding> </interface> <interface> <nicid>1</nicid> <network>lan-net</network> <ip_address>209.165.201.0</ip_address> </interface> <interface> <nicid>2</nicid> <network>wan-net</network> <ip_address>209.165.201.1</ip_address> </interface> </interfaces> <scaling> <min_active>1</min_active> <max_active>1</max_active> </scaling> <kpi_data> <kpi> <event_name>VM_ALIVE</event_name> <metric_value>1</metric_value> <metric_cond>GT</metric_cond> <metric_type>UINT32</metric_type> <metric_collector> <type>ICMPPing</type> <nicid>0</nicid> <poll_frequency>3</poll_frequency> <polling_unit>seconds</polling_unit> <continuous_alarm>false</continuous_alarm> </metric_collector> </kpi> </kpi_data> <rules> <admin_rules> <rule> <event_name>VM_ALIVE</event_name> <action>ALWAYS log</action> <action>TRUE servicebooted.sh</action> <action>FALSE recover autohealing</action> </rule> </admin_rules> </rules> <config_data> <configuration> <dst>bootstrap_config</dst> <variable> <name>TECH_PACKAGE</name> <val>security</val> </variable> <variable> <name>ngio</name> <val>enable</val> </variable> </configuration> </config_data> </vm_group> </deployment>
-
Verify the deployment status.
curl -k -v -u admin:admin -H Accept:application/vnd.yang.data+xml -H Content-Type:application/vnd.yang.data+xml -X GET https://NFVIS_IP/api/operational/vm_lifecycle/opdata/tenants/tenant/admin/deployments/ISR,-,-?deep
Note
To enable NIM support on a Cisco ISRv running on Cisco ENCS, you must use the following variable in the ISRv deployment payload.
<variable> <name>ngio</name> <val>enable</val> </variable>