vMotion fails for Virtual Machines connected to an NSX Segment that does not exist on NSX Manager
search cancel

vMotion fails for Virtual Machines connected to an NSX Segment that does not exist on NSX Manager

book

Article ID: 432893

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • vMotion fails, and the following entries are observed in /var/run/log/nsx-syslog.log on the destination ESXi host:
    <timesatmp> nsx-opsagent[pid]: NSX [pid] - [nsx@6876 comp="nsx-esx" subcomp="opsagent" s2comp="nsxa" tid="<tid>" level="ERROR" errorCode="MPA41511"] [ProcessReceiveMessages] VIF response returned operation failure: The requested object : LogicalSwitch/<LogicalSwitch_Id> could not be found. Object identifiers are case sensitive.
    <timesatmp> nsx-opsagent[pid]: NSX [pid] - [nsx@6876 comp="nsx-esx" subcomp="opsagent" s2comp="nsxa" tid="<tid>" level="INFO"] [MP_AddVnicAttachment] RPC call [<Id>] to NSX management plane completed in [0] sec
    <timesatmp> nsx-opsagent[pid]: NSX [pid] - [nsx@6876 comp="nsx-esx" subcomp="opsagent" s2comp="nsxa" tid="<tid>" level="ERROR" errorCode="MPA42003"] [DoMpVifAttachRpc] MP_AddVnicAttachment() failed: The requested object : LogicalSwitch/<LogicalSwitch_Id> could not be found. Object identifiers are case sensitive.
  • Additionally, the following entries are observed in /var/run/log/hostd.log on the destination ESXi host:
    <timestamp> info hostd[pid] [Originator@6876 sub=Hostsvc opID=<opID> user=vpxuser] AttachPort requested for vif: [<Vif_id>], network: [<LogicalSwitch_Id>:nsx.LogicalSwitch], vmx: [<Vmx_File_Path>]
    <timestamp> error hostd[pid] [Originator@6876 sub=Vmsvc.vm:<Vmx_File_Path opID=<opID> user=vpxuser] ProcessOpaqueNetChanges: Failed to attach all ports
    <timestamp> info hostd[pid] [Originator@6876 sub=Solo.Vmomi opID=<opID> user=vpxuser] Throw vim.fault.PlatformConfigFault
    <timestamp> info hostd[pid] [Originator@6876 sub=Solo.Vmomi opID=<opID> user=vpxuser] Result:
    --> (vim.fault.PlatformConfigFault) {
    -->    text = "Failed to attach all ports",
    -->    msg = "",
    --> }
  • Performing a GET request to the NSX Manager API for the specific segment returns a NOT_FOUND error:
    GET /api/v1/logical-switches/<LogicalSwitch_Id>
    {
      "httpStatus" : "NOT_FOUND",
      "error_code" : 600,
      "module_name" : "common-services",
      "error_message" : "The requested object : LogicalSwitch/<LogicalSwitch_Id> could not be found. Object identifiers are case sensitive."
    }

Environment

VMware NSX

Cause

This issue occurs because the Virtual Machine is connected to an NSX Segment that has already been deleted from the NSX Manager for some reason.

Resolution

Please perform the following steps to ensure a successful vMotion.

  1. Using the vSphere Client, change the network backing of the affected Virtual Machine to a network other than an NSX Segment (e.g., a standard switch port group).
  2. Wait approximately two hours to allow for the internal virtual port information to update.
  3. If necessary, reconnect the Virtual Machine to a valid NSX Segment.
  4. Attempt the vMotion again.