24.01.2013 · The errors in the event log are as follows: <VM Name>: Attachment <path to VHD>' failed to open because of error: 'The process cannot access the file because it is being used by another process.' (7864368). '<VM name>' failed to add device 'Virtual Hard Disk'.
04.08.2016 · A VHDX mimics a hard disk. It is not related to formats, such as NTFS or FAT or EXT3. It is also not concerned with partitions. VHDX presents the same characteristics as a physical hard drive, or SSD, or SAN LUN, or any other block storage. It is up to some other component, such as the guest operating system, to define how the blocks are used.
08.10.2020 · System.IO.IOException: The process cannot access the file 'ext4.vhdx' because it is being used by another process. ... Using Resource Monitor I can see that there is a vmwp.exe process using the file (redacted Handle Names): Image …
20.08.2015 · Had some trouble with this today. The file was locked somewhere, and it would not allow me to attach or add the VHDX file that was for my C operating system drive. I'm having trouble figuring out what needs to be done to be able to free this file up. I get the error: "The vhdx cannot be accessed because it is in use by another process on the ...
My problem was that the Hyper-V .vhdx file for my virtual machine was locked but ... cannot access the file because it is being used by another process".
As you can see there is an entry called "Msft Virtual Disk" which represents the VM file mounted as a virtual disk. To unmount the virtual disk, from the command prompt type: Dismount-DiskImage -ImagePath "C:\Users\Public\Documents\Hyper-V\Virtual hard disks\Name-Of-Your-Virtual-Machine.vhdx". Re-enter the command: get-physicaldisk to verify ...
Or you could use some other application not covered here, like SCVMM. In the relevant tool, open the settings dialog for the virtual machine and click the drive ...