Friday, December 3, 2021

The Process Cannot Access the File Because Another Process has Locked a Portion of the File

Sometimes, we failed to start or power on our virtual machines and it displays the below error message.
 

" The process cannot access the file because another process has locked a portion of the file. "


In this tutorial, we will know how to resolve that issue. Every virtual machine is made of some configuration files and those files are stored in that virtual machine's home directory. If any of the configuration files are being blocked by the VMware Workstation program then that virtual machine will fail to start and will show up the below error message. 




If any configuration files are being blocked then a new folder will be created with that file name. That folder name will have an extension called ".lck". For example, the folder name will be " TestVM.vmx.lck ". One snapshot is given below as an example. Those are all the lock folders that are created with the same file name that is being locked by the program.




To resolve this issue we have to have removed or deleted that locked folder from the virtual machine home directory. That's it. Now the virtual machine should run without any issues. If you find any locked files with the .lck extension like the locked folder that also have to be deleted.

If you have doubts about the virtual machine home directory path or the locked folder or file path then you can find it from that error message.




That's all. Please make sure that if any lock files (filename with .lck extension) are available those are also deleted.

No comments:

Post a Comment