Title: Alarm for edge.edge_vm_present_in_nsx_inventory_not_present_in_vcenter
Event ID: edge.edge_vm_present_in_nsx_inventory_not_present_in_vcenter
Alarm Description:
"The VM <edge_vm_name> with moref id <vm_moref_id> corresponding to the Edge Transport node <edge_node_uuid> vSphere placement parameters is found in NSX inventory but is not present in vCenter. Check if the VM has been removed in vCenter or is present with a different VM moref id."
NSX-T Datacenter
Steps to Resolve
For 3.2.1 and higher
Case 1 : If the Edge VM is present in vCenter with a different moref id, please follow the below action.
Use the NSX add or update placement API to update the new vm moref id for this auto deployed edge node.
NSX add or update placement API: POST https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/<transport node id>?action=addOrUpdatePlacementReferences
* you can run the following API call to get the configurations of the node to use in the body for the next stepGET https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/
-------> search the output for the edge name and locate the external id
GET https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/<edge node UUID from above>
**it is recommended to validate the updated payload for the API by using a json checker such as jsonlint.com
Craft an API request payload that consists of 4 fields using the following steps:
GET https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/<edge UUID>
GET https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/<edge UUID>
Sample Payload:
{
"vm_deployment_config" : {
"vc_id" : "36895c2f-####-####-####-d3eb2485576d",
"compute_id" : "resgroup-42",
"storage_id" : "datastore-17",
"compute_folder_id" : "group-v38",
"management_network_id" : "f7cc6be7-####-####-####-89abfe889834:########-vif1",
"management_port_subnets" : [ {
"ip_addresses" : [ "##.##.##.##" ],
"prefix_length" : 19
} ],
"default_gateway_addresses" : [ "##.##.##.##" ],
"data_network_ids" : [ "5d069776-####-####-####-8e31eaa289df:########-vif2" ],
"reservation_info" : {
"memory_reservation" : {
"reservation_percentage" : 100
},
"cpu_reservation" : {
"reservation_in_shares" : "NORMAL_PRIORITY",
"reservation_in_mhz" : 9196
}
},
"resource_allocation" : {
"cpu_count" : 4,
"memory_allocation_in_mb" : 8192
},
"placement_type" : "VsphereDeploymentConfig"
},
"node_settings" : {
"hostname" : "########-##-##-##-##",
"ntp_servers" : [ "##.##.##.##" ],
"dns_servers" : [ "##.##.##.##" ],
"enable_ssh" : true,
"allow_ssh_root_login" : true,
"syslog_servers" : [ {
"server" : "##.##.##.##",
"port" : "514",
"protocol" : "TCP",
"log_level" : "INFO"
} ],
"enable_upt_mode" : false
},
"node_user_settings":{
"cli_username":"#####",
"root_password":"<password>", <<<<<<<< edge node root password
"cli_password":"<password>" <<<<<<<< edge node cli password
},
"vm_id":"vm-1003"
}
Case 2 : If the Edge VM with name <vm_name> is not present in vCenter, use the NSX Redeploy API to deploy a new VM for the Edge node.
NSX Redeploy API: POST https://<NSX manager IP/FQDN>/api/v1/transport-nodes/<transport node id>?action=redeploy
GET
https://<NSX Manager IP/FQDN>/api/v1/transport-nodes/<transport node id>
POST https://<NSX manager IP/FQDN>/api/v1/transport-nodes/<transport node id>?action=redeploy