Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount cgroup v2 error (Docker) #9868

Closed
1 of 2 tasks
Harry-zklcdc opened this issue Mar 30, 2023 · 64 comments
Closed
1 of 2 tasks

mount cgroup v2 error (Docker) #9868

Harry-zklcdc opened this issue Mar 30, 2023 · 64 comments

Comments

@Harry-zklcdc
Copy link

Harry-zklcdc commented Mar 30, 2023

Windows Version

Microsoft Windows [版本 10.0.22621.1485]

WSL Version

1.1.6.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.90.1

Distro Version

Ubuntu 20.04

Other Software

Docker

Repro Steps

  1. Upgrade wsl to version 1.1.6.0
  2. boot wsl
  3. service docker start

Expected Behavior

cgroup mount successful

Actual Behavior

wsl: .wslconfig 条目 'wsl2.swap' 的内存字符串 '0GB' 无效
mount: /sys/fs/cgroup/cpuset: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpu: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpuacct: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/blkio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/memory: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/devices: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/freezer: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_cls: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/perf_event: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_prio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/hugetlb: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/pids: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/rdma: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/misc: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.

Diagnostic Logs

No response

@luyb-baller
Copy link

ubuntu 18.04 has the same question ...
Except for the ubuntu version, the version information and execution procedures are the same.

@nyanmisaka
Copy link

nyanmisaka commented Mar 30, 2023

This issue happens right after a force upgrading that caused by #9866. Now I have to doubt the reliability of WSL.

sudo service docker start
mount: /sys/fs/cgroup/cpuset: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpu: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpuacct: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/blkio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/memory: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/devices: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/freezer: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_cls: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/perf_event: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_prio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/hugetlb: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/pids: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/rdma: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/misc: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.

With [boot] systemd=true docker buildx failed too.

------
 > [internal] booting buildkit:
------
ERROR: Error response from daemon: cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice"

@lab408
Copy link

lab408 commented Mar 30, 2023

Please help, have the same issue here...

@nyanmisaka
Copy link

Please help, have the same issue here...

Revert to the last release 1.1.3 manually fixed the issue.
https://github.com/microsoft/WSL/releases/tag/1.1.3

@Harry-zklcdc
Copy link
Author

Please help, have the same issue here...

Revert to the last release 1.1.3 manually fixed the issue. https://github.com/microsoft/WSL/releases/tag/1.1.3

It is working. But The Version use cgroup v1 not v2. When use v2, has the same problem.

Now I use [boot] systemd=true solve the problem in WSL version 1.1.6.0

@nyanmisaka
Copy link

It is working. But The Version use cgroup v1 not v2. When use v2, has the same problem.

Now I use [boot] systemd=true solve the problem in WSL version 1.1.6.0

It still breaks docker buildx https://docs.docker.com/engine/reference/commandline/buildx/

ERROR: Error response from daemon: cgroup-parent for systemd cgroup should be a valid slice named as "xxx.slice"

@Harry-zklcdc Harry-zklcdc changed the title mount cgroup v2 error mount cgroup v2 error (Docker) Mar 30, 2023
@nyanmisaka
Copy link

nyanmisaka commented Mar 30, 2023

@Harry-zklcdc I think this can be closed for now.

My issue has gone after I reinstalled the 1.1.6 version from git release and rebooted the system several times.

@nanobyt3
Copy link

nanobyt3 commented Mar 30, 2023

I had a similar issue today. Tried the above suggestions, but it did break docker.
But was able to resolve the cgroup error on v1.1.6 (for WSL-2 Ubuntu 20.04 & 22.04) by adding the below line to /etc/fstab file:

cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0

Maybe this helps someone.
Original post: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2

I think its best to treat this as a workaround until the devs figure out the real cause for this issue & provide a fix.

@Ort0x36
Copy link

Ort0x36 commented Mar 30, 2023

Any solution? editing the conf file with

[boot]
    systemd=true 

the build still fails

@marcellocbastos
Copy link

Any solution? editing the conf file with

[boot]
    systemd=true 

the build still fails

The @nanobyt3 suggestion works for me.

@lems3
Copy link

lems3 commented Mar 30, 2023

I had a similar issue today. Tried the above suggestions, but it did break docker. But was able to resolve the cgroup error on v1.1.6 (for WSL-2 Ubuntu 20.04 & 22.04) by adding the below line to /etc/fstab file:

cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0

Maybe this helps someone. Original post: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2

~~The errors goes away, but it seems that some Docker features still doesn't work.

We use Lando here to manage our development environment, and the tool is able to re-create its Traefik proxy, but then fails to create any additional images or containers. It may not be linked to the Docker issue, but as it was working fine yesterday I suspect that what triggered the #9866 issue broke something that is related to this... ~~

Make sure that your tools are up to date, and properly configured. I had a broken local config file 😄

@kinardc
Copy link

kinardc commented Mar 30, 2023

I was able to fix this by re-enabling Hyper-V from 'Turn Windows features on or off' in the Control Panel.

@fanisk21
Copy link

fanisk21 commented Mar 30, 2023

I had a similar issue today. Tried the above suggestions, but it did break docker. But was able to resolve the cgroup error on v1.1.6 (for WSL-2 Ubuntu 20.04 & 22.04) by adding the below line to /etc/fstab file:

cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0

Maybe this helps someone. Original post: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2

Thanks very much @nanobyt3 , that solved

@benhillis
Copy link
Member

@nanobyt3 - you shouldn't need to do that, cgroupv2 should be mounted by default.

@benhillis benhillis changed the title mount cgroup v2 error (Docker) mount cgroup v1 error (Docker) Mar 30, 2023
@Harry-zklcdc
Copy link
Author

@benhillis Don't change the title. Cgroup v1 on WSL 1.1.3.0 is working perfet. But after upgrading to version 1.1.6.0, cgroup v2 is force loading since prerelease v1.1.5.0.

@Harry-zklcdc Harry-zklcdc changed the title mount cgroup v1 error (Docker) mount cgroup v2 error (Docker) Mar 31, 2023
@wynnw
Copy link

wynnw commented Mar 31, 2023

I'm using a wsl2 based on amazonlinux2, and updating to 1.1.6.0 via the MS Store broke my docker/minikube setup (it was working with 1.1.3.0). Now I can't run docker run hello-world and I get this error:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply cgroup configuration: unable to start unit "docker-a8e9f16aafcdf1ae52c4d160aac9e7d6e73262a9e9264d4812c0b5e41bdced98.scope" (properties [{Name:Description Value:"libcontainer container a8e9f16aafcdf1ae52c4d160aac9e7d6e73262a9e9264d4812c0b5e41bdced98"} {Name:Slice Value:"system.slice"} {Name:Delegate Value:true} {Name:PIDs Value:@au [11359]} {Name:MemoryAccounting Value:true} {Name:CPUAccounting Value:true} {Name:IOAccounting Value:true} {Name:TasksAccounting Value:true} {Name:DefaultDependencies Value:false}]): Cannot set property IOAccounting, or unknown property.: unknown. ERRO[0000] error waiting for container: context canceled

mount |grep cgr shows: cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)

So there's seems to be some affect from the 1.1.5 change "Do not mount cgroup v1 for WSL2" that is making systemd still operate in legacy mode but other tools like docker/containerd are failing due to some kind of inconsistencies. Is there a way to force systemd to run in unified mode instead of legacy mode?

@Harry-zklcdc
Copy link
Author

Any solution? editing the conf file with

[boot]
    systemd=true 

the build still fails

@wynnw You can use this. It works for me!

@wynnw
Copy link

wynnw commented Mar 31, 2023

I'm running with that setting already.

@KarlManong
Copy link

I have the same issue

WSL 版本: 1.1.6.0
内核版本: 5.15.90.1
WSLg 版本: 1.0.50
MSRDC 版本: 1.2.3770
Direct3D 版本: 1.608.2-61064218
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows 版本: 10.0.22621.1485

@Seungho-Jeong
Copy link

Seungho-Jeong commented Mar 31, 2023

Please help, have the same issue here...

Revert to the last release 1.1.3 manually fixed the issue. https://github.com/microsoft/WSL/releases/tag/1.1.3

I'm having the same problem after upgrading to WSL2 1.1.6.
Please help me how to revert to the last release version(1.1.3).

@hinneslung
Copy link

hinneslung commented Mar 31, 2023

Download and install the .msixbundle file on the release page to revert.

@e4711s
Copy link

e4711s commented Mar 31, 2023

And if that should not work, then uninstall WSL2 from start menu => Settings => Add or remove programs => Windows Subsystem for Linux => remove and then install the msixbundle for 1.1.3 again.

@jujur10
Copy link

jujur10 commented Mar 31, 2023

I got the same problem yesterday ☹️

@nanobyt3
Copy link

@nanobyt3 - you shouldn't need to do that, cgroupv2 should be mounted by default.

@benhillis, yes, cgroup2 mounts by default. But, according to what is mentioned in the SO post (https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2), what seems to make docker crap out above errors is the 'unified' mount point.
I am updating my original comment, should have mentioned it as only a workaround :)

@JonnoFTW
Copy link

Per the SO answer, you can add:

[wsl2]
kernelCommandLine= cgroup_no_v1=all

to your .wslconfig

@nielsq
Copy link

nielsq commented Mar 31, 2023

downgrading wsl to 1.1.3.0 worked for me. This does not effect the distro you have installed.
download the msixbundle from: https://github.com/microsoft/WSL/releases/tag/1.1.3

open powershell as admin

wsl --shutdown
$Package = Get-AppxPackage MicrosoftCorporationII.WindowsSubsystemforLinux -AllUsers
Remove-AppxPackage $Package -AllUsers

Add-AppxPackage /path/to/package

then restart your mashine

@lems3
Copy link

lems3 commented Mar 31, 2023

downgrading wsl to 1.1.3.0 worked for me. This does not effect the distro you have installed. download the msixbundle from: https://github.com/microsoft/WSL/releases/tag/1.1.3

open powershell as admin

wsl --shutdown
$Package = Get-AppxPackage MicrosoftCorporationII.WindowsSubsystemforLinux -AllUsers
Remove-AppxPackage $Package -AllUsers

Add-AppxPackage /path/to/package

then restart your mashine

Same procedure works fine to reinstall 1.1.6, and with @nanobyt3 solution Docker works.

So for those like me who needs the GUI layer on Windows 10, that path fixes the issue for me.

@elsaco
Copy link

elsaco commented Apr 1, 2023

@rlSimonLi use wsl --update --web-download --pre-release do download beta WSL versions.

@lindowx
Copy link

lindowx commented Apr 1, 2023

I just performed the following steps, and it appears that the error has disappeared. FYI.

  1. Re-enable Hyper-V and restart the computer.
  2. Edit (or create) the file /etc/wsl.conf in WSL, and add the follow lines:
[boot]
systemd=true
  1. Run wsl --shutdown as an administrator in PowerShell to close the WSL instance, and then restart WSL.

After logging back into WSL, I found that the systemctl command could be used properly and the error had disappeared. At the moment, my Docker seems to be running well.

This is my WSL version info:

PS C:\WINDOWS\system32> wsl --version
WSL Version: 1.1.6.0
Kernel Version: 5.15.90.1
WSLg Version: 1.0.50
MSRDC Version: 1.2.3770
Direct3D Version: 1.608.2-61064218
DXCore Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.22621.1413
PS C:\WINDOWS\system32> wsl --list --all -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Running         2

@antoniodibaccoks
Copy link

Thank you lindowx it works!!! How comes that Microsoft caused all this ?

@kei10007
Copy link

kei10007 commented Apr 1, 2023

@lindowx Thank you!!!
i had the same problem. I created a file in /etc/wslconf and got the message in the terminal.

Start docker (via systemctl): docker.service.

I have set docker to start when wsl starts. I don't get these error messages anymore, so I think I've fixed this problem.

@PanWang3
Copy link

PanWang3 commented Apr 2, 2023

I have the same problem from WSL.

`

mount: /sys/fs/cgroup/cpuset: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpu: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpuacct: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/blkio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/memory: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/devices: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/freezer: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_cls: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/perf_event: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_prio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/hugetlb: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/pids: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/rdma: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/misc: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.

`

@jramiresbrito
Copy link

Any solution? editing the conf file with

[boot]
    systemd=true 

the build still fails

This worked for me

@AtharvaShekatkar
Copy link

Thanks a lot @lindowx your solution worked for me!

@elsaco
Copy link

elsaco commented Apr 2, 2023

This issue was reported with systemd disabled, and running service docker start. When systemd is enabled the unit file used to start the service is not /etc/init.d/docker but /lib/systemd/system/docker.service which has this comment:

# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
# for containers run by docker

so there's no cgroupfs_mout() function call. Since WSL 1.1.5.0 introduced cgroup_no_v1=all (nuking cgroup v1 controllers) when systemd is not enabled starting the service will fail with the wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error type of errors.

@uche-madu
Copy link

I just performed the following steps, and it appears that the error has disappeared. FYI.

  1. Re-enable Hyper-V and restart the computer.
  2. Edit (or create) the file /etc/wsl.conf in WSL, and add the follow lines:
[boot]
systemd=true
  1. Run wsl --shutdown as an administrator in PowerShell to close the WSL instance, and then restart WSL.

After logging back into WSL, I found that the systemctl command could be used properly and the error had disappeared. At the moment, my Docker seems to be running well.

This is my WSL version info:

PS C:\WINDOWS\system32> wsl --version
WSL Version: 1.1.6.0
Kernel Version: 5.15.90.1
WSLg Version: 1.0.50
MSRDC Version: 1.2.3770
Direct3D Version: 1.608.2-61064218
DXCore Version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows Version: 10.0.22621.1413
PS C:\WINDOWS\system32> wsl --list --all -v
  NAME            STATE           VERSION
* Ubuntu-18.04    Running         2

Yep! I had the same problem running on Ubuntu 20.04.5 LTS and this solved it for me. Now I can run minikube start successfully.

@dora-lemon
Copy link

sudo service docker start
mount: /sys/fs/cgroup/cpuset: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpu: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/cpuacct: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/blkio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/memory: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/devices: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/freezer: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_cls: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/perf_event: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/net_prio: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/hugetlb: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/pids: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/rdma: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
mount: /sys/fs/cgroup/misc: wrong fs type, bad option, bad superblock on cgroup, missing codepage or helper program, or other error.
 * Starting Docker: docker

after run this cmd, i could run hello-world, but when i run an container with gpu, it fail, was it called by the same reason?

 sudo docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
docker: Error response from daemon: could not select device driver "" with capabilities: [[gpu]].

@elsaco
Copy link

elsaco commented Apr 3, 2023

@dora-lemon you're running a container inside a container and nbody app can't find a gpu, thus Error: only 0 Devices available, 1 requested. Exiting.

@amahta
Copy link

amahta commented Apr 3, 2023

Please help, have the same issue here...

Revert to the last release 1.1.3 manually fixed the issue. https://github.com/microsoft/WSL/releases/tag/1.1.3

This fixed it for me!

@benhillis
Copy link
Member

Fixed with https://github.com/microsoft/WSL/releases/tag/1.1.7.

@mcknasty
Copy link

mcknasty commented Apr 6, 2023

I also had to enable hyper-v on Windows 11 as suggested in this article.

Following the directions in this stack overflow question, I got the following config to work without the errors.

Note: Upgrading the version of WSL to 1.2.0 did not fix the error.

PS C:\Users\xxxxx> wsl --version
WSL version: 1.1.6.0
Kernel version: 5.15.90.1
WSLg version: 1.0.50
MSRDC version: 1.2.3770
Direct3D version: 1.608.2-61064218
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.1485
PS C:\Users\xxxxx>
PS C:\Users\xxxxx> cat .\.wslconfig
[wsl2]
kernelCommandLine=cgroup_enable=memory systemd.unified_cgroup_hierarchy=0
kernelCommandLine = cgroup_no_v1=all
$ uname --all
Linux XXXXXX-XXXXXXX 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
$ sudo service docker restart
 * Stopping Docker: docker                                                                                       [ OK ]
 * Starting Docker: docker                                                                                       [ OK ]
$ docker --version
Docker version 23.0.2, build 569dd73
$ cat /etc/fstab
LABEL=cloudimg-rootfs   /        ext4   defaults        0 1
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
$ cat /etc/wsl.config
[boot]
systemd=true
cgroup_enable=memory systemd.unified_cgroup_hierarchy=0

@Seungho-Jeong
Copy link

Download and install the .msixbundle file on the release page to revert.

Being the impatient person I am, I ended up doing a full wipe, but your downgrade method efficiently worked.

@nanobyt3
Copy link

nanobyt3 commented Apr 11, 2023

upgrade from WSL v1.1.6.0 => v1.2.0.0 has fixed this issue for me.
Thank you WSL devs!

@benc-uk
Copy link

benc-uk commented Apr 11, 2023

wsl --update fixed it for me

@masiorama
Copy link

upgrade from WSL v1.1.6.0 => v1.2.0.0 has fixed this issue for me. Thank you WSL devs!

Same here. Thanks!

@paulovitorweb
Copy link

Updating WSL to version 1.2.0.0 fixed it for me.

Thanks to WSL developers.

@ganl
Copy link

ganl commented Apr 12, 2023

wsl --shutdown
wsl --version

WSL 版本: 1.2.0.0
WSLg 版本: 1.0.51
MSRDC 版本: 1.2.3770
Direct3D 版本: 1.608.2-61064218
DXCore 版本: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp

Docker.Engines.WSL2.WSL2ErrorFoundInLogsException: Error found in logs indicating startup will most likely fail: Error creating 000-metadata: exit status 1

@maikebing
Copy link

docker/for-win#13340

@patcfly
Copy link

patcfly commented Apr 14, 2023

I had a similar issue today. Tried the above suggestions, but it did break docker. But was able to resolve the cgroup error on v1.1.6 (for WSL-2 Ubuntu 20.04 & 22.04) by adding the below line to /etc/fstab file:

cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0

Maybe this helps someone. Original post: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2

I think its best to treat this as a workaround until the devs figure out the real cause for this issue & provide a fix.

This fixed it for me.

@maikebing
Copy link

image

@Undertone0809
Copy link

I had a similar issue today. Tried the above suggestions, but it did break docker. But was able to resolve the cgroup error on v1.1.6 (for WSL-2 Ubuntu 20.04 & 22.04) by adding the below line to /etc/fstab file:
cgroup2 /sys/fs/cgroup cgroup2 rw,nosuid,nodev,noexec,relatime,nsdelegate 0 0
Maybe this helps someone. Original post: https://stackoverflow.com/questions/73021599/how-to-enable-cgroup-v2-in-wsl2
I think its best to treat this as a workaround until the devs figure out the real cause for this issue & provide a fix.

This fixed it for me.

I run sudo service docker start . It shows Starting Docker: docker, but it failed when I run sudo service docker status.

Docker is not running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests