All Posts

Failed to start the virtual machine

How to fix: Failed to start the virtual machine

Virtual machines (VMs) allow users to run multiple operating systems on a single machine. They’re essential for developers, IT professionals, and businesses. One common frustrating issue is the “locked file” error, which prevents a VM from starting.

Error Trace:

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

Cannot open the disk ‘C:\testingdocs\Windows 10 OracleDB\Windows 10 Demo.vmdk’ or one of the snapshot disks it depends on.

Module ‘Disk’ power on failed. Failed to start the virtual machine.

Screenshot

Windows Virtual Machine Error

 

What is a Locked File Error?

A locked file error happens when a virtual machine is unable to access a file it needs to boot. This issue arises because another process or instance has locked the file, making it unavailable.

Common Causes

  • Improper VM Shutdown: The VM didn’t close properly, leaving residual lock files.
  • Concurrent Access: Multiple users or applications trying to access the same VM.
  • Host System Crash: A sudden crash can leave lock files lingering.
  • Software Bugs: Glitches in the virtualization platform.

Steps to Fix a Locked File Issue

Try to Restart the Virtual Machine.
Often, a simple restart clears temporary locks.

  • Power Off the VM. Proper Shutdown of the Virtual Machine.
  • Navigate to the VM’s directory on the host system.
  • Locate and Remove the Lock File.

 

VM Lock File

  • Look for files with extensions like .lck or .lock.
  • Delete these files manually.
  • Reboot the Host System: This ensures no background processes are interfering.
  • Start the VM.