Solved

Move API 3.3 - Create migration plan from ESX to AHV

  • 22 October 2019
  • 4 replies
  • 2273 views

Badge +1

Just curious if there is going to be an update to the Move API documentation to explain how we can create a migration plan from ESX to AHV. Currently the only example shown is for AWS to AHV and when we try to substitute that payload with values from ESX it fails.

 

Create plan example is here:

http://{{ move-ip-address }}:8082/#/v2api/plans/createplan

 

We’ve tried using this same template to create a plan for ESX, but it seems to choke on the network identification section with a return code of 

{'ApiVersion': '2.0.0', 'Code': 20512, 'Message': "Invalid Network Mapping for VM 'NX-TEST'. Ensure sufficient user permissions on source environment to fetch network information.", 'State': 'Error'}

(we have validate permissions)

 

This appears to be the part of the payload that it doesn’t like:

From the AWS example: 

"Networks": [

            {

                "SourceID": "vpc-8e1c3de7",

                "TargetUUID": "343eaa8f-a251-4ec0-8ede-729c97f7cddc"

            }

 

We’ve substituted these AWS specific values with value from ESX without success

ESX substitutions:

"Networks": [

      {

        "SourceID": "network-201",

        "TargetUUID": "28df625f-4100-4b2e-b311-29e25b523a5f"

      }

Is there a way to populate the create plan payload with values that will work for ESX?

icon

Best answer by etr.eric 23 October 2019, 17:43

View original

This topic has been closed for comments

4 replies

Userlevel 3
Badge +4

Hi etr.eric,

 

You can use the following for esxi:

{
"Spec": {
"Name": "New Migration Plan",
"SourceInfo": {
"ProviderReference": {
"UUID": "43135209-9903-4dc0-967e-aeaa16452015",
"RegionReference": {
"RegionID": ""
}
}
},
"TargetInfo": {
"ProviderReference": {
"UUID": "d84b0b81-aa21-40a3-97ae-7d8da2b42c17",
"ClusterReference": {
"UUID": "00057647-632f-1e05-0000-00000000863c",
"ContainerReference": {
"UUID": "7d0aa326-f735-4621-931f-f4ecbd2516de"
}
}
}
},
"Networks": [
{
"SourceID": "Dynamic-96",
"TargetUUID": "136d31cc-027d-476d-a489-517a119276f2"
}
],
"Workload": {
"Type": "VM",
"VMs": [
{
"AllowUVMOps": false,
"VMReference": {
"UUID": "50364dd1-9fd8-053a-5b45-add257d41f2e",
"VMID": "vm-102359"
},
"GuestPrepMode": "auto",
"RetainMacAddress": false
}
]
}
}
}

Please let us know if you require further assistance on the above - thanks

 

Badge +1

Thank you for the reply @Mutahir however, I get the same result when I try this. Really, other than the ordering and the addition of the VM id to the VM reference dictionary, this isn’t any different from what we were already trying.

 

Just to clarify, is the “SourceID” supposed to be the vmware moRef ID of the source portgroup?

Badge +1

I received some assistance from our Account team and was able to get this to work by using the network name as the “SourceId”.

Userlevel 3
Badge +4

I received some assistance from our Account team and was able to get this to work by using the network name as the “SourceId”.

Hi Etr.Eric, Glad to know you got it working as desired. you can write a post on how to create a esx to ahv migration plan on move or if you can share the complete spec / script - that will help the community as well. 

​​​