KB5021235 breaks Docker and Data / Containers are LOST / DELETED with 2022-12 Cumulative Update on Windows Server 2016!!!

ChrisWY27 126 Reputation points
2022-12-23T20:16:29.777+00:00

I run docker as well as several containers on my Windows Server 2016 machine. Recently I received a notification that my containers were down via a health check I have in place. Upon investigation, when I went to list the containers via the docker container ls powershell command there was nothing listed! Somehow all of the containers and data I had set up within the MobyLinuxVM.vhdx had vanished!

I then performed a fresh install of Server 2016 on another machine to test and could reproduce the same issue consistently with the root cause being the recent KB5021235. Here are the steps:

  1. Install Server 2016 without connecting to the web to prevent any updates.
  2. After install, plug into the internet and use server manager to enable Hyper-V and reboot.
  3. Download Docker Desktop ver 2.0.0.3 (the last to support Server '16) from the official site here and install making sure it can access the drive your yml file resides on in the docker settings.
  4. Open up powershell and navigate to where your "docker-compose.yml" is placed and enter the command docker-compose up -d to build the containers. (Simple yml attached that can be used for testing, remove the ".txt" and add a dot between the yml extension)273756-docker-composeyml.txt
  5. Verify containers are up and running using powershell via the command docker container ls.
  6. Check for windows updates on the server and install all including KB5021235.
  7. After update installation reboot and start docker if not automatically starting upon login.
  8. Use the powershell command docker container ls to observe no containers are present, and the previously set up containers are now gone on the machine.

This issue is big and completely unacceptable. It's the first time I've ever experienced data loss due to a windows update, and completely destroyed the services I had running via docker on the server. The only saving grace was that I enabled server backup on the machine and was able to restore the Hyper-V MobyLinuxVM.vhdx disk image from an earlier backup. Placing this restored version of the image in the same folder brought back all of my containers and data that had been previously set up. Had I not had a backup I would have had to spend days re-building this all from scratch!

While it's most likely too late for fellow docker users who already had KB5021235 applied to their system, I am posting this hoping someone at Microsoft can take a look so that future updates such as the 2023-01 Cumulative Update doesn't destroy this data again! This may be an issue on Server 2019+ with newer versions of Docker Desktop as well but I lack the ability to test.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,368 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,083 questions
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,530 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ChrisWY27 126 Reputation points
    2022-12-24T00:57:37.28+00:00

    Just as a follow-up, it seems if you roll back KB5021235 the old containers do come back meaning this update seems to do something odd with the data on the virtual hard disk.

    0 comments No comments