Skip to content

Ubuntu on WSL gets corrupted - WslRegisterDistribution failed with error: 0x800700b7 #3352

@icex

Description

@icex
  • Your Windows build number: Microsoft Windows [Version 10.0.17134.137]

  • What you're doing and what's happening:
    Sometimes, after a reboot, when I open Ubuntu I receive the error below and the only solution so far is to reinstall it clean or never reboot(ever). Same issue happened on 18.04 and on 16.04 and I had to reinstall, loosing all my config.

  • What's wrong / what should be happening instead:

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x800700b7
The distribution installation has become corrupted.
Please select Reset from App Settings or uninstall and reinstall the app.
Error: 0x800700b7 Cannot create a file when that file already exists.

Press any key to continue...

Activity

icex

icex commented on Jul 4, 2018

@icex
Author

PS: This happened on my PC and on my Laptop, both after a reboot.

MVoz

MVoz commented on Jul 5, 2018

@MVoz

#634 (comment)

cmda.exe

sc query LxssManager
sc stop LxssManager
sc start LxssManager

and so apparently you have something with the system, check for errors

sfc /scannow
dism /Online /Cleanup-Image /RestoreHealth
icex

icex commented on Jul 5, 2018

@icex
Author

Thanks. Restarting LxssManager solved it.

"Windows Resource Protection did not find any integrity violations."

nick-walt

nick-walt commented on Jul 23, 2018

@nick-walt

After running wslconfig /unregister Ubuntu-18.04 I received the error that started this thread. Restarting LxssManager service did not resolve it. However, uninstalling the instance did resolve it.

KenLast

KenLast commented on Sep 16, 2018

@KenLast

Thank you. I ran into the same thing and restarting the service as you describe fixed it.

saidfagan

saidfagan commented on Nov 3, 2018

@saidfagan

I get this error on both Ubuntu and OpenSuse. Restarting LxssManager solves it. But when I restart my Windows problem happens again. Any ideas?

icex

icex commented on Nov 3, 2018

@icex
Author

I had a scheduled task to start some services (using a Vbs script) and I think I had checked run as administrator. I guess that was my cause for this. I could be wrong, but check that if you’re running at startup.

NicholasIoanJones

NicholasIoanJones commented on Dec 5, 2018

@NicholasIoanJones

Restarting LxssManager solved it for me too

caal-15

caal-15 commented on Dec 17, 2018

@caal-15

Restarting the Manager does resolve it, but it happens everytime I start the PC again :(

kj-joseph

kj-joseph commented on Jan 29, 2019

@kj-joseph

@caal-15: I found this very helpful: #2576 (comment)

caal-15

caal-15 commented on Jan 30, 2019

@caal-15

@kj-joseph Thank you!, that was actually really helpful :)

epogrebnyak

epogrebnyak commented on May 26, 2019

@epogrebnyak

For those looking how to restart LxssManager, here is an instruction.

objt-ba

objt-ba commented on Aug 23, 2019

@objt-ba

In my case, stopping the LxssManager takes ages, and after stopping it, it won't start again.
After a full system reboot everything works again though.

Now, what I have found, is that if an application displays an exception while being connected through an in-line command. (i.e. ubuntu1604 <command>) this can sometimes hang the system. My guess is that this command never comes to an end, and as a result there is no way to use that instance anymore. ... until a full system reboot in my case.

jrdx0

jrdx0 commented on Sep 6, 2019

@jrdx0

I cant restart LxssManager, it's stop and when I try to run it, console print ERROR 1058

vseal001

vseal001 commented on Feb 25, 2020

@vseal001

I found a better way to deal it, first delete the files, then delete reg, then reinstall.
Finaly: its work

CiaranWelsh

CiaranWelsh commented on Mar 19, 2020

@CiaranWelsh

I found a better way to deal it, first delete the files, then delete reg, then reinstall.
Finaly: its work

Could you be more specific so others can try and replicate your solution?

ThrashAbaddon

ThrashAbaddon commented on Mar 22, 2020

@ThrashAbaddon

This can happen if Kasperski is installed.

vjkaran

vjkaran commented on Apr 12, 2020

@vjkaran

This can happen if Kasperski is installed.

Did stopping the Kasperski solve it for you @ThrashAbaddon ?

juanccamachob94

juanccamachob94 commented on May 30, 2021

@juanccamachob94

I came here because of this error

error 0x8007010b al iniciar wsl.exe -d Ubuntu-18.04 (C:/mnt/c/)

It seems that they updated some features of the terminal and my home path /mnt/c/Users/Developer/Documents/ no longer works, but making the following change works, and better, because I can access subdirectories that before the home path did not allow me.
image
(this picture belongs to terminal configuration)

I leave it here in case it helps someone

LiLejia

LiLejia commented on Nov 15, 2021

@LiLejia

Fore those of you still in trouble.
Download rootfs and import manually could at least work.
https://gist.github.com/djfdyuruiry/61e32fb69645bd2618182ee17373d068

Usman-Click

Usman-Click commented on May 18, 2024

@Usman-Click

Well... i'm here in 2024

in my case it got solved after i reset the distribution

these are the steps :

  • Open Settings:
    Press Windows + I to open the Settings app.
    Navigate to Apps:

  • Go to Apps > Apps & features.
    Find Your Linux Distribution:

  • Scroll through the list of installed apps and find your Linux distribution (e.g., Ubuntu, Debian).
    Reset the App:

  • Click on the distribution and then click Advanced options.
    Scroll down and click Reset.

re-open your distribution and ta-da i'll work In shaa Allah

earonesty

earonesty commented on Apr 1, 2025

@earonesty

this still works in 2025: #3352 (comment)

markbaydoun

markbaydoun commented on Jun 18, 2025

@markbaydoun

If anyone runs into this, the solution in #3352 (comment) didn't work for me because LxssManager seemed to not be present in my PC and I wasn't able to install it.

I was able to fix it with the solution in this SU thread https://superuser.com/questions/1725594/windows-lxssmanager-is-missing-from-services-msc

What worked for me was: in Powershell, run Restart-Service WSLService

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @earonesty@LiLejia@caal-15@icex@kj-joseph

        Issue actions

          Ubuntu on WSL gets corrupted - WslRegisterDistribution failed with error: 0x800700b7 · Issue #3352 · microsoft/WSL