-
Notifications
You must be signed in to change notification settings - Fork 822
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
Guest shutdown command is not reliable #12252
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
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 View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
|
Diagnostic information
|
@leonbloy it's a container so |
Windows Version
Microsoft Windows [Versión 10.0.22631.4317]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Fri Mar 29 23:14:13 UTC 2024
Distro Version
Ubuntu-22.04
Other Software
No response
Repro Steps
From inside my Ubuntu session, I run
sudo shutdown now
I get a message of process terminated with code 1, and I'm invited to either close the terminal with Ctrl-D or press Enter to reboot.
In either case, when I start again the session, different issues (not deterministic) appear. In particular, if I immediately reboot and run
sudo shutdown now
again, I getExpected Behavior
I would expect that
sudo shutdown now
performs a complete and clean shutdown of my distro session, same as terminating the session from outside (with wsl). The host (wsl) should somehow get notified and perform its cleanup.That is the behaviour of typical virtual machines hosts (eg: Virtualbox).
Actual Behavior
It seems that
sudo shutdown now
is not enough to perform a complete and clean shutdown from inside my Linux session.It seems I'm still required to shutdown the sesion calling the outside command, with
wsl -s DISTRO_NAME
. This is not clean or ideal, I wish to be able to shutdown my virtual machine from inside - the Windows path is not always available from inside, and it's inconvenient to have to recall the session name (especially when I started the session from the terminal, for example).Diagnostic Logs
No [response](WslLogs-2024-11-09_17-29-09.zip
)
The text was updated successfully, but these errors were encountered: