• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 446
  • Last Modified:

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
0
ipr0ute
Asked:
ipr0ute
  • 3
  • 3
1 Solution
 
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

0
 
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 ?
0
 
ipr0uteAuthor Commented:
How do I check if it is locked by another VM other then what I tried above?
0
Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial 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

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=10051

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003397
0
 
ipr0uteAuthor Commented:
I didn't waste my time chasing it down. Restarting the services fixed the issue.
0
 
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Network Scalability - Handle Complex Environments

Monitor your entire network from a single platform. Free 30 Day Trial Now!

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now