Programmers learn & share
0 votes
49 views

Problem :

I have received the following error message:

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

Cannot open the disk 'C:\Users\t825665\VM's\VPC\Windows 10 x64.vmdk' or one of the snapshot disks it depends on.

Module 'Disk' power on failed.

Failed to start the virtual machine.

I guess my virtual machine is not starting anymore. Any clue how to fix that?

by (6.9k points)   | 49 views

1 Answer

0 votes

Solution :

I had faced the same error in the recent past. I did lot of research and found below solution.

I just ran the batch file whose code is given below it delete all temporary files , locks, directories and also memory files in the VMWare Working Directory (e.g.. Settings/Options/Working Directory). It helped me to get out of many Jams.

Please Note: You will lose your any unsaved work that was in VMWare suspended memory so please take the backup before using following batch file  if you are not sure. It will reboot the image as if it was just shutdown.

--------------------------Clean.bat ----------------

@echo off
REM  - Delete all directories in Working Directory
set dr=%cd%
set ex=\*
set "dr=%dr%%ex%"
for /d %%a in ("%dr%") do rd "%%a" /q /s  
REM - Delete files in Working Directory
del *.log
del *.vmem
del *.vmss
del *.nvram
del *.vmx~
pause

by (36.1k points)  
2,245 questions
2,807 answers
60 comments
241 users