VMware Cloud Community
claudio_ninin
Contributor
Contributor

Virtual machine disks consolidation is needed

I have this issue message on my VM: Virtual machine disks consolidation is needed.
When I try make the consolidation I get theses errors:

2023-12-15T12:17:39.376Z verbose hostd[2099422] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/6425c3cd-b6c6eb29-0f44-089204a454e6/VM-FLS01/VM-FLS01.vmx opID=lp1uykzu-52285-auto-14ce-h5:70010938-7-01-01-c4-ce64] Consolidate Disks translated error to vim.fault.FileLocked
....
2023-12-15T12:17:39.494Z info hostd[2099956] [Originator@6876 sub=DiskLib opID=lp1uykzu-1307-auto-10c-h5:70000716-5f-01-01-eb-7f70] DISKLIB-CTK : Could not open change tracking file "/vmfs/volumes/6425c3cd-b6c6eb29-0f44-089204a454e6/VM-FLS01/VM-FLS01-000095-ctk.vmdk": Could not open or create change tracking file.

Could you help me?

0 Kudos
7 Replies
pcgeek2009
Hot Shot
Hot Shot

Do you have a backup product that does image-level snapshots and backups? I would see this with Avamar and it usually meant one of the proxies for copying the files out had kept a lock on the file. I would have to disconnect it from the backup proxy and then manually consolidate the disk. 

0 Kudos
claudio_ninin
Contributor
Contributor

I'm using the Acronis to do my backup. I'll disable and try the consolidation again.

0 Kudos
pcgeek2009
Hot Shot
Hot Shot

You may want to try to right-click and select "Delete All Snapshots" after that just in case there is one left. Acronis also has a KB on cleaning up snapshots if needed: https://kb.acronis.com/content/32611?ckattempt=1

0 Kudos
claudio_ninin
Contributor
Contributor

Unfortunily my problem has been persisted.
I don't have a Acronis Appliance on my VMWare. I turned off the agent backup on my VMware and tried delete all snapshots (I can't see anyone on the VMWare) and I tried consolidated too but I sill have the same problem.

2023-12-15T14:41:23.155Z verbose hostd[2100563] [Originator@6876 sub=Vigor.Vmsvc.vm:/vmfs/volumes/6425c3cd-b6c6eb29-0f44-089204a454e6/VM-FLS01/VM-FLS01.vmx opID=lp1uykzu-52285-auto-14ce-h5:70010938-7-01-01-c4-ce64] Consolidate Disks message: Consolidation failed for disk node 'scsi0:0': Failed to lock the file.

2023-12-15T14:41:23.210Z info hostd[2099424] [Originator@6876 sub=DiskLib opID=lp1uykzu-52285-auto-14ce-h5:70010938-7-01-01-c4-ce64] DISKLIB-CTK : Could not open change tracking file "/vmfs/volumes/6425c3cd-b6c6eb29-0f44-089204a454e6/VM-FLS01/VM-FLS01-000096-ctk.vmdk": Could not open or create change tracking file.

0 Kudos
pcgeek2009
Hot Shot
Hot Shot

There could be a snapshot that is still in the folder for the VM. You would need to go to the storage, the folder for the VM, then open it. If there is a "forgotten snapshot", it would be something like <VMname>_1-000001.vmdk". 

If you have another datastore, you could see if doing a storage vmotion will resovlve the issue. I have used that to fix issues before. 

0 Kudos
BarryGrowler
Enthusiast
Enthusiast

First, check for and delete any leftover snapshot files in the VM's datastore folder that may be causing locks. Then, try a Storage vMotion to another datastore to potentially clear up the issue. Ensure your backup software like Acronis is properly configured and not holding locks or snapshots on the VM files - disable it temporarily if needed. Reboot the ESXi host hosting the VM as that could release lingering locks. Verify sufficient datastore space for consolidation.

0 Kudos
drdoc_fred
Enthusiast
Enthusiast

this is the recipe I follow, you are on step 2:

  1. Ensure that there is enough space on the datastore to perform consolidation. The VM disk/disks might be residing on a datastore which has less than 1 GB available space.

  2. Check if a third-party backup application (like Veeam, Unitrends, Dataprotect) has locked snapshot files and failed to remove the snapshot after completing backups or failed to initiate backups.

  3. Check for any vCenter server and the ESXi host connectivity issues.

  4. If there are more than the VMware recommended number of snapshots (32), consolidation may fail. In this case, reduce the number of snapshots.

  5. If large snapshots are undergoing consolidation, the VM may show as unresponsive/frozen but the alert continues to show up. In this case, you might need to wait for the consolidation to complete.

  6. If the issue persists, you might need to manually consolidate the snapshots. For more information, refer to the Consolidate Snapshots guide.

  7. If the issue still persists, you might need to investigate virtual machine file locks on ESXi hosts. For more information, refer to the Investigating virtual machine file locks on ESXi guide.

0 Kudos