[Docker] WSL distro stopped whiile waiting for Lifecycle server solution

Preface

I'm not familiar with Docker or WSL. So, if there is something wrong with this article, please let me know in the comments etc. m (_ _) m

environment

OS environment

item Details
Edition Windows 10 Home Insider Preview
version 2004
OS build 20197.1000

Docker

> docker --version
Docker version 19.03.12, build 48a66213fe

Background of the matter

When I started my computer as usual, the following error was displayed.

Docker_Desktop_WSL_distro_stopped.png

Details are as follows.

WSL distro stopped while waiting for Lifecycle server.
  >Stdout:

  >Stderr:
2020/08/27 02:10:49 resolving /mnt/host/c/Program Files/Docker/Docker/resources/wsl/docker-wsl-cli.iso...
Error: mounting wslCLIDest: stat /mnt/host/c/Program Files/Docker/Docker/resources/wsl/docker-wsl-cli.iso: no such file or directory
2020/08/27 02:10:49 stat /mnt/host/c/Program Files/Docker/Docker/resources/wsl/docker-wsl-cli.iso: no such file or directory
mounting wslCLIDest
main.doRun
	/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:224
main.run.func1
	/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:83
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).execute
	/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:762
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).ExecuteC
	/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:852
github.com/docker/pinata/vendor/github.com/spf13/cobra.(*Command).Execute
	/go/src/github.com/docker/pinata/vendor/github.com/spf13/cobra/command.go:800
main.main
	/go/src/github.com/docker/pinata/linuxkit/pkg/wsl-bootstrap/main.go:25
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357

(Maybe this is) cause

It seems that there is not enough memory for Docker to run WSL2 at startup, causing an error.

solution

I used .wslconfig to limit memory because Vmmem messed up memory. Due to this limitation, it is possible that you ran out of memory when you started Docker. So, I will rewrite it referring to this article.

Before rewriting

.wslconfig


[wsl2]
memory=6GB
swap=0

After rewriting

.wslconfig


[wsl2]
memory=10GB
swap=0

I fixed it from memory = 6GB to memory = 10GB and rebooted and it worked. There is no particular reason to set it to 10GB, so if this method doesn't work, try another method or change the amount of memory to increase.

Or, although I haven't tried it, it may be possible to solve it by setting swap = 1. Please refer to this article for the meaning of swap = 1.

finally

Thank you for reading this far. If there are any mistakes in the article, please let us know in the comments.

Recommended Posts

[Docker] WSL distro stopped whiile waiting for Lifecycle server solution
Introducing Docker Desktop for Windows on WSL2