Hyper-V running on headless server - Group policy - how to add NT VIRTUAL MACHINE\Virtual Machines to logon as service

kivers@avaeon.com 20 Reputation points
2024-01-25T11:12:12.85+00:00

Hi So we have recently implemented(defined specific accounts) the default domain level policy of Logon on as as service. Problem now is certain Hyper-V actions(Create a new machine) will fail with error - Logon failure: the user has no been granted the rights etc...) On Investigation the 'NT VIRTUAL MACHINE\Virtual Machines' account needs to added to the Logon on as a Service policy. However this can only be done by editing the Domain group policy on the Hyper-V host as this is only place account exists(have tried from DC). The problem I have is that suggested fic requires the GP editor to run on the Hyper-V hosts, which I can't do as the server is headless. https://learn.microsoft.com/en-US/troubleshoot/windows-server/virtualization/starting-or-live-migrating-hyper-v-vms-fails#workaround User's image

Method 1 is to move the hyper-V machine to its own org unit, but that is my last resort, so can the above methods be done through powershell etc...? P.S. its just me or is Windows Headless implementation halve baked, always seem to be getting caught with stuff like this, where you just can't do what you could if it had full GUI. I.E. Process/Resource monitoring tools require gui

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
5,822 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,726 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,838 questions
0 comments No comments
{count} votes

Accepted answer
  1. Thameur-BOURBITA 36,226 Reputation points
    2024-01-25T13:23:39.7066667+00:00

    Hi @kivers@avaeon.com Thank you for your feedback. I will add the solution as a comment to be able to validate it and close this thread. Please don't forget to accept helpful answer


1 additional answer

Sort by: Most helpful
  1. David L. Campbell 0 Reputation points
    2025-01-23T16:01:06.4466667+00:00

    Do a backup of the Group Policy and use a text editor to add "*S-1-5-83-0" to the log-on as a service policy. You'll find the text in a .inf file. Drill down into the backup, and you'll find it. Then import it back as the settings for the GPO. You don't need to use a table when it asks. You must do this backup/import from the Group Policy Manager in the home folder for all Group Policies.

    0 comments No comments

Your answer

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