VMware Template Error "Unable to access file since it is locked"

I have a VMware template I'm trying to create a new guest with and I'm getting the error "Unable to access file since it is locked".

Unable to access file since it is locked
I tried the following so far:
1. Convert template into a VM
2. Remove VM from inventory
3, Add VM back into inventory
4. Convert VM back into a template
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

ipr0uteAuthor Commented:
I also just did these steps:

1. Login as root to the ESX host.
2 . Change to the working directory of the template.
3. Ran this command:
vmkfstools -D WIN2K12R2STDDEV.vmdk | tail -f /var/log/vmkernel.log | grep -i owner

Open in new window

4. I got this result:
gen 233, mode 0, owner 00000000-00000000-0000-000000000000 mtime 398843

Open in new window

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Restart the host.

This template file is not in use by any other VMs ?

Backup Application ?
ipr0uteAuthor Commented:
How do I check if it is locked by another VM other then what I tried above?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
To be honest, I would not bother, it's often a wild goose chase, and waste of time....

Mode 0 - suggests no lock.

You could try vCenter Server Service restart, and network management agents restart

but here goes...

see here



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
ipr0uteAuthor Commented:
I didn't waste my time chasing it down. Restarting the services fixed the issue.
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Locked Hung Process in vCenter!

I meant it's a waste of time looking for locks....... with lsof and vmkfstools.....

e.g. the data report no lock, but vCenter reported a lock!

hey glad it's fixed, but if that didn't work, reboot is the only option.
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.