The manually deployed Edge can be converted to an auto deployed Edge using API.
1) The following values must first be prepared in advance to populate the body of the API.
vm_id
On the vSphere Client inventory, click on the Edge.
Inspect the browser url
https://vcsa.example.com/ui/app/vm;nav=h/urn:vmomi:VirtualMachine:vm-<id>:<uuid>/summary
vc_id
This is the Compute Manager ID
On NSX UI, System > Fabric > Compute Manager, copy the ID field
compute_id
On the vSphere Client inventory, click on the cluster or resource pool where the Edge is located
Inspect the browser url
If the Edge is in a cluster it will look like this
https://vcsa.example.com/ui/app/cluster;nav=h/urn:vmomi:ClusterComputeResource:domain-<id>:<UUID>/summary
If the Edge is in a resouce pool it will look like this
https://vcsa.example.com/ui/app/resourcepool;nav=h/urn:vmomi:ResourcePool:resgroup-<id>:<UUID>/summary
storage_id
On the vSphere Client inventory, click on the Edge, click on Datastores tab, click on the datastore
Inspect the browser url
https://vcsa.example.com/ui/app/datastore;nav=s/urn:vmomi:Datastore:datastore-<id>:<UUID>/summary
management_network_id
On the vSphere Client inventory, click on the Edge, click on Networks tab, click on the network used for management
Inspect the browser url
https://vcsa.example.com/ui/app/dvportgroup;nav=n/urn:vmomi:DistributedVirtualPortgroup:dvportgroup-<id>:<UUID>/summary
data_network_ids
On the vSphere Client inventory, click on the Edge, click on Networks tab, for each network used for TEPs/uplinks, click on the network
Inspect the browser url
https://vcsa.example.com/ui/app/dvportgroup;nav=n/urn:vmomi:DistributedVirtualPortgroup:dvportgroup-<id>:<UUID>/summary
"cpu_count" and "memory_allocation_in_mb"
On the vSphere Client inventory, click on the Edge, on the Summary tab note the CPU and Memory configuration.
2) Get the UUID of the Edge
On the NSX UI, System > Fabric > Nodes, copy the ID column of the Edge
3) Run the API to convert the Edge.
This action will result in a reconfigure task in vCenter but the Edge will not be redeployed.
POST https://NSX_Manager/api/v1/transport-nodes/<Edge ID from step 2>?action=addOrUpdatePlacementReferences
{
"vm_id": "vm-#####",
"vm_deployment_config": {
"vc_id": "<ID>",
"compute_id": "domain-####",
"storage_id": "datastore-####",
"management_network_id": "dvportgroup-##",
"ipv4_assignment_enabled": true,
"data_network_ids": [
"dvportgroup-##",
"dvportgroup-##"
],
"reservation_info": {
"memory_reservation": {
"reservation_percentage": 100
},
"cpu_reservation": {
"reservation_in_shares": "HIGH_PRIORITY"
}
},
"resource_allocation": {
"cpu_count": 4,
"memory_allocation_in_mb": 8192
},
"placement_type": "VsphereDeploymentConfig"
},
"node_user_settings": {
"cli_username": "admin",
"root_password": "<password>",
"cli_password": "<password>"
},
"node_settings": {
"hostname": "edge.example.com",
"enable_ssh": true,
"allow_ssh_root_login": true
}
}