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

WSL --unregister should not delete if system was imported in-place #12427

Open
mvrius opened this issue Jan 3, 2025 · 3 comments
Open

WSL --unregister should not delete if system was imported in-place #12427

mvrius opened this issue Jan 3, 2025 · 3 comments
Labels

Comments

@mvrius
Copy link

mvrius commented Jan 3, 2025

Is your feature request related to a problem? Please describe.
If a user uses --import-in-place, then the usage itself would be indicative of the user managing the lifetime of the root filesystem outside of WSL built-in management semantics; as such, WSL should not delete the root filesystem when doing "--unregister"

Describe the solution you'd like
One of two options:
A) Unregister should not delete user data when image was created with "import-in-place"
B) Unregister should never delete user data. There should be an --unregister and --delete command. Similar to this #9932 - but I think we should just have two options [--unregister] and [--delete]

Describe alternatives you've considered
The workaround is somewhat simple to just --terminate + copy the image somewhere else, then do unregister, but it's ugly.

@mvrius mvrius added the feature label Jan 3, 2025
Copy link

github-actions bot commented Jan 3, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The script will output the path of the log file once done.

If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to [email protected] with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@mvrius
Copy link
Author

mvrius commented Jan 3, 2025

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

/feature

This was tagged already, this reply is really unnecessary.

Copy link

github-actions bot commented Jan 3, 2025

Diagnostic information
Found '/feature', adding tag 'feature'

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

No branches or pull requests

1 participant