The Latest on Docker Windows Containers Running Process Isolation for Windows 10 OS Host Machines — Sitecore Developer Tips / Workarounds

Vincent Lui
4 min readNov 3, 2021

--

Windows Docker containers in Windows 10

For developers who are using Windows 10 Professional / Enterprise as their workhorse PC, and developing using Windows Docker Containers (NanoServer, ServerCore). There are two isolation modes that Windows Containers can run — Process (uses less hardware resource), HyperV (uses more hardware resource). Majority of developers would most likely choose Process isolation when developing locally, if possible. The Host OS Machine must match the Docker Windows Container OS Image version.

A quick round up on why Process Isolation is Important

Process Isolation, in short, is more efficient on hardware resources than running containers in HyperV. Non Sitecore developers running on lean containers may not find this too big of an issue. However, using Docker Containers for Local Development on Sitecore requires many containers to be UP at the same time.

Windows 10 21H1 and Beyond

According to Microsoft Containers Compatibility page, Windows 10 21H1 supports Windows Container OS 20H2 running on Process Isolation.

Windows 10 21H1 Supports Process Isolation for 20H2 containers according to Microsoft

I ran the following command on a rather basic Windows 10 Professional running on 21H1, which happens to be my own personal laptop.

docker run -it --isolation=process mcr.microsoft.com/windows/servercore:20H2 cmd

I received the following dreadful message, which indicates that it is not possible to run Docker Windows Containers in Process Isolation mode.

The operating system of the container does not match the operating system of the host.

I stumbled across a GitHub issue that describes the same problem.

ALL LIES !!!

I stumbled upon another GitHub Issue, with discussions on the future of Windows Containers. In short, 20H2 is the final Semi Annual Channel (SAC) version. To support Process Isolation in a non production environment, Windows 11 is required moving forward.

Options in the Interim

There are a few options available. Make sure adequate system backup is done before performing any tasks. If your machine is managed by an IT department, you will most likely sweet talk them into allowing you to stay in 20H2 until Windows 11 Upgrade.

Option 1: Downgrade to 20H2

If the machine was updated to 21H1 from 20H2.

1. Press Windows icon key + I to open Settings.
2. Go to Update & Security > Windows Update.
3. In the right pane, scroll down and click on the View update history link.
4. Now tap on Uninstall updates link.
5. In the Installed Updates — Control Panel window, choose the Feature Update to windows 10 21H1 via Enablement Package (KB5000736).
6. Hit the Uninstall button.
7. Hit Yes when the confirmation window prompts.
8. Tap on the Restart now option.

After the completion of the above steps, your system will remove the 21H1 version and will bring the device back to the previous 20H2 version.

Option 2: Prevent 21H1 and Newer in Windows Update

The following steps require the Windows Registry to be modified. Make sure the appropriate backup’s are done beforehand.

  1. Open the Registry Editor by typing regedit in the Windows search box and clicking on Registry Editor.
  2. Find the following registry key (i.e., the WindowsUpdate key): HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate
  3. Right-click the key; select New and then DWORD from the fly-out menu.
  4. Enter the name TargetReleaseVersion.
  5. Set the value to 1 (one).
  6. Right-click again on the WindowsUpdate key; select New > String value.
  7. Enter the name ProductVersion.
  8. Set the value to the Windows version you want to ensure you stay on: in this case, Windows 10.
  9. Right-click again on the WindowsUpdate key; select New > String value.
  10. Enter the name TargetReleaseVersionInfo.
  11. Set the value to your desired target version: in this case, 20H2.

If the WindowsUpdate key is not visible in the Registry Editor, use these few steps first.

  1. Open the Registry editor.
  2. Find the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows
  3. Right-click on the key, then select New and Key.
  4. Enter the name of the key, WindowsUpdate.
  5. Follow the steps above.

The registry keys allows a user to keep receiving all the updates required without upgrading to 21H1 and beyond.

--

--

Vincent Lui
Vincent Lui

Written by Vincent Lui

Sitecore Technology MVP 2020–2023 | Solution Architect on Sitecore, Akamai, Microsoft Azure | Passionate on DevSecOps Lifecycle @ CPA Australia

Responses (1)