Error "Another task is already in progress" during VM power on due to stale CBT files in VMware vCenter Server
search cancel

Error "Another task is already in progress" during VM power on due to stale CBT files in VMware vCenter Server

book

Article ID: 440973

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

A virtual machine (VM) fails to power on with an error indicating another task is in progress.

Symptoms:

  • Virtual machine power-on task hangs at 33 or 66 percent.
  • Third-party backup snapshot deletion/consolidation tasks are interrupted or cancelled
  • The /vmfs/volumes/<datastore_name>/<vm_folder>/vmware.log of the VM contains the following entries:
    DISKLIB-CTK : Could not open change tracking file "/vmfs/volumes/<datastore_name>/<vm_folder>/<vm_name>-ctk.vmdk": Change tracking invalid or disk in use.
    DISKLIB-CTK : Error creating file ... 3 (The file already exists)

Environment

  • VMware vSphere ESXi 8.x
  • VMware ESX 9.x
  • VMware vCenter Server 8.x
  • VMware vCenter 9.x

Cause

A snapshot remaining, but not being visible in the Snapshot Manager indicates that the request for snapshot removal was sent and received, but the snapshot consolidation did not complete successfully.
This often leaves the virtual machine in a state where it displays a "Consolidation is needed" alert.
>A lock on the VMDK files of that virtual machine can hinder the snapshot removal process. This lock is often caused by the VMDK still being attached using Virtual Appliance transport mode or the VMDKs being locked by the ESXi host.

Resolution

To resolve this issue, take the following steps:

  1. Open an SSH connection with the ESXi hosts the VM is running on, and login with the root account.
  2. Verify that no active third-party backup appliance is holding a lock on the base disk with:
    # vmfsfilelockinfo -p /vmfs/volumes/<datastore_name>/<vm_folder>/<vm_name>-flat.vmdk
  3. Navigate to the virtual machine directory:
    # cd /vmfs/volumes/<datastore_name>/<vm_folder>/
  4. Create a temporary folder inside of the VM folder and move all *.vmsd, *.ctk.vmdk and *.vmsn files into this temporary directory:
    # mkdir temp
    # mv *-ctk.vmdk temp
    # mv *vmsd temp
    # mv *.vmsn temp
  5. Create a backup of the virtual machine's configuration file:
    # cp vm-name.vmx vm-name.vmx.bak
  6. Disable CBT in the configuration file (.vmx). Open the <vm_name>.vmx file using the VI editor and set the following parameters to false:
    ctkEnabled = "false"
    scsi#:#.ctkEnabled = "false"
  7. Identify the virtual machine ID:
    # vim-cmd vmsvc/getallvms
  8. Reload the virtual machine configuration:
    # vim-cmd vmsvc/reload <vm_ID>
  9. Power on the virtual machine using vSphere Client.

Additional Information