Skip to content

Conversation

@benhillis
Copy link
Member

This change updates WSLA to use its own registration of wsldevicehost.dll and updates the virtio networking code to support running with either the WSL or WSLA versions of the class.

Currently since the WSLA service is part of the WSL MSI things were working fine, however when there is a separate package for the WSLA runtime a separate version of the wsldevicehost registration will be needed.

Update wsldevicehost nuget package with new version that contains the new class ID
@benhillis benhillis requested a review from a team as a code owner December 3, 2025 06:39
Copilot AI review requested due to automatic review settings December 3, 2025 06:39

THROW_IF_WIN32_ERROR(NotifyNetworkConnectivityHintChange(&VirtioNetworking::OnNetworkConnectivityChange, this, true, &m_networkNotifyHandle));
}
CATCH_LOG()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was swallowing failures, I think it's probably better for initialize to throw instead of fail silently and leave the VM with partially configured networking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds WSLA-specific class registration for virtio networking devices to enable separate packaging of the WSLA runtime from the main WSL MSI. The change introduces distinct class IDs for WSLA's virtio devices while maintaining compatibility with the shared wsldevicehost.dll implementation.

Key Changes:

  • Introduced WSLA-specific GUID for virtio networking (WSLA_VIRTIO_NET_CLASS_ID)
  • Refactored VirtioNetworking to accept a class ID parameter instead of using a static constant
  • Consolidated device type GUIDs (device IDs vs class IDs) into appropriate header files
  • Added COM registration for WSLA's virtio network class in the MSI package

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/windows/wslaservice/exe/WSLAVirtualMachine.cpp Defines WSLA-specific virtio network class ID and passes it to VirtioNetworking constructor
src/windows/service/exe/WslCoreVm.h Removes virtio FS class ID declarations (moved to .cpp file)
src/windows/service/exe/WslCoreVm.cpp Defines WSL-specific virtio device class IDs and updates all references to use the new constants
src/windows/common/VirtioNetworking.h Updates constructor signature to accept class ID parameter and makes it an instance member
src/windows/common/VirtioNetworking.cpp Implements class ID as constructor parameter and removes function-try-block pattern
src/windows/common/GuestDeviceManager.h Consolidates virtio device type GUIDs with consistent naming and comments
src/windows/common/GuestDeviceManager.cpp Updates reference to use new VIRTIO_FS_DEVICE_ID constant name
packages.config Updates Microsoft.WSL.DeviceHost package version
msipackage/package.wix.in Adds COM registration for WSLA's virtio network class with dedicated AppID

@benhillis benhillis merged commit 1ef0c45 into feature/wsl-for-apps Dec 3, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants