ESXi files locked and Snapshot corrupt. How to fix it?

On our ESXi server, we have a problem that two of the files are on one volume and the remainder on another.  I am unable to copy them all to a single volume as they report as being locked when I try.

I have tried restarting the host, and the files are still locked. I am guessing it is a flag somewhere rather than a usual file lock where a restart would clear the locks.

I am not an expert with VMWare, although I have been using it for several years.  I have always managed to do everything I need via the GUI.  But this time, I cannot move forwards or backwards.  Can anyone suggest a way to unlock these files?  

Many thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Usually all file locks are released when the host has been restarted.

Moving virtual machines around with snapshots attached, could potentially corrupt the VM, also a VM running on a snapshot disk, most certainly will cause performance problems.

I would merge (delete) the snapshots with the parent disk before moving virtual machines.

Can you screenshot the VM folders, for me to have a look at the files.
townsmaAuthor Commented:
Many thanks for your reply.

I have been unable to do anything with snapshots, as everything reported an error saying they were corrupt.  

But by a stroke of luck I found a solution.  I renamed a dsk file that was called flat. Then instead of trying to copy the locked files to the original folder.  I deleted the vm from inventory.

I then copy all the other files to the locked files folder.  This was allowed.

I then created a new VM, that showed the state of suspended.  Where previously I could neither power of or on the vm, I could now power it off.

Once it was off, I was able to power it on again, and it started correct in the new location.

It then advised I needed to consolidate the VM, and that is now in progress.

So it appears the problem is solved.  Just in case I have taken a fresh backup of the entire VM from within the VM.

It has taken me three days of trying everything to get to this point.  I am only happy this VM only contained my company website, and not our email system or anything more critical.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Not sure, what is going on here, cannot comment, without further information.
townsmaAuthor Commented:
Many thanks for you input.  The VM is functioning normally again.  I do not know why, I am just happy that it is.  I took the steps described above, and it worked.

Thanks again for your assistance.
townsmaAuthor Commented:
I found the solution alone, and the advice given whilst good, was not relevant.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.