Snapshot using a Snapshot Manager fails with the error: Operation not allowed in current state
search cancel

Snapshot using a Snapshot Manager fails with the error: Operation not allowed in current state

book

Article ID: 334177

calendar_today

Updated On:

Products

VMware vCenter Server 6.0 VMware vCenter Server 7.0 VMware vCenter Server 8.0 VMware vSphere ESXi 6.0 VMware vSphere ESXi 7.0 VMware vSphere ESXi 8.0

Issue/Introduction

Symptoms:
  • Attempting a snapshot for a virtual machine using Snapshot Manager, or VMware Consolidated Backup or a third party backup solution such as vRanger fails.
  • You see these errors in vCenter Server:

    Cannot create snapshot
    Operation not allowed in current state


     
  • The virtual machine, VMware vCenter Server and the host appear to be running without problems, but the error persists.
  • The hostd.log file on the host contains entries similar to:

    [YYYY-MM-DDTHH:MM:SS.Z xxxxxxxxxx error 'vm:/vmfs/volumes/ xxxxxxxxxx-xxxxxxxxxx-xxx- xxxxxxxxxx/VMNAME/VMNAME.vmx'] Invalid transition requested (VM_STATE_ON_SHUTTING_DOWN -> VM_STATE_CREATE_SNAPSHOT): Invalid state

     


Environment

vSphere 6.x
vSphere 7.x
vSphere 8.x

Cause

This issue occurs if the vCenter Server management agents have stopped causing the snapshot attempt to move in to the ON_SHUTTING_DOWN state.

Resolution

To resolve this issue, restart the VMware agents on the host.

To restart the agents:
  1. Ensure that the Virtual machine startup / shutdown with host feature is disabled before this step. 
  2. Restart the management agents on the host. For more information, see Restarting the Management agents in ESXi
  3. On vCenter Server, restart the VMware Virtual Center service. For more information, see How to stop, start, or restart vCenter Server services
  4. Attempt the snapshot again.
  5. The operation succeeds and the corresponding log entry for the snapshot attempt reflects a transition from ON to CREATE SNAPSHOT instead of ON_SHUTTING_DOWN.



Workaround:

  • This issue can occur when the PCI device is attached to virtual machine. Snapshots are not supported with the PCI devices.  
  • To resolve the issue, remove the PCI device to create the snapshot or power off the virtual machine and take a snapshot.



Additional Information

Default locations of the hostd.log file are located at:

  • ESXi 6.x and above: /var/log/