Virtual machine disks consolidation is needed.

I faced this issue in my environment multiple times now. If I try to consolidate I get an error message “Unable to access file since it is locked”

An easy way to get this resolved is, you shutdown the virtual machine and afterwards migrate it to a different host and datastore. After this migration you can consolidate using the normal consolidate function in the Snapshot menu.

I know shutdown is sometimes not possible but it case it is this will work without any issue.