Top how-tos for your API, 50-60 chars

VM Image Configuration

Register a virtual machine image

Example for Image Registration Payload

<image>
    <name>isrv9.16.03.01</name>
    <src>http://<filename_with_full-path-of-the-file>/c8000v-universalk9_8G_serial.17.05.01a.tar.gz</src>
</image>
<image>
    <name> mytiny2</name>
    <src>file:///data/mount/nfs_storage/repository/TinyCore-current.iso</src>
    <properties>
        <property>
            <name>placement</name>
            <value>nfs_storage</value>
        </property>
    </properties>
</image>

Register an image from a remote location with the certificate validation by providing certificate string in the payload

<image>
        <name>isrv</name>
        <src>https://<remote_server>/c8000v-universalk9_8G_serial.17.05.01a.tar.gz</src>
        <certificate_validation>true</certificate_validation>
        <certificate_string>"-----BEGIN CERTIFICATE-----
Certification String
-----END CERTIFICATE-----"</certificate_string>
    </image>

The certificate string needs to be in the format of a PEM encoded certificate string and enclosed in double quotes. Alternatively, you can provide the certificate string as a file, in which case, place the certificate string in the file and specify the file path in the certificate_file field.

<image>
        <name>isrv</name>
        <src>https://<remote_server>/c8000v-universalk9_8G_serial.17.05.01a.tar.gz</src>
        <certificate_validation>true</certificate_validation>
        <certificate_file>file:///data/intdatastore/uploads/esc-soltest-124.cert</certificate_file>
    </image>

Example Post Request

curl -X POST -k -u admin:'password'  'https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/images' \
--header 'Content-Type: application/yang-data+json' \
--header 'Content-Type: application/yang-data+xml' \
--header 'Authorization: Basic YWRtaW46Q2lzY28xMjMj' \
--data '<image>
    <name>testc8kv</name>
    <src>http://<remote_server>/images/c8000v-universalk9_8G_serial.17.05.01a.tar.gz</src>
</image>'

Register an image to an external datastore

curl -k -v -u admin:password -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml \
 -X POST https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/images \
  -d '<image>
        <name>Linuxnew</name>
        <src>file:///mnt/extdatastore2/uploads/TinyLinux.tar.gz</src>
        <properties>
            <property>
                <name>placement</name>
                <value>datastore3</value>
            </property>
        </properties>
  </image>'

Get the status of the image registration. The supported image states are: IMAGE_UNDEF_STATE
IMAGE_CREATING_STATE
IMAGE_ACTIVE_STATE
IMAGE_DELETING_STATE
IMAGE_DELETED_STATE
IMAGE_ERROR_STATE

curl -k -v -u admin:password -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml \
 -X GET https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/opdata/images/image=Linuxnew
 

VM Image deletion

curl -k -v -u admin:password -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml \
 -X DELETE https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/images/image=Linuxnew

Flavor Configuration

After registering the image, create a flavor for the image. The flavor is a template that defines the resources that are required for the VM. Flavors, also referred to as VM profiles, describe the configurations of virtual machines. Example for Flavor Creation Payload

<flavor>
 <name>C8000v_FLAVOR</name>
 <vcpus>4</vcpus>
 <memory_mb>4096</memory_mb>
 <root_disk_mb>8192</root_disk_mb>
</flavor>

Post Request to create a flavor

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
POST https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/flavors \
 -d '<flavor>
      <name>C8000v_FLAVOR</name>
      <memory_mb>4096</memory_mb>
      <root_disk_mb>8192</root_disk_mb>
      <vcpus>4</vcpus>
    </flavor>'

Get the status of the flavor creation.

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
GET https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/opdata/flavors/flavor=C8000v_FLAVOR

Get the Flavor configuration

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
GET https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/flavors/flavor=C8000v_FLAVOR

Delete the flavor

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
DELETE https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/flavors/flavor=C8000v_FLAVOR

VM Deployment and Management

Create a VM using the registered image and flavor. Example for VM Creation Payload

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H 
Content-Type:application/yang-data+xml -X POST https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments \
--data '<deployment>
<name>Linuxnew</name>
<vm_group>
        <name>Linuxnewvmgrp</name>
        <image>Linuxnew</image>
        <flavor>test_flavor</flavor>
        <bootup_time>-1</bootup_time>
        <recovery_wait_time>0</recovery_wait_time>
        <kpi_data>
         <enabled>true</enabled>
        </kpi_data>
      <scaling>
         <min_active>1</min_active>
         <max_active>1</max_active>
         <elastic>true</elastic>
      </scaling>
      <placement>
         <type>zone_host</type>
         <enforcement>strict</enforcement>
         <host>datastore1</host>
      </placement>
      <recovery_policy>
         <recovery_type>AUTO</recovery_type>
         <action_on_recovery>REBOOT_ONLY</action_on_recovery>
      </recovery_policy>
</vm_group>
</deployment>'

Description for VM Deployment Payload

Property Type Description Mandatory/Default Value
deployment name string Name of the deployment Yes
vm_group name string Name of the VM group Yes
vim_vm_name string Name of the VM Optional. If you do not specify a value, the system assigns the Deployment Name to the VM name.VM group name.
image string Image name that was used to register Yes
bootup_time integer Bootup time could vary depending on the VM image that you have chosen. 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. In the case of an unmonitored VM, KPI fields are optional.
Yes
placement type string Set VM deployment placement. For example deploying the VM on external datastore if the system has external datastore. Must set value to "zone_host" if deploying the VM on external data store or NFS. No
placement host string Specify placement datastore. For example ENCS system has external datastore. Specify placement host. Allowed values are: datastore2, datastore3, nfs_storage No
recovery_wait_time integer Time in seconds that this VM takes to perform a normal warm reboot. This will be used to avoid premature VM recovery in case VM becomes unresponsive due to operator reboot. This is important as VM recovery will result in loss of data that is stored on the root disk. If speedy recovery is more important than the data on the root disk, this value can be optionally set to 0. No
recovery_policy string Recovery policy for the VM. Possible values: AUTO, MANUAL. AUTO—The system automatically recovers the VM. MANUAL—The system requires manual intervention to recover the VM. Yes
action_on_recovery string The action performed during recovery. Possible values: REBOOT_ONLY; REDEPLOY_ONLY; REBOOT_THEN_REDEPLOY Yes
interface nicid integer The network interface card ID.
Note: At least one NIC ID is mandatory for monitored VMs. It is optional for unmonitored VMs.
Yes (for monitored VMs)
network string 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 only required for VMs, which require monitoring.
If this interface is for monitoring, network must be set to "int-mgmt-net"
Yes (for monitored VMs)
ip_address string IPv4 address Yes
port_forwarding - If port forwarding is included, all elements under it are mandatory. No
port type enum Supported values are SSH, HTTPS, TCP, and Telnet No
protocol string Supported values are TCP No
vnf_port integer Port number corresponding to the protocol used. No
external_port_range string Unique port number to specify the start and end range. No
scaling container Specifies how many instances of a particular type of VM need to be instantiated, and whether elastic scale-in and scale-out are required. Yes
min_active integer Describes the minimum number of VMs to be activated. Value currently supported: 1 Yes
max_active integer Describes the maximum number of VMs to be activated. Value currently supported: 1 Yes
kpi_data - Key performance indicators data. Yes (for monitored VMs)
event_name string Name of the event. Yes (for monitored VMs)
metric_value string The metric threshold value of the KPI. Yes (for monitored VMs)
metric_cond enum Specifies the direction of the metric value change for this KPI. There are four valid values: GE & GT—An alarm is sent when the metric value increases from a lower position to equal or exceed the specified value. LE & LT—An alarm is sent when the metric value decreases from a higher position to equal or go down the specified value. Yes (for monitored VMs)
metric_type integer Supported metric types are INT8, UINT8, INT16, UINT16, INT32, UINT32, FLOAT, DOUBLE, and STRING. Yes (for monitored VMs)
metric_collector
type
string If the image boot-up time is provided, monitoring must be set to ICMPPing. This field type can be empty if boot-up time is -1. Yes (for monitored VMs)
nicid integer The card ID of the interface through which this VM is monitored. It should be the ID specified in one of interfaces section in the payload. Yes (for monitored VMs)
poll_frequency integer The frequency at which the monitoring is done. Yes (for monitored VMs)
polling_unit string The unit of the poll frequency. Yes (for monitored VMs)
continuous_alarm boolean Continuous events need to be generated. Value supported: false, true Yes (for monitored VMs)
rule
event_name
string Name of the event. Yes (for monitored VMs)
action string Always log—Whether the event is pingable or not, the details are always logged.
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.
FALSE recover autohealing—The action identified by this keyword is triggered, and the VM is recovered without the administrator's intervention.
Yes (for monitored VMs)
configuration
dst
string If the VM supports the bootstrap configuration file in the VM package, and a token is included in the configuration file, this token must be filled in the bootstrap template during the VM deployment. No
variable name string TECH_PACKAGE is the token for a Cisco ISRv image. This needs to be specified in the variable name. This varies with each VM. Yes (for monitored VMs)

Delete the VM

curl -k -v -u admin:password -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml \
 -X DELETE https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=Linuxnew

Examples for VM Deployment Payload with Bootstrap Configuration Options


Note: You need to specify the exact name of the VM bootstrap configuration file under the element in the deployment payload. This name can vary with each VM. For example, the Cisco ASAv bootstrap configuration file is "day0-config".


Option 1 Example: Deployment Payload for Bundling Bootstrap Configuration Files into the VM Package In this method, the bootstrap configuration variables can be tokenized. You have to provide token values at the time of deployment using the deployment payload.

The following is the extract from the Cisco ASAv bootstrap configuration with tokenized variables. Tokenized variables are highlighted in this example.

ASA Version 9.4.1
firewall transparent
ssh version 2
!
interface management0/0
description vnf-mgmt-net
nameif vnf-mgmt
security-level 100
ip address ${VNF_MGMT_IP} ${VNF_MGMT_NETMASK}
no shutdown
!
interface GigabitEthernet0/0
description service-net
nameif outside
security-level 0
bridge-group 10
no shutdown
!
interface GigabitEthernet0/1
description lan-net
nameif inside
bridge-group 10
security-level 100
no shutdown
!
interface BVI10
ip address ${BRIDGE_IP} ${BRIDGE_MASK}
!
snmp-server enable
snmp-server community public
http server enable
http 0.0.0.0 0.0.0.0 management
crypto key generate rsa modulus 2048
username test password test123
ssh 0.0.0.0 0.0.0.0 management
aaa authentication ssh console LOCAL
route vnf-mgmt 0.0.0.0 0.0.0.0 ${VNF_MGMT_GW} 1
route outside 0.0.0.0 0.0.0.0 ${BRIDGE_GW} 1

The following is the deployment payload for the Cisco ASAv VM with tokenized variables.

<deployment>
    <name>ASAv</name>
    <vm_group>
        <name>FirwallGroup</name>
        <image>asavImage</image>
        <flavor>IASAv5l</flavor>
        <bootup_time>600</bootup_time>
        <recovery_wait_time>0</recovery_wait_time>
        <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>20024</start>
                            <end>20024</end>
                        </external_port_range>
                    </port>
                </port_forwarding>
            </interface>
            <interface>
                <nicid>1</nicid>
                <network>sc-net</network>
            </interface>
            <interface>
                <nicid>2</nicid>
                <network>lan-net</network>
            </interface>
        </interfaces>
        <kpi_data>
            <enabled>true</enabled>
            <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>FALSE recover autohealing</action>
                    <action>TRUE servicebooted.sh</action>
                </rule>
            </admin_rules>
            <user_rules/>
        </rules>
        <scaling>
            <min_active>1</min_active>
            <max_active>1</max_active>
        </scaling>
        <config_data>
            <configuration>
                <dst>day0-config</dst>
                <variable>
                    <name>VNF_MGMT_IP</name>
                    <val>192.0.2.6</val>
                </variable>
                <variable>
                    <name>VNF_MGMT_NETMASK</name>
                    <val>255.255.255.0</val>
                </variable>
                <variable>
                    <name>BRIDGE_IP</name>
                    <val>192.0.2.10</val>
                </variable>
                <variable>
                    <name>BRIDGE_MASK</name>
                    <val>255.255.255.0</val>
                </variable>
                <variable>
                    <name>VNF_MGMT_GW</name>
                    <val>192.0.2.7</val>
                </variable>
                <variable>
                    <name>BRIDGE_GW</name>
                    <val>192.0.2.12</val>
                </variable>
            </configuration>
        </config_data>
    </vm_group>
</deployment>

Option 2 Example: Bootstrap Configuration without Tokens in the Deployment Payload In this example, the entire Cisco ASAv bootstrap configuration is copied under the element.

<deployment>
    <name>ASAv</name>
    <vm_group>
        <name>ASAvGroup</name>
        <bootup_time>-1</bootup_time>
        <config_data>
            <configuration>
                <dst>day0-config</dst>
                <data>
                ASA Version 9.4.1
                firewall transparent
                ssh version 2
                interface management0/0
                description vnf-mgmt-net
                nameif vnf-mgmt
                security-level 100
                ip address 11.20.0.3 255.255.255.0
                no shutdown
                interface GigabitEthernet0/0
                description service-net
                nameif outside
                security-level 0
                bridge-group 10
                no shutdown
!
                interface GigabitEthernet0/1
                description lan-net
                nameif inside
                bridge-group 10
                security-level 100
                no shutdown
                interface BVI10
                ip address 12.20.0.3 255.255.255.0
!
                snmp-server enable
                snmp-server community public
                http server enable
                http 0.0.0.0 0.0.0.0 management
                crypto key generate rsa modulus 2048
                username test password test123
                ssh 0.0.0.0 0.0.0.0 management
                aaa authentication ssh console LOCAL
                route vnf-mgmt 0.0.0.0 0.0.0.0 11.20.0.1 1
                route outside 0.0.0.0 0.0.0.0 12.20.0.1 1
                </data>
    <image>ASAvImage</image>
        <interfaces>
            <interface>
            <nicid>0</nicid>
            <network>vnf-mgmt-net</network>
            </interface>
            <interface>
            <nicid>1</nicid>
            <ip_address>12.20.0.68</ip_address>
            <network>sc-net</network>
            </interface>
        </interfaces>
        <kpi_data>
            <kpi>
            <event_name>VM_ALIVE</event_name>
            <metric_collector>
            <continuous_alarm>false</continuous_alarm>
            <nicid>0</nicid>
            <poll_frequency>3</poll_frequency>
            <polling_unit>seconds</polling_unit>
            <type>ICMPPing</type>
            </metric_collector>
            <metric_cond>GT</metric_cond>
            <metric_type>UINT32</metric_type>
            <metric_value>1</metric_value>
            </kpi>
        </kpi_data>
        <recovery_wait_time>0</recovery_wait_time>
        <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>
        <scaling>
            <max_active>1</max_active>
            <min_active>1</min_active>
        </scaling>
    </vm_group>
</deployment>

Option 3 Example: Deployment Payload with Local Bootstrap Configuration File
In this example, a reference to the Cisco ASAv local bootstrap configuration file is provided from the payload under the element. If the bootstrap configuration file has tokens, you have to provide token values in the deployment payload under the configuration section.

<deployment>
    <name>asaV</name>
    <vm_group>
        <name>firewall_Group</name>
        <image>ASAvImage</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>
        <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>wan-net</network>
                <ip_address>172.19.181.42</ip_address>
            </interface>
            <interface>
                <nicid>2</nicid>
                <network>lan-net</network>
                <ip_address>192.168.0.20</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>day0-config</dst>
               <file>file://data/upload1/day0-config</file> 
           </configuration>
        </config_data>
    </vm_group>
</deployment>

Adding or Editing a vNIC Using the VM Deployment API

Using the VM deployment API, you can add, edit, or delete as many vNICs as you want. For these actions, you will have to use the PUT method of the VM deployment API. VM's vNIC can be updated when VM is active or stopped.


Note: Editing vNIC (add / delete / changing network) will reboot the VM is the VM does not support vNIC hot-add / hot-delete / hot-modify.


Example: Adding more than one vNIC

You should know the deployment name and the VM group name to use the PUT form of the VM deployment API. To get them, use the following commands before running the PUT form of the VM deployment API :

  • GET https:///restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments—Provides the names of all VMs that are deployed.

  • GET https:///restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=ISR1—Provides the VM group name for a particular deployment.

Additional interfaces are passed into the same deployment URL as shown in this example. A new vNIC (NIC ID 2) is added to the deployed VM, ISR1.

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
PUT https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=ISR1/vm_group=ISR-VM/interfaces \
--data '<interfaces>
    <interface>
        <nicid>0</nicid>
        <network>int-mgmt-net</network>
    </interface>
    <interface>
        <nicid>1</nicid>
        <network>sc-net</network>
    </interface>
    <interface>
        <nicid>2</nicid>
        <network>lan-net</network>
    </interface>
</interfaces>'

Example: Editing a vNIC

You can edit the attributes of an existing vNIC. In this example, the network is changed from sc-net to wan-net for NIC ID 1.

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
PUT https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=ISR1/vm_group/ISR-VM/interfaces \
--data '<interfaces>
    <interface>
        <nicid>0</nicid>
        <network>int-mgmt-net</network>
    </interface>
    <interface>
        <nicid>1</nicid>
        <network>wan-net</network>
    </interface>
    <interface>
        <nicid>2</nicid>
        <network>lan-net</network>
    </interface>
</interfaces>'

Example: Deleting a vNIC

To delete a vNIC that is part of the VM deployed, remove the vNIC ID from the payload, and then run the PUT form of the VM deployment API. For example, assume that you want to remove vNIC 2 from the above configuration (ISR1 deployment), use the PUT form of the VM deployment API as shown in the example:

curl -k -v -u admin:admin -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml -X \
PUT https://<nfvis_ip>/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=ISR1/vm_group/ISR-VM/interfaces \
--data '<interfaces>
    <interface>
        <nicid>0</nicid>
        <network>int-mgmt-net</network>
    </interface>
    <interface>
        <nicid>1</nicid>
        <network>sc-net</network>
    </interface>
  </interfaces>'

Changing the Flavor Using the VM Deployment API

Using this deployment API, you can change or update the flavor. Before changing an existing flavor to a new one, ensure that you have the new flavor created using the flavor creation API. VM's flavor change be updated when VM is active or stopped.

Example: Changing the Flavor In this example, the existing flavor ID is changed to isr-flavor for the VM deployed as ISR1.

curl -k -v -u admin:password -H Accept:application/yang-data+xml -H Content-Type:application/yang-data+xml \
-X PUT https://a.b.c.d/restconf/data/vmlc:vm_lifecycle/tenants/tenant=admin/deployments/deployment=ISR1/vm_group=ISR-VM/flavor \
--data '<flavor>C8000V-small</flavor>'

Note: A VM is automatically power cycled when a flavor of the VM is changed.


VM Actions

Example for VM Operations Payload

This section provides an example of operations payload for starting a VM. You can change the action type value to STOP, REBOOT, ENABLE_MONITOR or DISABLE_MONITOR as required.

<vmAction>
    <actionType>START</actionType>                          
    <vmName>ISR</vmName>     
 </vmAction>

Description for VM Operations Payload

Property Type Description Mandatory/Default Value
vmAction actionType string Action to be performed on the VM. Possible values: START, STOP, REBOOT, ENABLE_MONITOR, DISABLE_MONITOR Yes
vmName string Name of the VM Yes

Example: POST Start VM API

curl -k -v -u admin:password -X POST https://a.b.c.d/restconf/operations/vmlc:vmAction \
-H Content-Type: application/yang-data+xml \
-H Accept: application/yang-data+xml \
--data '<vmAction>
    <actionType>START</actionType>
     <vmNameISR</vmName>
</vmAction>'

Example: Export a VM

curl -k -v -u admin:password -X POST https://a.b.c.d/restconf/operations/vmlc:vmExportAction \
-H Content-Type: application/yang-data+json \
-H Accept: application/yang-data+json \
--data '{
  "vmlc:vmName": "ISR",
  "vmlc:exportName": "ISR_Export",
  "vmlc:exportPath": "backup",
  "vmlc:includeImage": ""
}'

Example: Import a VM

curl -k -v -u admin:password -X POST https://a.b.c.d/restconf/operations/vmlc:vmImportAction \
--header 'Content-Type: application/yang-data+json' \
--header 'Accept: application/yang-data+json' \
--data '{
  "vmlc:importPath": "intdatastore:backup/ISR_Export.vmbkp"
}'