Docker Community Forums

Share and learn in the Docker community.

System.IO.IOException:The process cannot access the file


The process cannot access the file ‘C:\Users\Admin\AppData\Local\Docker\vm-config\config.iso’ because it is being used by another process.

Windows 10 Pro, latest update, cmd Version 10.0.19041.264
Docker latest version, installed yesterday and it was working

Later during the day, above error occurred. I found that file was locked by Windows Security, but I haven’t do anything about it. Today, I added exclusions to the folder and file, but problem remained. Then I found that Windows search is also keeping handle on this file, made service shut-down, no luck. At the end, I found existing handle by Windows VM, but I think that’s OK.

Does anyone know why this happens?

I experienced this after installing and enabling WSL2.I fixed it by shutting down the DockerDesktopVM in the hyper-v manager.

I experienced this after I disabled WSL2 and moved to WSL1 by exposing deamon without TLS. Because using WSL2 caused my computer to hang, having only 4 GB RAM. However, even after this change, yesterday Docker was hanging almost one hour, while extracting and downloading images. Some pipe problem was reported.

Turning off DockerDesktopVM indeed removed lock, but same happened again. Previously, I installed unlock software and I was able to run Docker to the point where not enough memory exception was thrown. Now I will try just to unlock file and start Docker without turning off DockerDesktopVM, but I don’t expect it to work. Afterwards, will try to reinstall Docker.

BTW; It would be nice to have more options during the installation, like choosing the drive where images will be stored and whether we want daemon exposed without TLS so that we don’t need to restart Docker after installation.

Yes, re-installation solved my problem. But this time I haven’t used external device for images, I let Docker to store everything on main drive. That was a first run after I disabled WSL2 and enabled daemon without TLS. Will see what will happen later after Docker is restarted.

One thing to not forget: if I disable WSL2 option during installation, use WSL2 option is active anyway after installation. I can only guess, because without WSL2 Docker is available only for Windows command prompt. I wonder why there is no hint about possibility to install docker-tools under WSL1,

Just to inform you: I finally manged to get Docker running on WSL2. The trick was: V-Hyper manager configuration where paging is set to use external device. It took whole afternoon to build toolset which is heavily using Docker, but it went through after all, no errors were reported. .