VMware HCX Virtual Machine stuck in protection is configured on this VM state
search cancel

VMware HCX Virtual Machine stuck in protection is configured on this VM state

book

Article ID: 434460

calendar_today

Updated On:

Products

VMware Cloud on AWS

Issue/Introduction

  • You cannot configure a virtual machine for Disaster Recovery after an HCX force removal operation.
  • The virtual machine appears under unactionable VMs with the specific error message: Protection is configured on this VM.
  • Restarting HCX app-engine services on the source and destination sites does not resolve the behavior.
  • Validation from vCenter and ESXi confirms vSphere Replication is not actively enabled on the virtual machine.
    • Connect to the console of the production site ESXi host which is hosting the virtual machine you want to verify.
    • Run the command to get the virtual machine ID:
      • # vim-cmd vmsvc/getallvms
    • Run the command including the <VM_ID> to check and verify the current replication configuration:
      • # vim-cmd hbrsvc/vmreplica.getConfig <VM_ID> 
      • Example output of a virtual machine where VR is not enabled.
    • Command details to check if vSphere Replication is enabled on a VM are included in Disabling VMware vSphere Replication on a virtual machine

Environment

VMware HCX

Cause

Stale vSphere Replication protection state metadata remains attached to the virtual machine Managed Object Reference (MoRef) ID within the vCenter Server inventory.

Resolution

Removing and re-registering a virtual machine in vCenter Server generates a new Managed Object Reference (MoRef) ID.

  1. Pause the protect Reverse operation on HCX
  2. Schedule an appropriate maintenance window and power down the affected virtual machine.

  3. In the vCenter Server inventory, right-click the affected virtual machine and select Remove from Inventory.

  4. Navigate to the datastore containing the virtual machine files.

  5. Locate the virtual machine's .vmx file, right-click it, and select Register VM to add it back to the vCenter Server inventory.

  6. Power on the virtual machine if required.

  7. Navigate to the VMware HCX interface and proceed with configuring Disaster Recovery for the virtual machine.d