Performing Tasks Using REST API

Migration to Cisco ACI Virtual Edge

Migrate the Cisco AVS VMM Domain to Cisco ACI Virtual Edge Using REST API

A VMM domain must be ready for the hosts and VMs before you migrate from Cisco AVS to Cisco ACI Virtual Edge. You can use REST API to migrate the VMM domain. This is easier than creating a new VMM domain, which requires that you manually reproduce most of the configuration of the Cisco AVS domain.


Note

You can migrate only one Cisco AVS VMM domain at a time.

Procedure


Migrate the Cisco AVS VMM domain, providing its name, the name of the Cisco ACI Virtual Edge domain that you want to create, and user account information.

You must provide the user account information—the username and password—for the previous Cisco AVS. It is optional to specify a new VLAN pool.

Example:

The following example migrates a Cisco AVS domain named prod-avs to a domain named ave. It also creates a new VLAN pool for the Cisco ACI Virtual Edge domain.
{{ifc}}/mqapi2/migrateVMwareDomain.xml?name=prod-avs 
<vmmDomP dn="uni/vmmp-VMware/dom-ave" name="ave" enableAVE="true" >
	<vmmUsrAccP name="adminAcc" usr="administrator@vsphere.local" pwd="In$1eme1" />
	<infraRsVlanNs tDn="uni/infra/vlanns-[inst_pvlan]-dynamic"/>
</vmmDomP>
 

By default, all EPGs from the Cisco AVS domain are automatically associated with the new domain. If you do not want to associate the EPGs, add the parameter migrateEPGs=False.

Associating the EPGs from the Cisco AVS domain to the new Cisco ACI Virtual Edge domain does not remove the old association.


What to do next

Follow instructions in the section Migrate from Cisco AVS to Cisco ACI Virtual Edge Using the Cisco ACI vCenter Plug-in in this guide.

Migrate a VDS Domain to Cisco ACI Virtual Edge Using REST API

Before you begin

You have created a VDS domain. See the procedure "Creating a VMM Domain Profile" in the Cisco ACI Virtualization Guide.

Procedure


Step 1

Create a multicast address pool if you have not done so.

Example:

<polUni>
<infraInfra>
    <fvnsMcastAddrInstP name="mcast1">
            <fvnsMcastAddrBlk name="mcastrange" from="225.2.1.1" to="225.2.1.100"/>
    </fvnsMcastAddrInstP>
</infraInfra>
</polUni>
Step 2

Set enableAVE=true on the VMM domain and associate the multicast address pool with it.

Example:

<polUni>
<vmmProvP vendor="VMware">
    <vmmDomP name="mininet" enableAVE="true">
        <vmmRsDomMcastAddrNs tDn="uni/infra/maddrns-mcast1"/>
   </vmmDomP>
</vmmProvP>
</polUni>

Improving Cisco ACI Virtual Edge Availaility with VMware vSphere Proactive HA

Enabling vSphere Proactive HA Using REST API

You can use REST API to perform several tasks in Cisco Application Policy Infrastructure Controller (APIC):

  • Enable host availability assurance, which creates a vSphere Proactive HA provider object that resides in VMware vCenter. The object enables VMware vCenter to quarantine a host with a nonworking Cisco Application Centric Infrastructure (ACI) Virtual Edge and move its VMs.

  • Set the time period before VMware vCenter quarantines the host with the nonworking Cisco ACI Virtual Edge and move VMs from the host.


Note

When you add hosts to a Cisco ACI Virtual Edge cluster on which Proactive HA is already configured, and then add the host or attach the host to a Cisco ACI Virtual Edge VMM domain, those hosts may not work properly in some circumstances. The hosts may not work properly in Proactive HA or when Cisco ACI Virtual Edge or OpFlex goes down. The hosts also may not go into quarantine mode although the health status of the host is correctly set to yellow in Cisco Cisco Application Policy Infrastructure Controller (APIC).

To fix the problem, disable Proactive HA on the cluster and then re-enable it.


Procedure


Step 1

Enable host availability assurance:

{{ifc}}/api/node/mo/.xml
<polUni>
  <vmmProvP vendor="VMware”  >
      <vmmDomP name="mininet" hvAvailMonitor=”yes”>
	</vmmDomP>
  </vmmProvP>
</polUni>
Step 2

Set the Cisco ACI Virtual Edge timeout:

{{ifc}}/api/node/mo/.xml
<polUni>
  <vmmProvP vendor="VMware">
      <vmmDomP name="mininet” aveTimeOut=”10">
      </vmmDomP>
  </vmmProvP>
</polUni>

You can choose any value between 10 and 100 seconds, inclusive. The default is 30 seconds.


What to do next

Enable the VMware vSphere Proactive HA feature in VMware vCenter if you have not done so already. See the section Enabling vSphere Proactive HA in VMware vCenter in this guide.

You can set a state for a given host to override the default state, which is based on the health of the Cisco ACI Virtual Edge. See the section Manually Setting the Health Level of the ESXi Host.

Setting a State on the Cisco ACI Virtual Edge Host Using REST API

Before you begin

You must have a host that contains Cisco ACI Virtual Edge.

Procedure


Set a state for the host:

{{ifc}}/api/node/mo/.xml
<polUni>
  <vmmProvP vendor="VMware">
      <vmmDomP name="mininet">
         <vmmCtrlrP name="vc65.xyz.com">
		      <vmmHvAvailPol>
		    	<vmmHvDesiredSt host=”172.23.143.228" state="yellow"/>
		      </vmmHvAvailPol>
         </vmmCtrlrP>
     </vmmDomP>
  </vmmProvP>
</polUni>

Configuring VM Group Protection Using REST API

You can use REST API to guarantee that specific VM groups be moved to working hosts if a Cisco Application Centric Infrastructure (ACI) Virtual Edge host stops working.

Before you begin

You must have configured VM groups in VMware vCenter and enabled vSphere Proactive HA in Cisco Application Policy Infrastructure Controller (APIC).

Procedure


Configure VM group protection.

Example:

<polUni>
<vmmProvP vendor="VMware">
    <vmmDomP name="mininet"  hvAvailMonitor="true">
    	<vmmCtrlrP name="vc65.xyz.com">
	    	<vmmHvAvailPol>
	    		<vmmProtectedVmGroup tDn="comp/prov-VMware/ctrlr-[mininet]-vc65.xyz.com/hvcluster-domain-c94/vmgroup-vm01"></vmmProtectedVmGroup>
	    	</vmmHvAvailPol>
    	</vmmCtrlrP>
   </vmmDomP>
</vmmProvP>
</polUni>

In the preceding example, note the following:

  • The tDN property of vmmProtectedVmGroup is the dn property of compVmGroup (vm groups that are pulled from the vCenter inventory).

  • The list of compVmGroup can be queried through GET:https://{apic}/api/node/class/compVmGroup.xml .