Unable to remove vCLS VMs from VMFS datastore in order to unmount the datastore
search cancel

Unable to remove vCLS VMs from VMFS datastore in order to unmount the datastore

book

Article ID: 419640

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

  • Post enabling vCLS retreat mode, it is observed that the vCLS VM deletion task on the vCenter fails with the error: "Invalid virtual machine state. Unable to delete the Virtual Machine as it has incomplete disk information. Ensure all disks are accessible before deleting, or detach inaccessible disks."

  • It is also observed that the "Remove from inventory" and "Delete from disk" options are greyed out for the vCLS VM.

  • On the vCLS VM's summary tab in the vSphere client, the following informational alert is seen: "Some of the disks of the virtual machine vCLS-##### failed to load. The information present for them in the virtual machine configuration may be incomplete."

  • Unable to unmount the VMFS datastore until the vCLS VMs are removed off of it.

Environment

VMware vSphere vCenter 7.x

VMware vSphere ESXi 7.x

Cause

  • The vCLS VM(s) fails to get deleted as its disk descriptor file is missing.

  • This can be validated by going to the VM's edit settings and inspecting the disk(s). The disk with the issue would show as "0" for size.

  • Alternatively, the VM's folder can be investigated to see if there are any missing files.

  • For vmdks on VMFS, there are two files for each VM disk - the ".vmdk" disk descriptor file and the "-flat.vmdk" data disk.

  • If the ".vmdk" file is missing the disk will fail to load.

Resolution

To delete the vCLS VM in this situation, the below two options are available:

  1. Remove the faulty disk from the vCLS VM:

    1. In the vSphere Client select the vCLS VM.

    2. Click on "Edit Settings" for the VM.

    3. Locate the hard disk with the issue.

    4. Click on the Remove button next to this disk. (the "X" icon).

    5. Save the changes.

    6. Post this, the VM will get deleted by the vCLS retreat mode.

  2. Un-register the VM directly from the ESXi host web client:

    1. Log into the ESXi host web client where the vCLS VM is registered.

    2. Navigate to the VM section and select the vCLS VM.

    3. Un-register the VM from here.

    4. Post this, the VM will get deleted by the vCLS retreat mode.

Once the vCLS VM(s) is removed from the VMFS datastore, the datastore can be unmounted successfully.

Additional Information

Refer following knowledge article for proper procedure to unmount datastore and decommission LUN - Detach a LUN device from ESXi hosts.