Every so often I stumble upon a Windows container which refuses to run with mem_limit set with the following exception:
Error response from daemon: hcsshim::CreateComputeSystem {container_guid}: The requested resource is in use.
Interestingly, it runs just fine, if I omit the mem_limit setting. The value of mem_limit can be anything and it can affect any container, even those that used to work just fine.
OS: Windows 10 Pro 20H2, but I've been having this problem on pretty much all the versions of Windows 10 I had. Docker version: 20.10.5, build 55c4c88 RAM: 64 GB
I don't know, but it seems that restoring Docker to factory defaults helps. (it does seem to help only if your data-root
is the default one, which is not the case for me.)
Every single post I came across ended with the author doing a factory reset or docker zap, but in my case I couldn't afford it -- I had way too many Windows images to lose, and if you've done any docker work around Windows container, you know how painful it is to pull new Windows images.
I have managed to find what I believe is a solution to the problem. Here's how I ended up solving it (so far I've not had a single case in which it wouldn't have worked):
I hope the above helps anyone who reads this as much as it does help me.
UPD:
It turns out that pulling the base image does not always help for some reason. In this case you may want to try restarting the Hyper-V Host Compute Service (vmcompute).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With