Expose the VM ID inside user distros by chelnak · Pull Request #13212 · microsoft/WSL

@chelnak marked this pull request as ready for review

July 2, 2025 16:57

@chelnak

This change ensures that we pass the vm id to an
instances init. The id is then set as an environment
variable and can be accessed at runtime.

benhillis

OneBlue

@chelnak

Add a new argument --vm-id to wslinfo so that
the caller can retrieve the VM id by calling the
binary.

Although it is an environment variable, it can be useful
here too to save additional string parsing from the caller.

benhillis