+
Skip to content

--import-in-place does not invoke plugin WSLPluginAPI_OnDistributionRegistered #12370

@jxy-s

Description

@jxy-s

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

  1. Run wsl --import-in-place Ubuntu C:\Users\User\Desktop\Ubuntu-24.04-LTS-x86_64.vhdx
    • Observe that WSLPluginAPI_OnDistributionRegistered is not invoked
  2. Check and observed that the distribution is in fact registered: wsl --list
  3. 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 prior WSLPluginAPI_OnDistributionRegistered
  4. Run wsl --unregister Ubuntu
    • Observed that the OnDistributionUnregistered is invoked

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载