"The operation is not allowed in the current state of the host" when cloning VMs
search cancel

"The operation is not allowed in the current state of the host" when cloning VMs

book

Article ID: 462682

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server

Issue/Introduction

When attempting to clone a virtual machine (VM) via PowerCLI or the vSphere Client, the operation fails with the following error:

"The operation is not allowed in the current state of the host."

This issue occurs despite the host appearing to be connected and active. The error is limited to cloning operations; other tasks such as Power On, vMotion, or Reconfigure continue to function normally.

Environment

VMware ESX 9.x
VMware vCenter 9.x

Cause

This issue is caused by a stale "vm-prov EMM latch" on the affected ESXi hosts. This latch is an in-memory flag in the vpxd service that wrongly indicates the host is still in (or entering) Maintenance Mode, even after the host has exited that state. This typically occurs if a previous Maintenance Mode task was interrupted or encountered an error.

Resolution

To clear the stale data and restore cloning functionality, use one of the following methods.

Method 1: Restart the vpxd service (Recommended)

Restarting the vpxd service forces vCenter to refresh the host status and clear stale latches.

  1. Log in to the vCenter Server Appliance (VCSA) as root over SSH.
  2. If necessary, enter the bash shell by typing shell.
  3. Restart the vpxd service:
    bash
    service-control --restart vmware-vpxd
  4. Verify the service is running:
    bash
    service-control --status vmware-vpxd

Note: The vSphere Client may take several minutes to reload and display the hosts as "Connected" after the service restarts.

Method 2: Cycle Maintenance Mode

If a vpxd restart is not feasible, performing a Maintenance Mode cycle on the affected hosts can also reset the latch.

  1. Ensure the host is not currently in Maintenance Mode.
  2. Place the affected ESXi host into Maintenance Mode.
  3. Once the host has successfully entered Maintenance Mode, Exit Maintenance Mode.

Verification

After performing either of the above steps, attempt the clone operation again. It should now complete successfully.

Additional Information

Important Considerations

  • No ESXi host reboot is required: Rebooting or reconnecting the ESXi host does not resolve the issue, as the stale latch is held in vCenter (vpxd) memory.
  • Service Impact: Ensure no other long-running tasks (such as large remediation or vMotion operations) are active on the vCenter before restarting the vpxd service, as this will interrupt them.