Affected versions: Windows Server 2019

πŸ“– ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution β€” Primary Fix
  7. Solution β€” Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

The Host Compute Service on Windows Server 2019 fails to start, so Windows containers cannot launch. Container runtimes report HNS or HCS errors, CI agents fail to schedule build jobs, and orchestrator nodes get cordoned by the platform.

Environment & Reproduction

Reproduce after a containerd or HNS configuration change, broken vSwitch, or missing Containers feature components. Inspect HCS and HNS event channels.

Get-Service -Name containers
Get-WinEvent -LogName System -MaxEvents 40
Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10

Root Cause Analysis

Causes include missing Containers Windows feature, unhealthy Host Network Service, conflicting third-party network filter driver, or invalid container image references in HCS state.

Quick Triage

Capture HCS service state, HNS state, and Containers feature install state before remediation.

sc.exe query containers
Get-Service -Name containers | Select-Object Status,StartType
Get-EventLog -LogName System -Newest 30 | Where-Object {$_.Source -match 'containers'}

Step-by-Step Diagnosis

Inspect HCS events, list Windows features, and validate vSwitch health.

Get-WinEvent -LogName System -MaxEvents 50 | Where-Object {$_.ProviderName -match 'containers'} | Select TimeCreated,Id,LevelDisplayName,Message
sc.exe qfailure containers
sfc /verifyonly
Illustrative mockup for windows-server-2019 β€” services_panel
Diagnostic view for host compute service fails preventing windows containers β€” Illustrative mockup β€” Progressive Robot

Solution β€” Primary Fix

Repair the Containers feature, reset HNS state, and restart HCS so containers can create namespaces cleanly.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Restart-Service -Name containers -Force
Get-Service -Name containers | Select-Object Status,StartType
Get-WinEvent -LogName System -MaxEvents 20 | Where-Object {$_.ProviderName -match 'containers'}
Illustrative mockup for windows-server-2019 β€” terminal_or_powershell
Primary fix workflow for host compute service fails preventing windows containers β€” Illustrative mockup β€” Progressive Robot

Solution β€” Alternative Approaches

If a third-party network driver blocks HCS, remove it temporarily and rebuild HNS configuration.

sc.exe config containers start= auto
sc.exe failure containers reset= 86400 actions= restart/60000/restart/60000/run/1000
Restart-Service -Name containers -Force

Verification & Acceptance Criteria

HCS and HNS run, test container starts succeed, and CI nodes return to ready in the orchestrator.

Get-Service -Name containers
Get-WinEvent -LogName System -MaxEvents 25 | Where-Object {$_.ProviderName -match 'containers' -and $_.LevelDisplayName -eq 'Error'}
Test-NetConnection -ComputerName localhost -Port 

Rollback Plan

Restore the previous HNS configuration export and reinstall the previously certified third-party driver build.

Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 5
wbadmin get versions
# Restore previous configuration export if available

Prevention & Hardening

Patch HCS on a tracked cadence, certify network filter drivers, and back up HNS configuration regularly.

Get-Service -Name containers | Export-Clixml C:/Temp/containers-baseline.xml
Get-WinEvent -LogName System -MaxEvents 50 > C:/Temp/containers-events.txt
Get-ScheduledTask | Where-Object {$_.TaskName -match 'containers'}

Related to events 17, 21, and HNS-Networking error entries.

Related tutorial: View the step-by-step tutorial for Windows Server 2019.

View all Windows Server 2019 tutorials on the Tutorials Hub β†’

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Microsoft Learn references for Host Compute Service troubleshooting and Windows containers on Windows Server 2019.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β€” we respond within one business day.