Logon failure: the user has not been granted the requested logon type

Manju 130 Reputation points
2025-12-05T12:33:53.5833333+00:00

I have an domain joined Windows 11 client where I am trying to create linux distro under WSL2.

While installing the distro, I encounter this error:

running wslexec: Logon failure: the user has not been granted the requested logon type at this computer.

What I have found out is this is happening when "NT VIRTUAL MACHINE\Virtual Machines" group is missing from "Log on as service" policy in User Rights Assignment.

As a workaround, restarting Hyper-V Host Compute Service is adding back "NT VIRTUAL MACHINE\Virtual Machines" group to "Log on as service" policy and I am able to create the linux distro.

What I would like to know is why/what is causing "NT VIRTUAL MACHINE\Virtual Machines" group getting removed ?

Windows for home | Windows 11 | Security and privacy
0 comments No comments
{count} votes

Answer accepted by question author
  1. Emmanuel Santana 32,755 Reputation points Independent Advisor
    2025-12-05T13:11:40.2566667+00:00

    Hello. I think that the primary reason why it gets removed is due to a Group Policy Object (GPO) that overrides the local security policy settings on your Windows 11 client.

    Check with an Active Directory administrator, as there’s a chance the conflicting GPO needs to be modified. The GPO managing “Log on as a service” should be updated to explicitly include the “NT VIRTUAL MACHINE\Virtual Machines” group.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.