Automated Migrations with Move 3.4.1 | Nutanix Community
Skip to main content

We are planning our AHV migration and would like to migrate about 75% of our VM’s (~400) during their negotiated patch outage windows to minimize how many app teams get to set our schedule for us.  Most of these outage windows are in the 3AM time frame.

We would like to find an automated/scripted way to do the cutover so that we can set a job to run that script overnight during that window.  I’ve seen some REST calls that look like they could do it.  Has anyone actually done it?  If so, would they mind sharing a sanitized snippet of their Powershell/REST code?

Thanks in advance!

Hi @BlakeRobertsNBL

Do not have anything right on hand, however, let me poke around some of the internal resources and see if we can come up with something.

 


@BlakeRobertsNBL Got this from the move team, let me know if you need more guidence.

 

I can give you some guidance on the sequence of APIs we need to call to cutover VMs.

workload in our APIs is a VM, so wherever workload id is mentioned we need VM uuid to be passed.

  1. We can use "https://{move_ip}/move/v2/plans/{id}/workloads/list" to get a list of all workloads/VMs list in a migplan by passing in migplan uuid/id. In the response, we get a list of VMs under VMStatus, there we can get VM uuid that we can use to call cutover API. Under VMStatus, we also get State of the VM. When the value is 5, it means the VM is ready for cutover.
  2. For performing cutover of a particular VM, we can call https://{move_ip}/move/v2/plans/{id}/workloads/{wid}/action by passing in VM id in the path parameter 'wid' and passing in the payload:

{"Spec": {
"Action": "cutover"
}}