VM morefid alarms after NSX-T Edge cross-vCenter vmotion
search cancel

VM morefid alarms after NSX-T Edge cross-vCenter vmotion

book

Article ID: 373426

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

After NSX-T edge cross-vCenter vmotion while both the vCenters are registered in NSX manager as compute managers, there might be alarms generated on NSX UI for missing VM morefid from vCenter:

Environment

VMware NSX-T Data Center

VMware NSX

 

Cause

  • The VM deployment config parameters are still mapped with the old vCenter values after cross-vCenter migration, while the edge node has been migrated to another vCenter.
    Since the NSX manager still has the old vm_id mapped for the edge node that was present during the deployment in the old vCenter, it reports for the missing morefid from the old vCenter.
  • This can be verified using the below GET API call:
    GET https://<manager-ip>/api/v1/transport-nodes/<tn-id> 
  • Updating just the vm_id of the edge node that is present in the new vCenter using addOrUpdatePlacementReferences API call will throw the below error:

Resolution

++ Make a note of the output returned in the GET API call for the edge transport node reporting the alarms:
GET https://<manager-ip>/api/v1/transport-nodes/<tn-id> 

++ The below parameters will need to be updated for the edge VM as per the new vCenter values:
POST https://<manager-ip>/api/v1/transport-nodes/<tn-id>?action=addOrUpdatePlacementReferences



"deployment_config": {
            "vm_deployment_config": {
                "vc_id": "#####-#####-#####-####-#######",
                "compute_id": "domain-#####",
                "storage_id": "datastore-#####",
                "host_id": "host-####",
                "compute_folder_id": "group-#####",
                "management_network_id": "dvportgroup-####",
                "ipv4_assignment_enabled": true,
                "management_port_subnets": [
                    {
                        "ip_addresses": [
                            "#.#.#.#"
                        ],
                        "prefix_length": 23
                    }
                ],
                "default_gateway_addresses": [
                    "x.x.x.x"
                ],
                "data_network_ids": [
                    "dvportgroup-####",
                    "dvportgroup-####"
                ],
                "reservation_info": {
                    "memory_reservation": {
                        "reservation_percentage": 100
                    },
                    "cpu_reservation": {
                        "reservation_in_shares": "HIGH_PRIORITY",
                        "reservation_in_mhz": 0
                    }
                },
                "resource_allocation": {
                    "cpu_count": 8,
                    "memory_allocation_in_mb": 32768
                },
                "placement_type": "VsphereDeploymentConfig"
            },
            "node_user_settings": {
                "cli_username": "admin"
            }
        },
        "node_settings": {
            "hostname": "xxxxxxxx",
            "search_domains": [
                "xxxx"
            ],
            "ntp_servers": [
                "#.#.#.#",
                "#.#.#.#"
            ],
            "dns_servers": [
                "#.#.#.#",
                "#.#.#.#"
            ],
            "enable_ssh": true,
            "allow_ssh_root_login": false,
            "syslog_servers": [
                {
                    "server": "#.#.#.#",
                    "port": "###",
                    "protocol": "TCP",
                    "log_level": "INFO"
                }
            ],
            "enable_upt_mode": false
        },
          "vm_id": "vm-####"
}

 

 

All of the above-highlighted values can be found in the URLs by navigating to the below paths in vCenter:

  • compute_id >>  Datacenter in which the edge node resides
  • storgae_id >> Datastore that is being used by the edge node
  • host_id >> Host on which the edge node resides
  • compute_folder_id >> Folder in which the edge VM is placed in vCenter (in Virtual Machines tab)
  • management_network_id >> Click on the management network of the Edge VM
  • data_network_ids >> Click on the data networks being used by the Edge VM
  • vm_id >> Click on the edge node in vCenter
  • vc_id >> New vCenter UUID, can be found in compute managers in NSX UI.

 

++ The alarms might not get resolved even after updating the deployment config parameters per the values present in new vCenter.
We can run the below redeploy API call now for the edge node:
POST https://<manager-ip>/api/v1/transport-nodes/<tn-id>?action=redeploy

Since the deployment config parameters were updated as per new vCenter values, NSX manager will now try to redeploy the node in the new vCenter itself.