for-win icon indicating copy to clipboard operation
for-win copied to clipboard

All volumes, containers and images are missing after Docker for Windows upgrade

Open elenderik opened this issue 2 years ago • 104 comments

Description

After launching the latest upgrade, there are no containers, images and volumes visible in the UI.

Also nothing visible, if I execute:

docker ps -a docker image ls -a docker volume ls

I see that the volume folders are still there under: \wsl$\docker-desktop-data\version-pack-data\community\docker\volumes

Can anybody recommend a solution?

Reproduce

  1. install the latest update (version 4.31.0)
  2. launch Docker for Windows (launches automatically)
  3. use the menu in the UI to open Containers, Volumes etc
  4. also check using Docker command line tools

Expected behavior

Upgrade successful and Docker for Windows starts up and previous volumes, images and containers are visible / usable.

docker version

docker version
Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:29:54 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.31.0 (153195)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:22 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

docker info
Client:
 Version:    26.1.4
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.14.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-buildx.exe
  compose: Docker Compose (Docker Inc.)
    Version:  v2.27.1-desktop.1
    Path:     C:\Program Files\Docker\cli-plugins\docker-compose.exe
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.32
    Path:     C:\Program Files\Docker\cli-plugins\docker-debug.exe
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     C:\Program Files\Docker\cli-plugins\docker-dev.exe
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.24
    Path:     C:\Program Files\Docker\cli-plugins\docker-extension.exe
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     C:\Program Files\Docker\cli-plugins\docker-feedback.exe
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.2.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-init.exe
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     C:\Program Files\Docker\cli-plugins\docker-sbom.exe
  scout: Docker Scout (Docker Inc.)
    Version:  v1.9.3
    Path:     C:\Program Files\Docker\cli-plugins\docker-scout.exe

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 4
 Server Version: 26.1.4
 Storage Driver: overlay2
  Backing Filesystem: tmpfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
 Kernel Version: 5.15.146.1-microsoft-standard-WSL2
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 6
 Total Memory: 9.717GiB
 Name: docker-desktop
 ID: 04323cfe-2afb-408d-84f8-942d3b89e298
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Labels:
  com.docker.desktop.address=npipe://\\.\pipe\docker_cli
 Experimental: false
 Insecure Registries:
  hubproxy.docker.internal:5555
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

Diagnostics ID

6117E11F-C8D4-414E-9ED5-1D0AE0C8A0AE/20240606155414

Additional Info

No response

elenderik avatar Jun 06 '24 15:06 elenderik

Windows 10 + WSL2 with all updates. I was upgrading from the previous Docker for Windows version.

$ wsl --list -v NAME STATE VERSION = Debian Running 2 docker-desktop Running 2 docker-desktop-data Running 2

$ docker context ls NAME DESCRIPTION DOCKER ENDPOINT ERROR default Current DOCKER_HOST based configuration npipe:////./pipe/docker_engine desktop-linux * Docker Desktop npipe:////./pipe/dockerDesktopLinuxEngine

WSL seems up and running. In Docker for Windows and under Settings-Resources, I can see disk image location as following: C:\Users\elend\AppData\Local\Docker\wsl This seems to be right, as under the data/ folder I can see the ext4.vhdx, which is the image of the WSL2.

And if I Win Run the following: \wsl$\docker-desktop-data\version-pack-data\community\docker\volumes I can see all the folders for the volumes I previously had.

Until this time I haven't had any problems while upgrading Docker for Windows with existing data (containers, images, volumes).

I haven't had any special configuration regarding Docker for Windows AFAIK - just WSL2.

elenderik avatar Jun 06 '24 15:06 elenderik

I just saw the settings of "Switch to Windows containers..." in the system tray menu. May this be related to this problem?

While searching similar problems, I have seen storage driver mentioned - can this be related to the problem?

Should I install back the previous version of Docker for Windows?

elenderik avatar Jun 06 '24 18:06 elenderik

same issue

quidnun avatar Jun 06 '24 18:06 quidnun

I also noticed the following.

If I restart the computer, all containers, images, volumes, cache - all gone - clean slate. But all the Docker for Windows extensions are there visible in the sidebar. If I click on some extensions, then it seems that some images and containers are pulled (to support the extension). If I restart the computer, all clean slate again.

If I restart and let Docker for Windows start up, then it gets started (but no containers, images and volumes). If I then quit from the taskbar, and start Docker for Windows again, then the UI starts, but the "Starting the Docker Engine..." keeps scrolling and I can't open the Containers, Images, etc pages from the side menu.

And also noticed there is a Windows service called "Docker Desktop Service", which isn't started (I have no idea whether it should).

elenderik avatar Jun 06 '24 18:06 elenderik

As i see the volume directories (\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes), I probably have all the necessary data, so hopefully no data loss. But I would still prefer to restore all the previous state (volumes and images at least), if possible (there was an image with long-running build that I can’t easily pull etc).

And I'm still not sure whether Docker for Windows works correctly after the upgrade. Eg where does it store the new volumes (and images etc), if it doesn't pick up the existing ones from (\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes)? And why restarting Docker for Windows (from the tray) hangs?

elenderik avatar Jun 06 '24 19:06 elenderik

I can confirm that downgrading Docker for Windows to the previous version solved the issue for me currently (from 4.31.0 to 4.30.0). https://docs.docker.com/desktop/release-notes/#4300 I can see all my previous volumes, images, and containers. And I can run my containers and everything works fine. What a relief.

I executed the following in PowerShell: & '.\Docker Desktop Installer.exe' install --disable-version-check

https://github.com/docker/for-win/issues/13824#issuecomment-1878387792

elenderik avatar Jun 07 '24 03:06 elenderik

@elenderik You saved my day - thanks alot!!!!!

dnalneh avatar Jun 07 '24 08:06 dnalneh

We are investigating this issue. @quidnun @dnalneh can you please share a diagnostics id?

bsousaa avatar Jun 07 '24 08:06 bsousaa

I gathered and uploaded diagnostics again, after I had downgraded to 4.30.0 and everything is working again - maybe this helps too.

6117E11F-C8D4-414E-9ED5-1D0AE0C8A0AE/20240607094929

elenderik avatar Jun 07 '24 09:06 elenderik

Hi everyone,

We acknowledge the issue regarding the data not being visible. Please be assured that there is no data loss; the data is simply hidden.

This issue does not affect everyone but specifically impacts users utilizing the WSL engine before version 4.8.0. We are actively working on a patch for version 4.31.1 to address this problem as soon as possible.

In the meantime, you can use the release candidate of version 4.31.1, which can be downloaded from the following link: Docker Desktop Installer. We would appreciate any feedback on the release candidate, confirming the fix.

We apologize for any inconvenience this may have caused and appreciate your patience.

maxcleme avatar Jun 07 '24 12:06 maxcleme

Thanks for the feedback - I really appreciate it !

Great to see the confirmation on no data loss - this is what I experienced too while downgrading, so all the previous data should be there.

Regarding the issue affecting users utilising WSL before 4.8.0, which I just looked up was released back in May 2022, I can also confirm that I have been using Docker for Windows with WSL2 on the same machine without interruption going back to April 2021 - so for the last 3 years or so. And I have continuously kept the software up to date.

elenderik avatar Jun 07 '24 14:06 elenderik

@elenderik thank you for your feedback and for confirming that our issue identification is correct. We appreciate your detailed input and your continued use of Docker for Windows with WSL2!

We would be grateful if you could try v4.31.1 release candidate and let us know if it resolves the issue on your end. Your feedback is invaluable in ensuring that the fix works for everyone.

Thank you again for your support and patience.

maxcleme avatar Jun 07 '24 14:06 maxcleme

4.31.1 resolved the problem for me. I'm just a dumb end user and so don't understand what was said regarding WSL engine, but wsl -v says it is:

WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60

, however wsl --update says it is up to date (guess it's like linux distros where different release versions are independent?)

quidnun avatar Jun 07 '24 15:06 quidnun

@quidnun

4.31.1 resolved the problem for me

Thanks for confirming the fix is working!

I'm just a dumb end user and so don't understand what was said regarding WSL engine, but wsl -v says it is:

Sorry if there was any confusion. The issue seems to apply only to users who have been using Docker Desktop with the WSL engine since version 4.8.0 or earlier. It isn't specifically related to the WSL version itself.

maxcleme avatar Jun 07 '24 15:06 maxcleme

4.31.0 is broken on so many levels. I am getting a different wsl error each time starting stopping. This should't be on release channel.

realiti4 avatar Jun 07 '24 16:06 realiti4

Just for reference, I posted this problem also here: https://forums.docker.com/t/all-volumes-containers-and-images-are-missing-after-docker-for-windows-upgrade/141843

@maxcleme, one person there mentioned, that the 4.31.1 RC didn’t work, but rolling back to 4.30 did.

I can’t try the 4.31.1 RC myself currently, but hopefully other fellas here can provide some feedback.

elenderik avatar Jun 07 '24 17:06 elenderik

I was also seeing this issue, and the 4.31.1 RC fixed it on my machine so I could see my original data. Thank you so much for the quick response and patch to get unstuck!

aboe026 avatar Jun 07 '24 22:06 aboe026

Just got in this issues. had a heart attack and raged out. p.s. forget to mention version 4.31.1 RC did not helped me.

genesem avatar Jun 08 '24 11:06 genesem

Same issue. Installing version 4.31.1 RC did not help.

zdrgeo-scaleforce avatar Jun 08 '24 11:06 zdrgeo-scaleforce

@maxcleme, what can be done with those cases when the 4.31.1 RC doesn't fix the problem? I guess there may be multiple causes to the same effect (problem)? Should they also share diagnostics data and maybe this could provide some insights?

elenderik avatar Jun 08 '24 19:06 elenderik