microsoft / microsoft/Windows-Containers

UMDF driver installation does not work on Windows Containers

Open
#292 34 comments 2 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PowerShell
Stars
551
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
The product we are developing installs a user-mode driver (UMDF driver) to present a virtual serial port device to the rest of the system and it is compatible with all client and server OS versions (including server core).

However, when we try to install it inside a Windows Container, we get a bunch of errors.

Below is a brief description of what we managed to discover so far:

  1. UMDF driver installation fails on any image. Debugging and tracing revealed that undocumented CM_Add_Driver_PackageW cfgmgr32.dll function (called from documented DiInstallDriverW function) reported CR_NO_CM_SERVICES (0x32) error after trying to communicate with some other process over RPC. This error code is also undocumented but gives a hint that some system component is missing. On desktop OS images, another non-illustrative error code (0xd - the data is invalid) is reported.

  2. We discovered that if the startup type of the DeviceInstall system service is changed to "Manual", driver installation succeeds. The default state of this service is "Disabled", which is different from default state on non-container OSes (both client and server).

  3. When the product creates a new device, the attempt fails. The device node is created and installed driver is configured for it. However, the device remains in an error "stopped" state. If container is running in process isolation mode, device creation succeeds and device is reported in "started" mode. However, the driver host process, WUDFHost.exe is not running. Any attempts to diagnose the problem by checking the relevant WDF/UMDF logs or attempts to diagnose host process startup issues fail.

Is installation of the UMDF driver supported on Windows Containers, and if it is not, if it is ever planned?

To Reproduce
Try to install a product with UMDF driver. I'm not sure if the product link may be posted here, but if required, I can provide it over private channel.

Expected behavior
Successful installation and operation of UMDF drivers and their virtual devices.

Configuration:

  • Edition: Host: Windows 11
  • Base Image being used: mcr.microsoft.com/windows:ltsc2019
  • Container engine: Docker
  • Container Engine version 20.10.21

Additional context

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.