docs icon indicating copy to clipboard operation
docs copied to clipboard

Document steps to migrate or fix missing WSL volumes using existing vhdx image files to fix desktop-linux builder

Open scscgit opened this issue 7 months ago • 0 comments

Is this a docs issue?

  • [x] My issue is about the documentation content or website

Type of issue

I can't find what I'm looking for

Description

This is primarily motivated by a typical issue where Docker Engine fails to start because the WSL partitions have disappeared:

  • https://github.com/docker/for-win/issues/14786

Assume a situation where the Docker installation doesn't have the necessary WSL partitions registered:

wsl --shutdown

wsl -l -v
  NAME                      STATE           VERSION
* Ubuntu                    Stopped         2
  podman-machine-default    Stopped         2

Similarly, a user may want to backup or move the volumes/partitions between computers.

Assume that both virtual disk images are present:

  • AppData\Local\Docker\wsl\disk\docker_data.vhdx
  • AppData\Local\Packages\CanonicalGroupLimited.Ubuntu_79rhkp1fndgsc\LocalState\ext4.vhdx

As far as I understand this, Docker probably requires these two WSL volumes:

  • docker-desktop
  • docker-desktop-data

Please officially document the current requirements and complete configuration steps to apply to the WSL installation that can be used to fix it, so that the desktop-linux builder in the Docker Engine doesn't report any errors, effectively letting us recover existing objects (containers, volumes...). Any steps to create/initialize/configure the desktop-linux builder would be helpful too, but it's important to explicitly mention which steps would destructively cause a data loss. Thanks!

Location

docs.docker.com; but really, Google should index it

Suggestion

I've found a random thread

  • https://www.reddit.com/r/bashonubuntuonwindows/comments/1e9hc1g/how_to_directly_link_ext4vhdx_file_to_wsl2/

but I still haven't tried the wsl --import-in-place.

scscgit avatar May 16 '25 19:05 scscgit