DiagHost service repeating startup failures in Windows Server Core 2022 container

Juho Nokela 10 Reputation points

When running Windows Server Core 2022 container, DiagHost service startup fails constantly.

  • What is the DiagHost service meant to do? I couldn't really find any relevant information online. I want to know if the service not starting has any relevant consequences for our use case, or if it's safe to disable the service.
  • Can Microsoft fix the container image so that it wouldn't throw constant errors by default?

The "DiagHost" service is not present on full Windows Server 2022 VM Datacenter virtual machine or in ltsc2019 based Server Core image. I've only seen it in the ltsc2022 Server Core image, where it doesn't start.

Reproducing the problem:

  1. Run Windows Server Core 2022 container with default settings. Ping is there just to keep the container running. docker run -d --name DiagHostIssue mcr.microsoft.com/windows/servercore:ltsc2022 ping -t localhost
  2. Open PowerShell connection to the container docker exec -it DiagHostIssue powershell
  3. Check the System event log Get-EventLog -LogName System -Newest 20 -EntryType Error | Format-List *

Expected result:

No repeating errors in System event log.

Actual result:

Repeating errors such as:

"The DiagHost service terminated unexpectedly.  It has done this 3 time(s)."


"The DiagHost service terminated with the following error:


Service info:

get-service diaghost | fl *



Name                : DiagHost

RequiredServices    : {}

CanPauseAndContinue : False

CanShutdown         : False

CanStop             : False

DisplayName         : diaghost

DependentServices   : {}

MachineName         : .

ServiceName         : DiagHost

ServicesDependedOn  : {}

ServiceHandle       : SafeServiceHandle

Status              : Stopped

ServiceType         : Win32OwnProcess

StartType           : Automatic

Site                :

Container           :


Get-WmiObject win32_service | ?{$_.Name -like 'diaghost'} | select Name, DisplayName, State, PathName


Name     DisplayName State   PathName

----     ----------- -----   --------

DiagHost DiagHost    Stopped C:\Windows\System32\svchost.exe -k LocalSystemNetworkRestricted

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,076 questions
0 comments No comments
{count} vote