Unable to migrate VM with error: "The attempted operation cannot be performed in the current state (Powered off)"
search cancel

Unable to migrate VM with error: "The attempted operation cannot be performed in the current state (Powered off)"

book

Article ID: 436221

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESX 7.x VMware vSphere ESX 8.x

Issue/Introduction

Symptoms

  • Failed to migrate VM with the error:  "The attempted operation cannot be performed in the current state (Powered off)"
  • Failed to enter maintenance mode for the ESXi host on which this VM is registered 
  • Previously exported this VM as an OVF/OVA file
  • When migrating a virtual machine, you will see logs like the following in hostd.log.
    YYYY-MM-DDThh:mm:ss.000Z error hostd[0000] [Originator@0000 sub=Vmsvc.vm:/vmfs/volumes/xxxx/xxxx/<vm-disk-path>.vmx opID=xxxxxx-xxxxx-auto-fbhr-h5:xxxx-xx-xx-xx-xxxx user=vpxuser:VSPHERE.LOCAL\Administrator] Invalid transition requested (VM_STATE_EXPORTING -> VM_STATE_UNREGISTERING): Invalid state

Environment

VMware vSphere ESXi 7.0

VMware vSphere ESXi 8.0

Cause

This issue is caused by deadlock in exporting OVA.
As a result, ESXi host agent does not change the state of this VM from VM_STATE_EXPORTING to the original state.

This is caused by the same issue described in the KB article below. In addition to powering on a VM, changes to the VM's status are also affected by this issue like a migrating VM.
Unable to power on VM with error: "The attempted operation cannot be performed in the current state (Powered off)"

Resolution

This issue is fixed in VMware ESXi 8.0 Update 2 and VMware ESXi 7.0 Update 3q.  
This is a known issue affecting ESXi 7.0 or later and older than 7.0 U3q.

Workaround:
This issue can be resolved by restarting ESXi host daemon.
 
# /etc/init.d/hostd restart

Additional Information