Docker - the user has not been granted the requested logon type at this computer.

It's quite frustrating to sit down for the day, and something that worked the day before no longer works. I was hitting the following problem with docker build:

---> Running in 143123d54e5b
hcsshim::CreateComputeSystem 143123d54e5b8c3b028bfad97141a2b1afc6ffa04889a4213f62b2d0daa9f91c: Logon failure: the user has not been granted the requested logon type at this computer.

A reboot seemed to solve it, but I think that was more luck than judgement. Thankfully I found a better answer in https://github.com/docker/for-win/issues/1056#issuecomment-401810678, namely, restarting the "Hyper-V Virtual Machine Management" service.

Posted on in .NET