-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
Description
Windows Version
Microsoft Windows [Version 10.0.22631.4460]
WSL Version
2.3.24.0
Are you using WSL 1 or WSL 2?
- WSL 2
- WSL 1
Kernel Version
5.15.153.1-2
Distro Version
No response
Other Software
No response
Repro Steps
- Run
wsl --import-in-place Ubuntu C:\Users\User\Desktop\Ubuntu-24.04-LTS-x86_64.vhdx
- Observe that
WSLPluginAPI_OnDistributionRegistered
is not invoked
- Observe that
- Check and observed that the distribution is in fact registered:
wsl --list
- Run
wsl --distribution Ubuntu
(checking if the distribution registration callout is invoked later)- Observe that the
WSLPluginAPI_OnDistributionRegistered
is not invoked - Observe that
WSLPluginAPI_OnDistributionStarted
is invoked without any priorWSLPluginAPI_OnDistributionRegistered
- Observe that the
- Run
wsl --unregister Ubuntu
- Observed that the
OnDistributionUnregistered
is invoked
- Observed that the
In contrast, using --import
invokes the distribution registered plugin callout immediately. This behavior means that using --import-in-place
does not provide visibility of a distribution being registered to the plugin. The plugin is only informed of a distribution being unregistered when --import-in-place
is used. Also note that --import
invokes the plugin callout immediately, it does not require the distribution be started.
Expected Behavior
The --import-in-place
command should result in WSLPluginAPI_OnDistributionRegistered
being invoked just as --import
does.
Actual Behavior
The --import-in-place
command never notifies the plugin of distribution registration.
Diagnostic Logs
No response