VMware

To move the CBT files and consolidate snapshots:
  1. SSH to Host
  2. Navigate to the VM folder using this command: cd /vmfs/volumes/datastore/virtual_machine/
  3. Create a temporary directory for the CBT files. mkdir temp
  4. Move the CBT files to temp directory. mv *-ctk.vmdk temp/
  5. Run the snapshot consolidation again.
To disable these warnings using vSphere Client:
  1. Select the ESXi host from the Inventory.
  2. Click the Configuration tab.
  3. Click Advanced Settings in the Software menu.
  4. Navigate to UserVars > UserVars.SuppressShellWarning.
  5. Set the value from 0 to 1.
  6. Click OK.
To disable these warnings using esxcli:
  1. Connect to the ESXi host through SSH using root credentials.
  2. Run this command:vim-cmd hostsvc/advopt/update UserVars.SuppressShellWarning long 1  
To enable these warnings using esxcli:
  1. Connect to the ESXi host through SSH using root credentials.
  2. Run this command:vim-cmd hostsvc/advopt/update UserVars.SuppressShellWarning long 0
To set the parameter snapshot.asyncConsolidate.forceSync to TRUE using the vSphere client: 1. Shut down the virtual machine. 2. Right-click the virtual machine and click Edit settings. 3. Click the Options tab. 4. Under Advanced, right-click General 5. Click Configuration Parameters, then click Add Row. 6. In the left pane, add this parameter: snapshot.asyncConsolidate.forceSync 7. In the right pane, add this value: TRUE 8. Click OK to save your change, and power on the virtual machine. OR this Powercli command: get-vm virtual_machine_name | New-AdvancedSetting -Name snapshot.asyncConsolidate.forceSync -Value TRUE -Confirm:$False Taken from https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2082886
If you receive the following error another VM likely has the disk mounted, probably from a backup process. Shutdown the VM, remove the disk, restart the VM. In some cases you may need to reboot the ESX.
An error occurred while consolidating disks: msg.snapshot.error-DISKLOCKED
An error occurred while consolidating disks: msg.fileio.lock.