Docker error - Logon failure user not granted logon type

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.

To be honest, I didn't know where to begin with this one. The error "the user has not been granted the requested logon type at this computer" presumably refers to the system account that docker runs under. No idea how to check those permissions or why they would change. I initially resorted to rebooting.

The 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.


Comments Section

Evaldo Nascimento (3/12/2021, 1:32:54 PM)
Thank you so much!!!! This works for me!