Storage vMotion compatibility Error: "The operation is not allowed in the current state of datastore"
search cancel

Storage vMotion compatibility Error: "The operation is not allowed in the current state of datastore"

book

Article ID: 303137

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • Attempting to perform Storage vMotion reflects compatibility error- The operation is not allowed in the current state of datastore
  • When attempting to create or register a virtual machine, the task fails with a similar status error:
    "The operation is now allowed in the current state of the datastore. Datastore disabled (Low Free Space)"
  • The datastores appear to have enough free space within the vCenter UI.

Environment

VMware vCenter Server
VMware vSphere ESXi

Cause

The backing storage array has ran out of space or is oversubscribed.

Resolution

Note: This is a destructive operation. Please ensure that all necessary backups and snapshots are taken prior to proceeding with the steps below to avoid any issue

  • Identify the Disabled Datastores
    1. Take Snapshot of the vCenter VM
      Note: If in linked mode take Offline Snapshot of all the vCenter VMs.
    2. SSH to the vCenter via root
    3. Connect to the VCDB

      /opt/vmware/vpostgres/current/bin/psql -U postgres VCDB

    4. Run the following command to identify if disabled datastores are present:

      select thin_prov_space_flag,name from vpx_datastore;

      Note: An output with any 1s indicate a disabled datastore due to space. When a storage array runs out of thin space, the array will send an iSCSI command to the ESXi host. The ESXi host in turn will notify vCenter and vCenter will update the default value of 0 to a 1. Refer to KB Thin-provisioned storage devices met soft threshold for further information.
  • Change the thin_prov_space_flag Value From 1 to 0
    1. Stop the vCenter service

      service-control --stop vpxd

    2. Connect to the VCDB

      /opt/vmware/vpostgres/current/bin/psql -U postgres -d VCDB
    3. Identify the associated IDs to datastores

      select id,thin_prov_space_flag from vpx_datastore where thin_prov_space_flag = 1;

      Example Output

      id | thin_prov_space_flag
      -------+----------------------
      82027 | 1 
      82028 | 1
      82029 | 1
      82030 | 1
      82031 | 1
      82071 | 1
      82073 | 1
      93670 | 1

    4. Update the thin_prov_space_flag from 1 to 0

      update vpx_datastore set thin_prov_space_flag=0 where id=<id>;

    5. Verify the value has been updated from 1 to 0

      select id,thin_prov_space_flag from vpx_datastore;

    6. Restart all vCenter Server services

      service-control --stop --all;service-control --start --all

    7. Attempt to create or register the virtual machine

Note: If the thin_prov_space_flag reverts to a value of 1, review the storage array directly. Additional space may need to be added to the array.

Additional Information