-
Notifications
You must be signed in to change notification settings - Fork 856
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 mount not working properly anymore in WSL #8611
Comments
@owenschupp - can you please take a look? |
I have run some deeper analysis with some logging and discovered that before the two updates my WSL also was kept alive when running the SSHD server and CRON. Now it seems like the process is somehow terminated after some minutes and my WSL is shut down, so when I open it I get a fresh instance. That's not what I want. Now the weird thing is that sometimes the WSL instance keeps running without having any Terminals open. |
@Seeky90 on the topic of this second issue regarding the WSL getting suspended, would you mind creating filing a new issue and referencing this one in it? Also, if you could supply diagnostic logs in that issue, it would be much appreciated. |
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request. Thank you! |
Version
Version 10.0.22000.739
WSL Version
Kernel Version
5.10.102.1
Distro Version
Ubuntu-20.04
Other Software
WSL Version 60.0 and higher
Repro Steps
In the past it was possible to run tasks for WSL in the task scheduler. You could tell powershell to restart your vmcompute (Necessary for me due to some domain policy causing WSL not being accessible upon boot).
Also I have created a part that runs wsl --mount \.\PHYSICALDRIVE1 --partition 2 --name data
For simplicity follow these repro steps:
Create a task scheduler task:
<?xml version="1.0" encoding="UTF-16"?> <Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> <RegistrationInfo> <Date>2022-02-17T07:48:10.6191908</Date> <Author>username</Author> <URI>\test</URI> </RegistrationInfo> <Triggers /> <Principals> <Principal id="Author"> <UserId>S-1-5-21-2139355670-3375578443-2995265674-8217</UserId> <LogonType>InteractiveToken</LogonType> <RunLevel>HighestAvailable</RunLevel> </Principal> </Principals> <Settings> <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy> <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries> <AllowHardTerminate>true</AllowHardTerminate> <StartWhenAvailable>false</StartWhenAvailable> <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> <IdleSettings> <StopOnIdleEnd>true</StopOnIdleEnd> <RestartOnIdle>false</RestartOnIdle> </IdleSettings> <AllowStartOnDemand>true</AllowStartOnDemand> <Enabled>true</Enabled> <Hidden>false</Hidden> <RunOnlyIfIdle>false</RunOnlyIfIdle> <WakeToRun>false</WakeToRun> <ExecutionTimeLimit>PT72H</ExecutionTimeLimit> <Priority>7</Priority> </Settings> <Actions Context="Author"> <Exec> <Command>C:\Windows\System32\wsl.exe</Command> <Arguments>--shutdown</Arguments> </Exec> <Exec> <Command>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Command> <Arguments>-windowstyle hidden -ExecutionPolicy Bypass C:\Users\username\test.ps1</Arguments> </Exec> </Actions> </Task>
Add into the Powershell script C:\Users\username\test.ps1:
wsl --mount \\.\PHYSICALDRIVE1 --partition 2 --name data
Expected Behavior
It is expected that the partition is mounted at /mnt/wsl/data.
Actual Behavior
Instead sometimes the partition is mounted at /mnt/wsl/PHYSICALDRIVE1 even though the script has successfully been run.
This happens since WSL Version 0.60.0
Before this did not happen.
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: