Compare commits

...

96 Commits

Author SHA1 Message Date
Ben Hillis
49864b525e
CI: Switch away from -dev versions of MS-RDX-MRO.windows-store-publish tasks (#13841)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-05 15:20:15 -08:00
Ben Hillis
7741740f87
Add back WSL2_VM_ID environment varialbe to the system distro. (#13835)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-05 15:06:38 -08:00
Ben Hillis
caf38dcad2
wslsettings: ensure text in the oobe window properly wraps (#13823)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-04 20:29:11 -08:00
Ben Hillis
1390e644fb
cleanup: add handling for product-specific virtio networking class IDs. (#13822) 2025-12-03 18:55:25 -08:00
Ben Hillis
c64eb180d8
Remove lxutil.dll dependency and update Microsoft.WSL.DeviceHost to version 1.0.0-20251201.1 (#13633)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-02 20:05:14 -08:00
Ben Hillis
2844e4a862
test: minor updates to improve virtiofs pass rate (#13815)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-02 12:46:26 -08:00
Mitchell Levy
8f744fc188
Update Microsoft.WSL.Kernel to 6.6.114.1 (#13812)
See https://github.com/microsoft/WSL2-Linux-Kernel/releases/tag/linux-msft-wsl-6.6.114.1
2025-12-02 10:50:16 -08:00
Ben Hillis
4637f3758f
virtio networking: fix two minor issues (#13810)
* virtio networking: fix two minor issues

* Update src/windows/common/VirtioNetworking.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-01 21:18:09 -08:00
Ben Hillis
0f6f3c1e02
test: improve test logging infra (#13811)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-12-01 21:17:28 -08:00
Blue
82e54b12a8
Notice change from build: 134917819 (#13809)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-12-01 14:00:43 -08:00
Scott Bradnick
0f07dae96d
Update SLE15SP7 [QU2] and SLE16.0 [QU0] (#13808) 2025-12-01 12:02:29 -08:00
Arch Linux Technical User
d23025b575
archlinux: Release 2025.12.01.153427 (#13804)
This is an automated release [1].

[1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml
2025-12-01 12:01:55 -08:00
Blue
71c87c211f
Localization change from build: 134886165 (#13802)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-12-01 08:33:25 -08:00
Ben Hillis
be82716c40
cleanup: move common functonality out of service exe (#13788)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-26 15:50:42 -08:00
Ben Hillis
ba90ee11fa
cleanup: remove invalid m_deviceHostSupport checks (#13787)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-26 07:59:33 -08:00
Ben Hillis
4207cc80bd
cleanup: VirtioNetworking refactoring to be more portable (#13783)
* cleanup: VirtioNetworking refactoring to be more portable

* more refactoring

* make m_guestDeviceManager private

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-25 16:40:36 -08:00
Blue
b0df225c51
Notice change from build: 134527933 (#13782)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-11-24 14:33:51 -08:00
AlmaLinux Autobot
722eecafba
chore(distributions): Almalinux auto-update - 20251124 17:13:02 (#13780)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-24 13:01:54 -08:00
Ben Hillis
66904342a5
cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr (#13767)
* cleanup: switch from Microsoft::WRL::ComPtr to wil::com_ptr

* reformat

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-24 12:47:22 -08:00
Ben Hillis
d9c69a50ab
cleanup: VirtioNetworking refactoring (#13760)
* cleanup: update VirtioNetworking class to not rely on the WslCoreConfig struct

* cleanup: simplify VirtioNetworking construction

* remove old constructor and other cleanup

* more minor cleanup

* string cleanup in HandleVirtioModifyOpenPorts

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-21 16:50:26 -08:00
Blue
c3d369df90
Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0 (#13755)
* Fix service crash when collecting a linux crash dump when maxCrashDumpCount is set to 0

* Move the check inside the function
2025-11-21 08:16:04 -08:00
Blue
1b7e27ef6f
Add *.slnx to .gitignore (#13754) 2025-11-20 15:40:20 -08:00
Blue
c38230d1f1
Notice change from build: 134267142 (#13751)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-11-20 13:12:51 -08:00
Ben Hillis
1ea3a8e18b
deps: update a number of NuGet packages to the latest available versions (#13728)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-20 11:02:06 -08:00
Blue
f75997128d
Mask systemd-networkd-wait-online.service during boot (#13611) 2025-11-20 09:23:12 -08:00
AlmaLinux Autobot
dbf49f1ae9
chore(distributions): Almalinux auto-update - 20251119 12:04:35 (#13743)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-11-19 15:36:09 -08:00
Ben Hillis
b73897e88a
build: fix minor compiler errors when building with VS2026 (#13744)
* build: fix minor compiler errors when building with VS2026

* s

* use VS2022 for clang format and cross compiling

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-19 15:35:49 -08:00
Ben Hillis
7226b05100
wslsettings: ensure selected setting is auto-expanded and selected (#13689)
* wslsettings: ensure selected setting is auto-selected

Implement keyboard focus management for SettingsExpander controls across settings pages. This resolves an accessibility issue reported internally.

* add asserts

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-18 08:19:50 -08:00
Blue
b6cc29eefc
Localization change from build: 134015316 (#13731)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-11-17 11:18:05 -08:00
Ben Hillis
87c1100620
.clang-format: add InsertBraces: true and minor fix to FormatSource.ps1 (#13712)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-14 16:12:02 -08:00
Ben Hillis
7c010a1e93
wslsettings: add underlines to links in about page (#13703)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-13 13:53:05 -08:00
Ben Hillis
9fad2a1b59
wslsettings: fix OOBE text truncation at 200% text scaling (#13693)
* wslsettings: fix OOBE text truncation at 200% text scaling

Add text scaling factor to window resize calculation and make hero image height responsive to text scaling. Increase minimum window size for better accessibility. Fix MAS 1.4.4 compliance for OOBE dialog.

* pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-13 13:52:29 -08:00
Blue
b2c28b92fe
Localization change from build: 133610492 (#13704)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-11-11 08:12:16 -08:00
Ben Hillis
ea5c29eae7
wslsettings: allow OOBE window to close with escape key (#13686)
* wslsettings: allow OOBE windows to close with escape key

* fix memory leak

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-11-07 12:53:10 -08:00
Scott Bradnick
09c17eb6c6
Remove SLE15SP6; add SLE16.0 (#13647) 2025-11-04 15:56:49 -08:00
Arch Linux Technical User
bafd381aec
archlinux: Release 2025.11.01.150831 (#13661)
This is an automated release [1].

[1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml
2025-11-03 08:15:59 -08:00
AlmaLinux Autobot
d48ece45a4
chore(distributions): Almalinux auto-update - 20251030 17:08:25 (#13653)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-30 13:29:45 -07:00
Blue
ae4347d9df
Notice change from build: 132846777 (#13654)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-10-30 11:42:48 -07:00
Blue
64160a40f0
Make the sample WSL_POST_BUILD_COMMAND more resilient (#13652) 2025-10-30 10:25:03 -07:00
Jeremy Cline
fdfe1eb843
fedora: Add Fedora 43 to the distribution list (#13643)
Six months have gone by, so it's time for another Fedora release. In
addition to the general Fedora updates this release, the WSL image is
now properly suffixed.
2025-10-28 14:45:41 -07:00
Blue
296fe805b9
Localization change from build: 132491007 (#13639)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-10-25 12:09:22 -07:00
Ben Hillis
a231b6b5f9
Fix WslDistributionConfig to not default-initialize FeatureFlags or NetworkingMode optional fields (#13629)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-10-23 08:28:13 -07:00
Blue
2715a79fb4
Localization change from build: 132360042 (#13630)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-10-23 08:27:52 -07:00
Blue
3361736a3a
Localization change from build: 132310101 (#13627)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-10-22 10:42:21 -07:00
Blue
cccae113d7
Localization change from build: 132289123 (#13625)
Co-authored-by: WSL localization <noreply@microsoft.com>
2025-10-22 08:42:54 -07:00
Ben Hillis
9e9ef6f145
Fix edge cases around .vhd support (#13061)
* Fix edge cases around .vhd support

* PR feedback

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* pr feedback

* remove unneeded scope exit in unit test

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 17:00:47 -07:00
Blue
c1b77b125d
Notice change from build: 131949882 (#13608)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-10-16 14:47:32 -06:00
Ben Hillis
dab574ebc1
Update Microsoft.WSL.DeviceHost package to version 1.0.0-20251015.1 which contains support virtioproxy support for ICMP (#13606)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-10-16 13:20:26 -06:00
Ben Hillis
a445eaa89f
Update Microsoft.NETCore.App.Runtime packages version with fix for CVE-2025-55248 (#13607)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-10-16 12:06:26 -07:00
Blue
b3a7b7d395
Add logic to handle partial hvsocket writes and additional logging (#13602) 2025-10-16 10:53:49 -07:00
Blue
0974c302c0
Remove unused LXSS_DISTRO_FLAGS_WSLCORE_MODE (#13603) 2025-10-15 21:42:39 -07:00
Blue
c7aad61611
Improve logging when socket operations fail (#13579)
* Don't throw when processing an empty argument

* Cleanup diff
2025-10-08 18:24:31 -07:00
Blue
5d097195fa
Fix potential service deadlock when plugin returns an error from OnVmStarted (#13569) 2025-10-08 15:40:02 -07:00
Blue
8540b2b6f5
Add WTI rule to detect usermode crashes (#13574) 2025-10-07 15:52:56 -07:00
Ben Hillis
05d6129c4f
Implement clean instance terminate when using systemd (#13552)
* Implement clean instance terminate when using systemd

* pr feedback

* more pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-10-07 15:37:41 -07:00
Hideyuki Nagase
491d8d5707
Update WSLg to 1.0.71 (#13570)
Co-authored-by: Hideyuki Nagase <hideyukn@ntdev.microsoft.com>
2025-10-07 09:29:18 -07:00
Blue
babf0c24f1
Add hypervkvpd.service to the list of discouraged systemd units (#13568) 2025-10-06 17:20:12 -07:00
Blue
9f77522f64
Update the initramfs to set 755 permissions on /init (#13567) 2025-10-06 17:19:49 -07:00
Blue
9b5659d4b9
Respect the distribution manifest ordering when listing distributions (#13561)
* Respect the distribution manifest ordering when listing distributions

* Fix test

* Update test/windows/UnitTests.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-06 12:42:32 -07:00
Blue
d4e64b658f
Add more verbose output to bsdtar to help root cause 'ImportExportStdout' test failures (#13555) 2025-10-03 17:37:40 -07:00
Blue
65eea7b31c
Introduce a new wsl.conf config value to allow distributions to opt-in to cgroupv1 mounts (#13546)
* Introduce a new wsl.conf config value to allow distributions to opt-in to cgroupv1 mounts

* Add test coverage

* Fix tmpfs on wsl1

---------

Co-authored-by: Ben Hillis <benhillis@gmail.com>
2025-10-02 23:36:12 -04:00
Junhao Liao
98f4960118
fix: correct sparse VHD command to include true (#13512)
* fix: correct sparse VHD command to include `true`

* Revert all localization strings to f8c26f7c3 except en-US/Resources.resw

* fix: run validate-localization.py with --fix option
2025-10-01 16:49:49 -07:00
Blue
e0c6196cd5
Create a persistent install log file to help root cause package upgrade issues (#13500)
* Create a persistent install log file to help root cause package upgrade issues

* Update src/windows/common/wslutil.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Collect log file in diagnostic script

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-01 15:40:41 -07:00
Blue
8313d50f2e
Introduce a new kernel command line argument to collect hvsocket event logs during boot (#13537)
* Introduce a new kernel command line argument to collect hvsocket event logs during boot

* Cleanup diff

* unset env

* Add test coverage

* Fix format

* Remove prefix
2025-10-01 15:35:49 -07:00
Arch Linux Technical User
582e15e4e0
archlinux: Release 2025.10.01.148042 (#13547)
This is an automated release [1].

[1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml
2025-10-01 11:08:41 -07:00
Scott Bradnick
004bb36f9e
Swap Leap 16.0 in for Leap 15.6 (#13549)
If we can have Leap 15.6 AND Leap 16.0 (5 total distros), that would be great 

Tumbleweed
SLE 15SP6
SLE 15SP7
Leap 15.6
Leap 16.0
2025-10-01 11:08:29 -07:00
Blue
5c5fd4a1b4
Remove no-op GetRuntimeId() call (#13545) 2025-09-30 13:33:44 -07:00
Blue
332efe1a8d
Fix incorrect timeout causing WSL1 OOBE to fail if the OOBE process takes longer than 30 seconds (#13517)
* Fix incorrect timeout causing WSL1 OOBE to fail if the OOBE process takes longer than 30 seconds

* Pass the timeout to WaitForMessage
2025-09-24 19:58:39 -07:00
Blue
4bba074bd2
Add logic to force terminate the VM if the session lock can't be acquired for 30 seconds when the service stops (#13493) 2025-09-24 14:46:28 -07:00
Blue
c8cd16a169
Add a logging profile to collect hvsocket logs (#13510) 2025-09-24 14:46:01 -07:00
Scott Bradnick
95fcc56983
Update openSUSE Tumbleweed v20250923.0 (#13515)
Updating .appx and .wsl offerings.
2025-09-24 11:37:37 -07:00
g0tmi1k
2d976b2ef9
Bump Kali 2025.3 (#13516)
Release notes: https://www.kali.org/blog/kali-linux-2025-3-release/
2025-09-24 11:37:26 -07:00
rodeka
f8c26f7c32
fix: UnboundLocalError in create-release.py (#13499) 2025-09-22 14:18:54 -07:00
Blue
7b17a7a7ab
Add WININET_E_TIMEOUT to g_commonErrors (#13506) 2025-09-22 13:32:12 -07:00
Blue
259ec4e5a9
Remove explicit '--tags' argument from find-release.py (#13481) 2025-09-17 11:27:21 -07:00
Blue
04eb4d4e8f
Increase the MSI installation timeout to 20 minutes (#13489)
* Increase the MSI installation timeout to 20 minutes

* Increase the MSI installation timeout to 20 minutes
2025-09-17 11:27:12 -07:00
Blue
b9e74a3361
Set TargetLatestRuntimePatch to false to prevent automatic framework version increases (#13483)
* Add lock files to wslsettings target to prevent automatic nuget version increases

* Update lock

* Update lock

* Enable strict mode

* Experiment

* Save state

* Experiment

* Experiment

* Experiment

* Experiment

* Experiment

* Experiment

* Experiment

* Try to set a matching version in packages.config

* Try to set a matching version in packages.config

* Experiment

* Experiment

* Experiment

* Restore pipeline

* Experiment

* Experiment

* Experiment

* Experiment

* Experiment

* Experiment

* Simplify

* Remove lock files
2025-09-16 17:46:53 -07:00
Blue
146a7511a5
Add VID event providers to WSL log profile (#13488) 2025-09-16 14:12:38 -07:00
Blue
2eac1dafec
Configure defender process exceptions when running tests (#13470)
* Configure defender process exceptions when running tests

* Use explicit %ls

* Save state

* Save state

* Add exceptions before the package is installed

* Remove extra call
2025-09-10 19:36:25 -07:00
Ben Hillis
25f7a7b38c
Notice change from build: 129899373 (#13475)
Co-authored-by: WSL notice <noreply@microsoft.com>
2025-09-10 19:35:02 -07:00
Ben Hillis
d43b725b3d
Fix: Always use 'WSLInterop` as the binfmt name (#13467)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-09-09 09:28:11 -07:00
Ben Hillis
36c077bd69
logging: add more settings to vm create begin / end events. (#13412)
* logging: add more settings to vm create begin / end events.

* pr feedback, less string allocations'

* Handle empty user module list differently

* pr feedback

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-09-08 15:32:35 -07:00
Ben Hillis
3e322b719c
Update Microsoft .NET and AppSDK nuget packages. (#13450)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-09-07 12:00:21 -07:00
Scott Bradnick
94f44b692c
SLE15SP7 QU1 update (#13447)
Updating "Url" and "Sha256" for '"Name": "SUSE-Linux-Enterprise-15-SP7"'.
2025-09-03 12:46:07 -07:00
Arch Linux Technical User
513fc5c0c1
archlinux: Release 2025.09.01.145298 (#13442)
This is an automated release [1].

[1] https://gitlab.archlinux.org/archlinux/archlinux-wsl/-/blob/main/.gitlab-ci.yml
2025-09-03 08:54:16 -07:00
Carlos Nihelton
feb9ad97a4
More stable link for Ubuntu and Ubuntu-24.04 (#13418)
The existing AMD64 link (using the release name - noble in this case) will
break next year as it did two weeks ago when Ubuntu 24.04.3 LTS was
released.

The link I propose here will remain stable when the next point release
comes out, following the same pattern already in place for ARM64.

To prove my point we can use this pattern to fetch the previous version
of Ubuntu 24.04:

- This works:
https://releases.ubuntu.com/24.04.2/ubuntu-24.04.2-wsl-amd64.wsl

- This doesn't:
https://releases.ubuntu.com/noble/ubuntu-24.04.2-wsl-amd64.wsl
2025-08-22 11:03:21 -07:00
Carlos Nihelton
8de7016905
Remove Ubuntu-18.04 (#13419)
This distro is being out of standard support for a while now.
Users should really be on more recent LTS releases.
2025-08-22 11:02:58 -07:00
Blue
39b4cd8873
Various fixes in validate-modern.py (#13405)
* Various fixes in validate-modern.py

* Update distributions/validate-modern.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fix copilot diff

* Fix copilot diff

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-18 14:07:40 -07:00
Ben Hillis
dc34ebfd8c
Fix for CVE-2025-53788 (#13392)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-08-15 07:13:22 -07:00
Ben Hillis
fd3b858064
Relaunch the debug shell after it exits. (#13379)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-08-13 16:31:37 -07:00
Blue
6121b56152
Disable HTTP cache when reading the distribution manifest over HTTP (#13383) 2025-08-13 11:29:25 -07:00
Copilot
17bd3716b4
Remove hardcoded --cd ~ from WSL terminal fragment profiles to support Terminal's startingDirectory (#13350)
* Initial plan

* Fix WSL terminal fragment profiles to support Terminal's startingDirectory

Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>

* clang format

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-08-11 14:08:39 -07:00
Robert Haist
267bbb7426
Update DistributionInfo.json for Debian 13 release (#13371) 2025-08-11 11:37:22 -07:00
Ben Hillis
ca1f883dd0
wslg: update to latest version which uses wslinfo --vm-id instead of env var (#13361)
Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
2025-08-08 13:29:29 -07:00
Copilot
3794ba3496
Add comprehensive GitHub Copilot instructions for WSL development (#13352)
* Initial plan

* Add comprehensive GitHub Copilot instructions for WSL repository

Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>

* Address reviewer feedback: fix build commands and test parameters

Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: benhillis <17727402+benhillis@users.noreply.github.com>
2025-08-07 17:24:23 -04:00
Kevin Jagodic
4b237351a9
Ubuntu version links updated. (#13355)
* Update DistributionInfo.json

* Update SHA256 for Ubuntu WSL distributions

* Update distributions/DistributionInfo.json

Co-authored-by: Carlos Nihelton <cnihelton@ubuntu.com>

* Update distributions/DistributionInfo.json

Co-authored-by: Carlos Nihelton <cnihelton@ubuntu.com>

---------

Co-authored-by: Carlos Nihelton <cnihelton@ubuntu.com>
2025-08-07 13:03:58 -07:00
157 changed files with 5050 additions and 4813 deletions

View File

@ -58,6 +58,7 @@ IncludeCategories:
- Regex: '^"(stdafx.h|pch.h|precomp.h)"$'
Priority: -1
IndentCaseLabels: false
InsertBraces: true
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true

218
.github/copilot-instructions.md vendored Normal file
View File

@ -0,0 +1,218 @@
# Windows Subsystem for Linux (WSL)
**ALWAYS reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.**
WSL is the Windows Subsystem for Linux - a compatibility layer for running Linux binary executables natively on Windows. This repository contains the core Windows components that enable WSL functionality.
## Working Effectively
### Critical Platform Requirements
- **Full builds ONLY work on Windows** with Visual Studio and Windows SDK 26100
- **DO NOT attempt to build the main WSL components on Linux** - they require Windows-specific APIs, MSBuild, and Visual Studio toolchain
- Many validation and development tasks CAN be performed on Linux (documentation, formatting, Python validation scripts)
### Windows Build Requirements (Required for Full Development)
- CMake >= 3.25 (`winget install Kitware.CMake`)
- Visual Studio with these components:
- Windows SDK 26100
- MSBuild
- Universal Windows platform support for v143 build tools (X64 and ARM64)
- MSVC v143 - VS 2022 C++ ARM64 build tools (Latest + Spectre) (X64 and ARM64)
- C++ core features
- C++ ATL for latest v143 tools (X64 and ARM64)
- C++ Clang compiler for Windows
- .NET desktop development
- .NET WinUI app development tools
- Enable Developer Mode in Windows Settings OR run with Administrator privileges (required for symbolic link support)
### Building WSL (Windows Only)
1. Clone the repository
2. Generate Visual Studio solution: `cmake .`
3. Build: `cmake --build . -- -m` OR open `wsl.sln` in Visual Studio
4. **NEVER CANCEL: Build takes 20-45 minutes on typical hardware. Set timeout to 60+ minutes.**
Build parameters:
- `cmake . -A arm64` - Build for ARM64
- `cmake . -DCMAKE_BUILD_TYPE=Release` - Release build
- `cmake . -DBUILD_BUNDLE=TRUE` - Build bundle msix package (requires ARM64 built first)
### Deploying WSL (Windows Only)
- Install MSI: `bin\<platform>\<target>\wsl.msi`
- OR use script: `powershell tools\deploy\deploy-to-host.ps1`
- For Hyper-V VM: `powershell tools\deploy\deploy-to-vm.ps1 -VmName <vm> -Username <user> -Password <pass>`
## Cross-Platform Development Tasks
### Documentation (Works on Linux/Windows)
- Install tools: `pip install mkdocs-mermaid2-plugin mkdocs --break-system-packages`
- Build docs: `mkdocs build -f doc/mkdocs.yml`
- **Build time: ~0.5 seconds. Set timeout to 5+ minutes for safety.**
- Output location: `doc/site/`
- **Note**: May show warnings about mermaid CDN access on restricted networks
### Code Formatting and Validation (Works on Linux/Windows)
- Format check: `clang-format --dry-run --style=file <files>`
- Apply formatting: `clang-format -i --style=file <files>`
- Format all source: `powershell formatsource.ps1` (available at repo root after running `cmake .`)
- Validate copyright headers: `python3 tools/devops/validate-copyright-headers.py`
- **Note**: Will report missing headers in generated/dependency files (_deps/), which is expected
- Validate localization: `python3 tools/devops/validate-localization.py`
- **Note**: Only works after Windows build (requires localization/strings/en-us/Resources.resw)
### Distribution Validation (Limited on Linux)
- Validate distribution info: `python3 distributions/validate.py distributions/DistributionInfo.json`
- **Note**: May fail on Linux due to network restrictions accessing distribution URLs
## Testing
### Unit Tests (Windows Only - TAEF Framework)
- Run all tests: `bin\<platform>\<target>\test.bat`
- **NEVER CANCEL: Full test suite takes 30-60 minutes. Set timeout to 90+ minutes.**
- Run subset: `bin\<platform>\<target>\test.bat /name:*UnitTest*`
- Run specific test: `bin\<platform>\<target>\test.bat /name:<class>::<test>`
- WSL1 tests: Add `-Version 1` flag
- Fast mode (after first run): Add `-f` flag (requires `wsl --set-default test_distro`)
Test debugging:
- Wait for debugger: `/waitfordebugger`
- Break on failure: `/breakonfailure`
- Run in-process: `/inproc`
### Linux Unit Tests (Linux Only)
- Location: `test/linux/unit_tests/`
- Build script: `test/linux/unit_tests/build_tests.sh`
- **Note**: Requires specific Linux build environment setup not covered in main build process
## Validation Scenarios
### Always Test These After Changes:
1. **Documentation Build**: Run `mkdocs build -f doc/mkdocs.yml` and verify no errors
2. **Code Formatting**: Run `clang-format --dry-run --style=file` on changed files
3. **Windows Build** (if on Windows): Full cmake build cycle
4. **Distribution Validation**: Run Python validation scripts on any distribution changes
### Manual Validation Requirements
- **Windows builds**: Install MSI and test basic WSL functionality (`wsl --version`, `wsl -l`)
- **Documentation changes**: Review generated HTML in `doc/site/`
- **Distribution changes**: Test with actual WSL distribution installation
## Repository Navigation
### Key Directories
- `src/windows/` - Main Windows WSL service components
- `src/linux/` - Linux-side WSL components
- `src/shared/` - Shared code between Windows and Linux
- `test/windows/` - Windows-based tests (TAEF framework)
- `test/linux/unit_tests/` - Linux unit test suite
- `doc/` - Documentation source (MkDocs)
- `tools/` - Build and deployment scripts
- `distributions/` - Distribution validation and metadata
### Key Files
- `CMakeLists.txt` - Main build configuration
- `doc/docs/dev-loop.md` - Developer build instructions
- `test/README.md` - Testing framework documentation
- `CONTRIBUTING.md` - Contribution guidelines
- `.clang-format` - Code formatting rules
- `UserConfig.cmake.sample` - Optional build customizations
### Frequently Used Commands (Platform-Specific)
#### Windows Development:
```bash
# Initial setup
cmake .
cmake --build . -- -m # 20-45 minutes, NEVER CANCEL
# Deploy and test
powershell tools\deploy\deploy-to-host.ps1
wsl --version
# Run tests
bin\x64\debug\test.bat # 30-60 minutes, NEVER CANCEL
```
#### Cross-Platform Validation:
```bash
# Documentation (0.5 seconds)
mkdocs build -f doc/mkdocs.yml
# Code formatting
find src -name "*.cpp" -o -name "*.h" | xargs clang-format --dry-run --style=file
# Copyright header validation (reports expected issues in _deps/)
python3 tools/devops/validate-copyright-headers.py
# Distribution validation (may fail on networks without external access)
python3 distributions/validate.py distributions/DistributionInfo.json
```
## Debugging and Logging
### ETL Tracing (Windows Only)
```powershell
# Collect traces
wpr -start diagnostics\wsl.wprp -filemode
# [reproduce issue]
wpr -stop logs.ETL
```
### Log Analysis Tools
- Use WPA (Windows Performance Analyzer) for ETL traces
- Key providers: `Microsoft.Windows.Lxss.Manager`, `Microsoft.Windows.Subsystem.Lxss`
### Debug Console (Linux)
Add to `%USERPROFILE%\.wslconfig`:
```ini
[wsl2]
debugConsole=true
```
### Common Debugging Commands
- Debug shell: `wsl --debug-shell`
- Collect WSL logs: `powershell diagnostics\collect-wsl-logs.ps1`
- Network logs: `powershell diagnostics\collect-networking-logs.ps1`
## Critical Timing and Timeout Guidelines
**NEVER CANCEL these operations - always wait for completion:**
- **Full Windows build**: 20-45 minutes (set timeout: 60+ minutes)
- **Full test suite**: 30-60 minutes (set timeout: 90+ minutes)
- **Unit test subset**: 5-15 minutes (set timeout: 30+ minutes)
- **Documentation build**: ~0.5 seconds (set timeout: 5+ minutes)
- **Distribution validation**: 2-5 minutes (set timeout: 15+ minutes)
## CI/CD Integration
### GitHub Actions
- **distributions.yml**: Validates distribution metadata (Linux)
- **documentation.yml**: Builds and deploys docs (Linux)
- **modern-distributions.yml**: Tests modern distribution support
### Pre-commit Validation
Always run before committing:
1. `clang-format --dry-run --style=file` on changed C++ files
2. `python3 tools/devops/validate-copyright-headers.py` (ignore _deps/ warnings)
3. `mkdocs build -f doc/mkdocs.yml` if documentation changed
4. Full Windows build if core components changed
**Note**: The `.gitignore` file properly excludes build artifacts (*.sln, *.dll, *.pdb, obj/, bin/, etc.) - do not commit these files.
## Development Environment Setup
### Windows (Full Development)
1. Install Visual Studio with required components (listed above)
2. Install CMake 3.25+
3. Enable Developer Mode
4. Clone repository
5. Run `cmake .` to generate solution
### Linux (Documentation/Validation Only)
1. Install Python 3.8+
2. Install clang-format
3. Install docs tools: `pip install mkdocs-mermaid2-plugin mkdocs`
4. Clone repository
5. Run validation commands as needed
Remember: **This is a Windows-focused project**. While some tasks can be performed on Linux, full WSL development requires Windows with Visual Studio.

1
.gitignore vendored
View File

@ -6,6 +6,7 @@ tmp
/.vs/
/.vscode/
*.sln
*.slnx
*.user
*.csproj
*.vcxproj

View File

@ -24,7 +24,7 @@ parameters:
type: object
default:
- target: "wsl;libwsl;wslg;wslservice;wslhost;wslrelay;wslinstaller;wslinstall;initramfs;wslserviceproxystub;wslsettings;wslinstallerproxystub;testplugin"
pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings.dll,wslsettings.exe,wslinstallerproxystub.dll,wsldevicehost.dll,lxutil.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll"
pattern: "wsl.exe,libwsl.dll,wslg.exe,wslservice.exe,wslhost.exe,wslrelay.exe,wslinstaller.exe,wslinstall.dll,wslserviceproxystub.dll,wslsettings.dll,wslsettings.exe,wslinstallerproxystub.dll,wsldevicehost.dll,WSLDVCPlugin.dll,testplugin.dll,wsldeps.dll"
- target: "msixgluepackage"
pattern: "gluepackage.msix"
- target: "msipackage"

View File

@ -67,7 +67,7 @@ stages:
displayName: Copy AppxUpload artifact
# creates a submission package that is published to the store; containers store page information and the WSL appxupload
- task: MS-RDX-MRO.windows-store-publish-dev.package-task.store-package@3
- task: MS-RDX-MRO.windows-store-publish.package-task.store-package@3
displayName: 'Creating StoreBroker Payload'
inputs:
serviceEndpoint: 'AzureConnection-StoreBroker-WIF'
@ -88,7 +88,7 @@ stages:
displayName: Copy StoreBrokerPayload to drop
# submit the package flight to the WSL SelfHost Flight Group
- task: MS-RDX-MRO.windows-store-publish-dev.flight-task.store-flight@3
- task: MS-RDX-MRO.windows-store-publish.flight-task.store-flight@3
displayName: 'Flight StoreBroker Package to Partner Center - WSL SelfHost Flight Group'
condition: and(succeeded(), eq('${{ parameters.publishPackage }}', true))
inputs:

View File

@ -34,8 +34,8 @@ FetchContent_GetProperties(GSL SOURCE_DIR GSL_SOURCE_DIR)
FetchContent_Declare(nlohmannjson
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
URL_HASH SHA256=d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d)
URL https://github.com/nlohmann/json/releases/download/v3.12.0/json.tar.xz
URL_HASH SHA256=42f6e95cad6ec532fd372391373363b62a14af6d771056dbfc86160e6dfff7aa )
FetchContent_MakeAvailable(nlohmannjson)
FetchContent_GetProperties(nlohmannjson SOURCE_DIR NLOHMAN_JSON_SOURCE_DIR)
@ -74,13 +74,11 @@ find_nuget_package(Wix WIX /tools/net6.0/any)
if (${TARGET_PLATFORM} STREQUAL "x64")
find_nuget_package(Microsoft.DXCore.Linux.amd64fre DXCORE /build/native)
find_nuget_package(Microsoft.WSL.Dependencies.amd64fre WSLDEPS /build/native)
find_nuget_package(Microsoft.WSL.LxUtil.amd64fre LXUTIL /build/native)
endif()
if (${TARGET_PLATFORM} STREQUAL "arm64")
find_nuget_package(Microsoft.DXCore.Linux.arm64fre DXCORE /build/native)
find_nuget_package(Microsoft.WSL.Dependencies.arm64fre WSLDEPS /build/native)
find_nuget_package(Microsoft.WSL.LxUtil.arm64fre LXUTIL /build/native)
endif()
# Wsl Settings packages
@ -152,7 +150,6 @@ file(MAKE_DIRECTORY ${GENERATED_DIR})
set(PACKAGE_CERTIFICATE ${GENERATED_DIR}/dev-cert.pfx)
file(CREATE_LINK ${WSL_DEVICE_HOST_SOURCE_DIR}/bin/${TARGET_PLATFORM}/wsldevicehost.dll ${BIN}/wsldevicehost.dll)
file(CREATE_LINK ${LXUTIL_SOURCE_DIR}/bin/lxutil.dll ${BIN}/lxutil.dll)
file(CREATE_LINK ${WSLG_SOURCE_DIR}/${TARGET_PLATFORM}/${WSLG_TS_PLUGIN_DLL} ${BIN}/${WSLG_TS_PLUGIN_DLL})
file(CREATE_LINK ${WSLDEPS_SOURCE_DIR}/bin/wsldeps.dll ${BIN}/wsldeps.dll)
@ -203,7 +200,6 @@ add_compile_definitions(UNICODE
WSL_DEVICE_HOST_VERSION="${WSL_DEVICE_HOST_VERSION}"
COMMIT_HASH="${COMMIT_HASH}"
WSL_PACKAGE_VERSION="${PACKAGE_VERSION}"
LXUTIL_VERSION="${LXUTIL_VERSION}"
MSRDC_VERSION="${MSRDC_VERSION}"
DIRECT3D_VERSION="${DIRECT3D_VERSION}"
DXCORE_VERSION="${DXCORE_VERSION}"
@ -235,7 +231,6 @@ endif()
# Common link libraries
link_directories(${WSLDEPS_SOURCE_DIR}/lib/)
link_directories(${LXUTIL_SOURCE_DIR}/lib/)
set(COMMON_LINK_LIBRARIES
ws2_32.lib
Userenv.lib
@ -266,15 +261,16 @@ else()
endif()
# Determine the Visual Studio installation directory which contains LLVM tools
# N.B. The version is set to VS2022 to ensure local runs match pipeline behavior
execute_process(
COMMAND "${VSWHERE_SOURCE_DIR}/vswhere.exe" -latest -products * -property installationPath
COMMAND "${VSWHERE_SOURCE_DIR}/vswhere.exe" -version "[17.0,18.0)" -products * -property installationPath
OUTPUT_VARIABLE VS_INSTALL_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE
COMMAND_ERROR_IS_FATAL ANY
)
if (NOT VS_INSTALL_DIR)
message(FATAL_ERROR "Could not determine Visual Studio installation directory.")
message(FATAL_ERROR "Could not determine Visual Studio 2022 installation directory.")
endif()
if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "AMD64")

1361
NOTICE.txt

File diff suppressed because it is too large Load Diff

View File

@ -30,7 +30,7 @@ message(STATUS "Loading user configuration")
# set(WSL_BUILD_THIN_PACKAGE true)
# # Uncomment to install the package as part of the build
# set(WSL_POST_BUILD_COMMAND "powershell;./tools/deploy/deploy-to-host.ps1")
# set(WSL_POST_BUILD_COMMAND "powershell;-ExecutionPolicy;Bypass;-NoProfile;-NonInteractive;./tools/deploy/deploy-to-host.ps1")
# # Uncomment to reduce the verbosity of the appx package build
# set(WSL_SILENT_APPX_BUILD true)

View File

@ -21,6 +21,10 @@ if ($LogProfile -eq $null -Or ![System.IO.File]::Exists($LogProfile))
{
$url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_storage.wprp"
}
elseif ($LogProfile -eq "hvsocket")
{
$url = "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/wsl_hvsocket.wprp"
}
else
{
Write-Error "Unknown log profile: $LogProfile"
@ -52,6 +56,8 @@ if (Test-Path $wslconfig)
Copy-Item $wslconfig $folder | Out-Null
}
Copy-Item "C:\Windows\temp\wsl-install-log.txt" $folder -ErrorAction ignore
get-appxpackage MicrosoftCorporationII.WindowsSubsystemforLinux -ErrorAction Ignore > $folder/appxpackage.txt
get-acl "C:\ProgramData\Microsoft\Windows\WindowsApps" -ErrorAction Ignore | Format-List > $folder/acl.txt
Get-WindowsOptionalFeature -Online > $folder/optional-components.txt

View File

@ -43,6 +43,8 @@
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.ProvLaunch" Name="08FACCFA-125D-4ED6-B0B7-B4A1A912E693" />
<EventProvider Id="EventProvider_Microsoft.Windows.EMPS.Enrollment" Name="E74EFD1A-B62D-4B83-AB00-66F4A166A2D3" />
<EventProvider Id="EventProvider_Microsoft.Windows.EnterpriseManagement.Enrollment" Name="F9E3B648-9AF1-4DC3-9A8E-BF42C0FBCE9A" />
<EventProvider Id="Microsoft.Windows.HyperV.Vid" Name="1111450B-DACC-40A3-84AB-F7DBA4A6E63A" NonPagedMemory="true"/>
<EventProvider Id="Microsoft-Windows-HyperV-Vid" Name="5931D877-4860-4ee7-A95C-610A5F0D1407" NonPagedMemory="true" />
<EventProvider Id="virtdisk_wpp" Name="e14dcdd9-d1ec-4dc3-8395-a606df8ef115" Level="4">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
@ -143,6 +145,8 @@
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.ProvLaunch"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.EMPS.Enrollment"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.EnterpriseManagement.Enrollment"/>
<EventProviderId Value="Microsoft.Windows.HyperV.Vid"/>
<EventProviderId Value="Microsoft-Windows-HyperV-Vid"/>
<EventProviderId Value="virtdisk"/>
<EventProviderId Value="virtdisk_wpp"/>
<EventProviderId Value="vhdmp"/>

View File

@ -0,0 +1,172 @@
<?xml version="1.0"?>
<WindowsPerformanceRecorder Version="1">
<Profiles>
<EventCollector Id="Collector" Name="Collector">
<BufferSize Value="512" />
<Buffers Value="10" PercentageOfTotalMemory="true"/>
</EventCollector>
<EventProvider Id="EventProvider_HvSocketTraceProvider" Name="B2ED3BDB-CD74-5B2C-F660-85079CA074B3" NonPagedMemory="true">
<Keywords>
<Keyword Value="0x0"/>
</Keywords>
</EventProvider>
<EventProvider Id="lxcore_kernel" Name="0CD1C309-0878-4515-83DB-749843B3F5C9"/>
<EventProvider Id="lxcore_user" Name="D90B9468-67F0-5B3B-42CC-82AC81FFD960"/>
<EventProvider Id="lxcore_service" Name="B99CDB5A-039C-5046-E672-1A0DE0A40211"/>
<EventProvider Id="wsl_devicehost" Name="9d6c7b9e-2581-4d8a-b8c5-b90b4a17094a"/>
<EventProvider Id="wslclient" Name="8cbb7724-7223-5d6f-8137-564dac45104d"/>
<EventProvider Id="wslapi" Name="beb94edf-1a7b-5058-0696-ff9e6b1798d1"/>
<EventProvider Id="vm_chipset" Name="de9ba731-7f33-4f44-98c9-6cac856b9f83"/>
<EventProvider Id="vmcompute_dll" Name="AF7FD3A7-B248-460C-A9F5-FEC39EF8468C"/>
<EventProvider Id="vmcompute" Name="17103E3F-3C6E-4677-BB17-3B267EB5BE57"/>
<EventProvider Id="vmmm" Name="6066F867-7CA1-4418-85FD-36E3F9C0600C"/>
<EventProvider Id="vmwp" Name="51DDFA29-D5C8-4803-BE4B-2ECB715570FE"/>
<EventProvider Id="9p" Name="e13c8d52-b153-571f-78c5-1d4098af2a1e"/>
<EventProvider Id="9p_errors" Name="06C601B3-6957-4F8C-A15F-74875B24429D" />
<EventProvider Id="p9rdr" Name="bb1d36f0-e0e0-48cc-9493-fef0e3d0b28c" />
<EventProvider Id="mup" Name="20c46239-d059-4214-a11e-7d6769cbe020" />
<EventProvider Id="rfsmon" Name="51734B23-5B7E-4892-BA8E-45BC110B735C" />
<EventProvider Id="hyperv_storage" Name="c7ad62c6-5c99-5a1b-bbc4-0821ae5b765e" />
<EventProvider Id="hns" Name="0c885e0d-6eb6-476c-a048-2457eed3a5c1" />
<EventProvider Id="netmgmt" Name="93f693dc-9163-4dee-af64-d855218af242" />
<EventProvider Id="EventProvider_Microsoft.Windows.Mobile.Provisioning.AppDownload" Name="0BBE6221-EF09-4A3F-82EE-BE00DBB6A98A" />
<EventProvider Id="EventProvider_Microsoft.Windows.Mobile.Provisioning.Datastore" Name="42C60CEA-0FE7-4541-A86B-9E11F95BD9BF" />
<EventProvider Id="EventProvider_Microsoft.Windows.Mobile.Provisioning.PhoneProvisioner" Name="B876B1FC-C7F1-443E-9012-86677F7DE580" />
<EventProvider Id="EventProvider_Microsoft.Windows.Mobile.Provisioning.PPOEM" Name="7EDBED09-1FF7-4FEE-B8C3-5DB694420830" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.API" Name="82ADD491-01D7-4B85-9EAD-192C3CAACA23" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.CSP" Name="16E12400-A2D8-44B7-9479-004568EC7819" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Engine" Name="A6A847B7-4429-49AA-BBA6-2AD8C191AC8C" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Handlers" Name="0383D92C-2337-4F25-A0B5-A51767F04746" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Migration" Name="A0AF985E-83F9-4E1A-B658-338DCFE27893" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Operations" Name="7F99598F-B2C1-4371-9911-63DEE13B9EB1" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Platform" Name="B1F30020-8BC3-4888-BB1B-4DD681F24209" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Plugin.Engine" Name="55239D60-0EB6-495B-874E-15DE5D5F9A70" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.Plugin.RemovableMedia" Name="B55883E6-6C45-45C2-AB9D-800BB7B66B13" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.ProvTool" Name="2BF4B6BA-556E-4D05-8534-CAFEDF19FED8" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.CommandCsp" Name="00BB69FC-60BC-4502-9438-25608F375CCB" />
<EventProvider Id="EventProvider_Microsoft.Windows.Provisioning.ProvLaunch" Name="08FACCFA-125D-4ED6-B0B7-B4A1A912E693" />
<EventProvider Id="EventProvider_Microsoft.Windows.EMPS.Enrollment" Name="E74EFD1A-B62D-4B83-AB00-66F4A166A2D3" />
<EventProvider Id="EventProvider_Microsoft.Windows.EnterpriseManagement.Enrollment" Name="F9E3B648-9AF1-4DC3-9A8E-BF42C0FBCE9A" />
<EventProvider Id="Microsoft.Windows.HyperV.Vid" Name="1111450B-DACC-40A3-84AB-F7DBA4A6E63A" NonPagedMemory="true"/>
<EventProvider Id="Microsoft-Windows-HyperV-Vid" Name="5931D877-4860-4ee7-A95C-610A5F0D1407" NonPagedMemory="true" />
<EventProvider Id="virtdisk_wpp" Name="e14dcdd9-d1ec-4dc3-8395-a606df8ef115" Level="4">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="virtdisk" Name="4D20DF22-E177-4514-A369-F1759FEEDEB3" Level="4">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="vhdmp" Name="E2816346-87F4-4F85-95C3-0C79409AA89D" NonPagedMemory="true" Level="4">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFD" />
</Keywords>
</EventProvider>
<EventProvider Id="vhdmp_wpp" Name="3c70c3b0-2fae-41d3-b68d-8f7fcaf79adb" NonPagedMemory="true" Level="5">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="storvsp" Name="10b3d268-9782-49a4-aacc-a93c5482cb6f" NonPagedMemory="true" Level="4">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="HyperV_SyntheticStorage" Name="EDACD782-2564-4497-ADE6-7199377850F2" Level="6">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="HyperV_EmulatedStorage" Name="86E15E01-EDF1-4AC7-89CF-B19563FD6894" Level="6">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="EventProvider_Telemetry_StorVSP" Name="544d0787-9f6d-432e-8414-e035a8b0541d">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<EventProvider Id="EventProvider_Trace_Vhdmp" Name="dc284fb3-1eab-4854-828a-b25417280280" Level="3">
<Keywords>
<Keyword Value="0xFFFFFFFFFFFFFFFF" />
</Keywords>
</EventProvider>
<Profile
Id="WSL.Verbose.File"
Name="WSL"
Description="Traces for all WSL components"
LoggingMode="File"
DetailLevel="Verbose"
>
<Collectors>
<EventCollectorId Value="Collector">
<EventProviders>
<EventProviderId Value="lxcore_kernel"/>
<EventProviderId Value="lxcore_user"/>
<EventProviderId Value="lxcore_service"/>
<EventProviderId Value="wsl_devicehost"/>
<EventProviderId Value="wslclient"/>
<EventProviderId Value="wslapi"/>
<EventProviderId Value="vm_chipset"/>
<EventProviderId Value="vmcompute_dll"/>
<EventProviderId Value="vmcompute"/>
<EventProviderId Value="vmmm"/>
<EventProviderId Value="vmwp"/>
<EventProviderId Value="9p"/>
<EventProviderId Value="9p_errors"/>
<EventProviderId Value="p9rdr"/>
<EventProviderId Value="mup"/>
<EventProviderId Value="rfsmon"/>
<EventProviderId Value="hyperv_storage"/>
<EventProviderId Value="hns"/>
<EventProviderId Value="netmgmt"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Mobile.Provisioning.AppDownload"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Mobile.Provisioning.Datastore"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Mobile.Provisioning.PhoneProvisioner"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Mobile.Provisioning.PPOEM"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.CSP"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Engine"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Migration"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Platform"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Operations"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Plugin.Engine"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Plugin.RemovableMedia"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.ProvTool"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.Operations"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.CommandCsp"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.Provisioning.ProvLaunch"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.EMPS.Enrollment"/>
<EventProviderId Value="EventProvider_Microsoft.Windows.EnterpriseManagement.Enrollment"/>
<EventProviderId Value="Microsoft.Windows.HyperV.Vid"/>
<EventProviderId Value="Microsoft-Windows-HyperV-Vid"/>
<EventProviderId Value="virtdisk"/>
<EventProviderId Value="virtdisk_wpp"/>
<EventProviderId Value="vhdmp"/>
<EventProviderId Value="vhdmp_wpp"/>
<EventProviderId Value="storvsp"/>
<EventProviderId Value="HyperV_SyntheticStorage"/>
<EventProviderId Value="HyperV_EmulatedStorage"/>
<EventProviderId Value="EventProvider_Telemetry_StorVSP"/>
<EventProviderId Value="EventProvider_Trace_Vhdmp"/>
<EventProviderId Value="EventProvider_HvSocketTraceProvider" />
</EventProviders>
</EventCollectorId>
</Collectors>
</Profile>
</Profiles>
</WindowsPerformanceRecorder>

View File

@ -6,12 +6,12 @@
"FriendlyName": "Ubuntu",
"Default": true,
"Amd64Url": {
"Url": "https://releases.ubuntu.com/noble/ubuntu-24.04.2-wsl-amd64.wsl",
"Sha256": "5d1eea52103166f1c460dc012ed325c6eb31d2ce16ef6a00ffdfda8e99e12f43"
"Url": "https://releases.ubuntu.com/24.04.3/ubuntu-24.04.3-wsl-amd64.wsl",
"Sha256": "c74833a55e525b1e99e1541509c566bb3e32bdb53bf27ea3347174364a57f47c"
},
"Arm64Url": {
"Url": "https://cdimages.ubuntu.com/releases/24.04.2/release/ubuntu-24.04.2-wsl-arm64.wsl",
"Sha256": "75e6660229fabb38a6fdc1c94eec7d834a565fa58a64b7534e540da5319b2576"
"Url": "https://cdimages.ubuntu.com/releases/24.04.3/release/ubuntu-24.04.3-wsl-arm64.wsl",
"Sha256": "edaf375ea0d1319da08e7154e9bc64cd4eead5af21ea032f2edaa335fadf0970"
}
},
{
@ -19,12 +19,12 @@
"FriendlyName": "Ubuntu 24.04 LTS",
"Default": false,
"Amd64Url": {
"Url": "https://releases.ubuntu.com/noble/ubuntu-24.04.2-wsl-amd64.wsl",
"Sha256": "5d1eea52103166f1c460dc012ed325c6eb31d2ce16ef6a00ffdfda8e99e12f43"
"Url": "https://releases.ubuntu.com/24.04.3/ubuntu-24.04.3-wsl-amd64.wsl",
"Sha256": "c74833a55e525b1e99e1541509c566bb3e32bdb53bf27ea3347174364a57f47c"
},
"Arm64Url": {
"Url": "https://cdimages.ubuntu.com/releases/24.04.2/release/ubuntu-24.04.2-wsl-arm64.wsl",
"Sha256": "75e6660229fabb38a6fdc1c94eec7d834a565fa58a64b7534e540da5319b2576"
"Url": "https://cdimages.ubuntu.com/releases/24.04.3/release/ubuntu-24.04.3-wsl-arm64.wsl",
"Sha256": "edaf375ea0d1319da08e7154e9bc64cd4eead5af21ea032f2edaa335fadf0970"
}
}
],
@ -34,45 +34,45 @@
"FriendlyName": "openSUSE Tumbleweed",
"Default": true,
"Amd64Url": {
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250618.0/openSUSE-Tumbleweed-20250616.x86_64-19.23-Build19.23.wsl",
"Sha256": "0x806cc94e57a2205d3ac1d5397d9a41c7d3b3337d958ca180f75d152fca756ebd"
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250923.0/openSUSE-Tumbleweed-20250922.x86_64-22.59-Build22.59.wsl",
"Sha256": "0x31124e3645d88b079469a57062af795b04922d3baacfb70c6dad2524c2bfc8c0"
},
"Arm64Url": {
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250618.0/openSUSE-Tumbleweed-20250616.aarch64-19.57-Build19.57.wsl",
"Sha256": "0x4d2b14287dd6bade7de1ff901079c2c438ce19d519c951bfdf98d2dfc049c65a"
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250923.0/openSUSE-Tumbleweed-20250922.aarch64-22.124-Build22.124.wsl",
"Sha256": "0x0202195a7e03bb45e7ff95e9929b977db899ce85ccaa1195bdab4a74783e9bf7"
}
},
{
"Name": "openSUSE-Leap-15.6",
"FriendlyName": "openSUSE Leap 15.6",
"Name": "openSUSE-Leap-16.0",
"FriendlyName": "openSUSE Leap 16.0",
"Default": false,
"Amd64Url": {
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250320.0/openSUSE-Leap-15.6-15.6.x86_64-15.2-Build15.2.wsl",
"Sha256": "0x63ea1828168026c86522743d551b2c88f0f4f94d813d2adc5881164d176b0ea1"
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20251001.0/openSUSE-Leap-16.0-16.0.x86_64-22.57-Build22.57.wsl",
"Sha256": "0x0d1faa095153beee0a9b5089b0f9aa3d2aec95e2cdcffdeeff84dd54c48b8393"
},
"Arm64Url": {
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250320.0/openSUSE-Leap-15.6-15.6.aarch64-15.2-Build15.2.wsl",
"Sha256": "0x0a3c646f69bb83889c4264e41030076104a2f3d71ae6a1e14a1e0653dfd2e3d4"
"Url": "https://github.com/openSUSE/WSL-instarball/releases/download/v20251001.0/openSUSE-Leap-16.0-16.0.aarch64-22.57-Build22.57.wsl",
"Sha256": "0x91bcdc7e9f42d7a60a4464ad867d91243aaaecab7b3a057039f77a989daac51e"
}
}
],
"SUSE": [
{
"Name": "SUSE-Linux-Enterprise-15-SP6",
"FriendlyName": "SUSE Linux Enterprise 15 SP6",
"Name": "SUSE-Linux-Enterprise-15-SP7",
"FriendlyName": "SUSE Linux Enterprise 15 SP7",
"Default": false,
"Amd64Url": {
"Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20250618.0/SUSE-Linux-Enterprise-15-SP6-15.6.x86_64-23.23-Build23.23.wsl",
"Sha256": "0x8f1101972eab1e503993a183e34851920935988f2d5dd1574e336e470101e0e6"
"Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20251201.0/SUSE-Linux-Enterprise-15-SP7-15.7.x86_64-30.1-Build30.1.wsl",
"Sha256": "0x60924e13286ed15bdcf9069e3a24d3394fb858954de3bdfcb1ea576900b81b2e"
}
},
{
"Name": "SUSE-Linux-Enterprise-15-SP7",
"FriendlyName": "SUSE Linux Enterprise 15 SP7",
"Name": "SUSE-Linux-Enterprise-16.0",
"FriendlyName": "SUSE Linux Enterprise 16.0",
"Default": true,
"Amd64Url": {
"Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20250618.0/SUSE-Linux-Enterprise-15-SP7-15.7.x86_64-23.26-Build23.26.wsl",
"Sha256": "0x0c828685931adae35832d7098fee79a6586b9d77a8c250264fa270703bf3a3ce"
"Url": "https://github.com/SUSE/WSL-instarball/releases/download/v20251201.0/SUSE-Linux-Enterprise-16.0-16.0.x86_64-1.9-Build1.9.wsl",
"Sha256": "0xf0fc07ed3543d3dc24cfb35b4194bbecf98485cefdd720c521034ac1c54bffd3"
}
}
],
@ -82,12 +82,12 @@
"FriendlyName": "Kali Linux Rolling",
"Default": true,
"Amd64Url": {
"Url": "https://kali.download/wsl-images/kali-2025.2/kali-linux-2025.2-wsl-rootfs-amd64.wsl",
"Sha256": "9a9d3dca4aec0c2d29320e7b2eee072ff37c5f3396759c25afeaed0bb700d778"
"Url": "https://kali.download/wsl-images/kali-2025.3/kali-linux-2025.3-wsl-rootfs-amd64.wsl",
"Sha256": "dda0ff3ffe4465cf2af1061262e44cec5a90c1eccb71fe5ccfb1b0fceb5e23a8"
},
"Arm64Url": {
"Url": "https://kali.download/wsl-images/kali-2025.2/kali-linux-2025.2-wsl-rootfs-arm64.wsl",
"Sha256": "f0c1241af735f869499d68135852392317ebbf6b4fb6681d7e9c312dbe498567"
"Url": "https://kali.download/wsl-images/kali-2025.3/kali-linux-2025.3-wsl-rootfs-arm64.wsl",
"Sha256": "e175688d9c305b621e701bb11e54f57ac772aed7fa1d94e3f6cb812c1e5e806f"
}
}
],
@ -97,12 +97,12 @@
"FriendlyName": "Debian GNU/Linux",
"Default": true,
"Amd64Url": {
"Url": "https://salsa.debian.org/debian/WSL/-/jobs/7130915/artifacts/raw/Debian_WSL_AMD64_v1.20.0.0.wsl",
"Sha256": "51a0c7af534929305238bd356a217b371562e6a0fcdfab65c7e49fb8252e2f23"
"Url": "https://salsa.debian.org/debian/WSL/-/jobs/7949331/artifacts/raw/Debian_WSL_AMD64_v1.22.0.0.wsl",
"Sha256": "543123ccc5f838e63dac81634fb0223dc8dcaa78fdb981387d625feb1ed168c7"
},
"Arm64Url": {
"Url": "https://salsa.debian.org/debian/WSL/-/jobs/7130915/artifacts/raw/Debian_WSL_ARM64_v1.20.0.0.wsl",
"Sha256": "ceb883ce1c016f7bc01c2f58dfa3224684d49efb0d1b2a216ce889cac2738bc5"
"Url": "https://salsa.debian.org/debian/WSL/-/jobs/7949331/artifacts/raw/Debian_WSL_ARM64_v1.22.0.0.wsl",
"Sha256": "5701f1add55f8cf3b56528109a6220ae5c89f2189d7ae97b9a4b5302b80e967c"
}
}
],
@ -125,12 +125,12 @@
"FriendlyName": "AlmaLinux OS 9",
"Default": false,
"Amd64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v9.6.20250522.0/AlmaLinux-9.6_x64_20250522.0.wsl",
"Sha256": "e0f6acf1ce5aff80f2e60d3d8191c0a3857720149a7e5521b96e11777cdd2779"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v9.7.20251119.0/AlmaLinux-9.7_x64_20251119.0.wsl",
"Sha256": "0a6588f4f723fcb3edbc37dd3e3e13be8ffe0a5027e47513e3d4d2a4451794e7"
},
"Arm64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v9.6.20250522.0/AlmaLinux-9.6_ARM64_20250522.0.wsl",
"Sha256": "58d1cc623c4570307825036460e51a406bdcf53b4b5a4148cf644f5f68ce48dd"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v9.7.20251119.0/AlmaLinux-9.7_ARM64_20251119.0.wsl",
"Sha256": "b3e2632efe029a81db1ae7a914ea3b7e9e6e20d8c71c158270c331e6fea39bf8"
}
},
{
@ -138,12 +138,12 @@
"FriendlyName": "AlmaLinux OS Kitten 10",
"Default": false,
"Amd64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10-kitten.20250415.0/AlmaLinux-Kitten-10_x64_20250415.0.wsl",
"Sha256": "8db3788b5728e58e32a4a96d9aa26974a48bf7936ed376da434c5c441a0fa7bd"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10-kitten.20251030.0/AlmaLinux-Kitten-10_x64_20251030.0.wsl",
"Sha256": "d765d65076b041f3a67ba60edc37d056eeab2a260aed8e077684e05b78ecd9f5"
},
"Arm64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10-kitten.20250415.0/AlmaLinux-Kitten-10_ARM64_20250415.0.wsl",
"Sha256": "f48a55e9fd4da1b84c2a9e960a9f3bc6e9fa65387ed9181826e1f052b2ce545e"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10-kitten.20251030.0/AlmaLinux-Kitten-10_ARM64_20251030.0.wsl",
"Sha256": "90c30b0adbf8d414c4b0a02eaeb6a5d8e488a2187a67dbaf11f4a3e843baae53"
}
},
{
@ -151,12 +151,12 @@
"FriendlyName": "AlmaLinux OS 10",
"Default": true,
"Amd64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10.0.20250529.0/AlmaLinux-10.0_x64_20250529.0.wsl",
"Sha256": "6775711048b86743588da7173ab45ca449b5c50a72fb87635313f059a9813d4b"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10.1.20251124.0/AlmaLinux-10.1_x64_20251124.0.wsl",
"Sha256": "24e8fa286a4081979d97e83a227fb89f332bcf731fe4b422679a3b455ab0be37"
},
"Arm64Url": {
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10.0.20250529.0/AlmaLinux-10.0_ARM64_20250529.0.wsl",
"Sha256": "bc424bd9f954d36e871d4d874d35bc25e3ea7bdfe48337c30b927ed73a79b2fa"
"Url": "https://github.com/AlmaLinux/wsl-images/releases/download/v10.1.20251124.0/AlmaLinux-10.1_ARM64_20251124.0.wsl",
"Sha256": "20700a4467214074f8a1a3d4e0e1cad25af36b8127d047ab6d5b4a1355e998b8"
}
}
],
@ -166,16 +166,29 @@
"FriendlyName": "Arch Linux",
"Default": true,
"Amd64Url": {
"Url": "https://geo.mirror.pkgbuild.com/wsl/2025.08.01.138229/archlinux-2025.08.01.138229.wsl",
"Sha256": "31060f357428cb932abfdcc6f94f86965f9f5d126113e67f34a65a578d2238e1"
"Url": "https://fastly.mirror.pkgbuild.com/wsl/2025.12.01.153427/archlinux-2025.12.01.153427.wsl",
"Sha256": "8dfe92910a188f191b0af2972bd4bda661178b769ce820a8921e8b7aeae9a517"
}
}
],
"Fedora": [
{
"Name": "FedoraLinux-43",
"FriendlyName": "Fedora Linux 43",
"Default": true,
"Amd64Url": {
"Url": "https://download.fedoraproject.org/pub/fedora/linux/releases/43/Container/x86_64/images/Fedora-WSL-Base-43-1.6.x86_64.wsl",
"Sha256": "220780af9cf225e9645313b4c7b0457a26a38a53285eb203b2ab6188d54d5b82"
},
"Arm64Url": {
"Url": "https://download.fedoraproject.org/pub/fedora/linux/releases/43/Container/aarch64/images/Fedora-WSL-Base-43-1.6.aarch64.wsl",
"Sha256": "7eef7a83260218d8c878b3c7bbdaf11772103145184d0c65df27557f4cd49548"
}
},
{
"Name": "FedoraLinux-42",
"FriendlyName": "Fedora Linux 42",
"Default": true,
"Default": false,
"Amd64Url": {
"Url": "https://download.fedoraproject.org/pub/fedora/linux/releases/42/Container/x86_64/images/Fedora-WSL-Base-42-1.1.x86_64.tar.xz",
"Sha256": "99fb3d05d78ca17c6815bb03cf528da8ef82ebc6260407f2b09461e0da8a1b8d"
@ -219,16 +232,6 @@
"Arm64PackageUrl": "https://publicwsldistros.blob.core.windows.net/wsldistrostorage/KaliLinux_1.13.1.0.AppxBundle",
"PackageFamilyName": "KaliLinux.54290C8133FEE_ey8k8hqnwqnmg"
},
{
"Name": "Ubuntu-18.04",
"FriendlyName": "Ubuntu 18.04 LTS",
"StoreAppId": "9PNKSF5ZN4SW",
"Amd64": true,
"Arm64": true,
"Amd64PackageUrl": "https://publicwsldistros.blob.core.windows.net/wsldistrostorage/Ubuntu1804-230608_x64.appx",
"Arm64PackageUrl": "https://publicwsldistros.blob.core.windows.net/wsldistrostorage/Ubuntu1804-230608_ARM64.appx",
"PackageFamilyName": "CanonicalGroupLimited.Ubuntu18.04LTS_79rhkp1fndgsc"
},
{
"Name": "Ubuntu-20.04",
"FriendlyName": "Ubuntu 20.04 LTS",
@ -315,8 +318,8 @@
"StoreAppId": "9MSSK2ZXXN11",
"Amd64": true,
"Arm64": true,
"Amd64PackageUrl": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250618.0/openSUSE-Tumbleweed-20250616-WSL.x86_64-25167.9.806.0-Build9.806.appx",
"Arm64PackageUrl": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250618.0/openSUSE-Tumbleweed-20250616-WSL.aarch64-25167.9.410.0-Build9.410.appx",
"Amd64PackageUrl": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250923.0/openSUSE-Tumbleweed-20250922-WSL.x86_64-25265.9.1077.0-Build9.1077.appx",
"Arm64PackageUrl": "https://github.com/openSUSE/WSL-instarball/releases/download/v20250923.0/openSUSE-Tumbleweed-20250922-WSL.aarch64-25265.9.542.0-Build9.542.appx",
"PackageFamilyName": "46932SUSE.openSUSETumbleweed_022rs5jcyhyac"
}
]

View File

@ -33,10 +33,32 @@ DISCOURAGED_SYSTEM_UNITS = ['systemd-resolved.service',
'systemd-tmpfiles-setup-dev.service',
'tmp.mount',
'NetworkManager.service',
'networking.service']
'networking.service',
'hypervkvpd.service']
WSL1_UNSUPPORTED_XATTRS = ['security.selinux', 'security.ima', 'security.evm']
WSL_CONF_KEYS = ['automount.enabled',
'automount.ldconfig',
'automount.mountfstab',
'automount.options',
'automount.root',
'boot.command',
'boot.protectbinfmt',
'boot.systemd',
'fileserver.enabled',
'filesystem.umask',
'general.hostname',
'gpu.appendlibpath',
'gpu.enabled',
'interop.appendwindowspath',
'interop.enabled',
'network.generatehosts',
'network.generateresolvconf',
'network.hostname',
'time.usewindowstimezone',
'user.default']
errors = {}
warnings = {}
@ -200,7 +222,7 @@ def read_passwd(node, default_uid: int, fd):
entries[uid] = fields
if 0 not in entries:
error(flavor, name, f'No root (uid=0) found in /etc/passwd')
error(node, f'No root (uid=0) found in /etc/passwd')
elif entries[0][0] != 'root':
error(node, f'/etc/passwd has a uid=0, but it is not root: {entries[0][0]}')
@ -352,7 +374,7 @@ def read_tar(node, file, elf_magic: str):
if info is None:
if not optional:
error(flavor, name, f'File "{path}" not found in tar')
error(node, f'File "{path}" not found in tar')
return False
permissions = oct(info.mode)
@ -395,7 +417,7 @@ def read_tar(node, file, elf_magic: str):
keys = read_config_keys(config)
unexpected_keys = [e for e in keys if e.lower() not in valid_keys]
unexpected_keys = [e for e in keys if e.casefold() not in valid_keys]
if unexpected_keys:
error(node, f'Found unexpected_keys in "{path}": {unexpected_keys}')
else:
@ -434,14 +456,17 @@ def read_tar(node, file, elf_magic: str):
warning(node, f'value for windowsterminal.profileTemplate is not under {USR_LIB_WSL}: "{terminal_profile}"')
if validate_mode('/etc/wsl.conf', [oct(0o664), oct(0o644)], 0, 0, optional=True, follow_symlink=True):
config = validate_config('/etc/wsl.conf', ['boot.systemd'])
config = validate_config('/etc/wsl.conf', WSL_CONF_KEYS)
if config.get('boot.systemd', False):
validate_mode('/sbin/init', [oct(0o775), oct(0o755)], 0, 0, magic=elf_magic, follow_symlink=True)
validate_mode('/sbin/init', [oct(0o775), oct(0o755), oct(0o555)], 0, 0, magic=elf_magic, follow_symlink=True)
if (default_user := config.get('user.default')) is not None:
warning(node, f'Found discouraged wsl.conf key: user.default={default_user}')
validate_mode('/etc/passwd', [oct(0o664), oct(0o644)], 0, 0, parse_method = lambda fd: read_passwd(node, defaultUid, fd))
validate_mode('/etc/shadow', [oct(0o640), oct(0o600), oct(0)], 0, None)
validate_mode('/bin/bash', [oct(0o755), oct(0o775)], 0, 0, magic=elf_magic, follow_symlink=True)
validate_mode('/bin/sh', [oct(0o755), oct(0o775)], 0, 0, magic=elf_magic, follow_symlink=True)
validate_mode('/bin/bash', [oct(0o755), oct(0o775), oct(0o555)], 0, 0, magic=elf_magic, follow_symlink=True, optional=True)
validate_mode('/bin/sh', [oct(0o755), oct(0o775), oct(0o555)], 0, 0, magic=elf_magic, follow_symlink=True)
enabled_systemd_units = read_systemd_enabled_units(node, tar)
for unit, path in enabled_systemd_units.items():

View File

@ -466,7 +466,7 @@ Argumenty pro správu Subsystému Windows pro Linux:
Přesuňte distribuci do nového umístění.
--set-sparse, -s &lt;true|false&gt;
Nastaví vhdx distribuce na zhuštěný, což umožní automatické uvolnění místa na disku.
Nastavte virtuální pevný disk distribuce na zhuštěný, což umožní automatické uvolnění místa na disku.
--set-default-user &lt;Username&gt;
Nastaví výchozího uživatele distribuce.
@ -546,11 +546,11 @@ Argumenty pro správu distribucí v Subsystému Windows pro Linux:
Určuje verzi, která se má použít pro novou distribuci.
--vhd
Určuje, že zadaný soubor je soubor .vhdx, nikoli soubor tar.
Tato operace vytvoří kopii souboru .vhdx v zadaném umístění instalace.
Určuje, že poskytnutý soubor je soubor .vhd nebo .vhdx, nikoli soubor tar.
Tato operace vytvoří kopii souboru VHD v zadaném umístění instalace.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importuje zadaný soubor .vhdx jako novou distribuci.
Importuje zadaný soubor .VHD jako novou distribuci.
Tento virtuální pevný disk musí být naformátovaný typem systému souborů ext4.
--list, -l [Options]
@ -626,7 +626,7 @@ Potvrzení změn: {}
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>Vhd vlastních modulů jádra v {} se nenašel: {}.</value>
<value>VHD vlastních modulů jádra v {} se nenašel: {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ Může být nutné restartovat systém, aby se změny projevily.</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Zadaný soubor musí mít příponu .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Zadaný soubor musí mít příponu {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Zadaný soubor musí mít příponu {} nebo {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch '{}' nebyl nalezen. Dostupné přepínače: {}</value>
@ -998,7 +1003,7 @@ Návrat k sítím NAT.</value>
<value>Zobrazit dokumentaci</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Operaci nešlo dokončit, protože se vhdx právě používá. Vynucení ukončení používání WSL: wsl.exe --shutdown</value>
<value>Operaci nešlo dokončit, protože se VHD právě používá. Vynucení ukončení používání WSL: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Návrat k sítím NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Zhuštěný soubor vhdx je podporován pouze pro WSL2.</value>
<value>Zhuštěný VHD je podporován pouze pro WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Spouštění WSL jako místního systému se nepodporuje.</value>
@ -1055,7 +1060,7 @@ Návrat k sítím NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Vypadá to na soubor VHDX. Použijte --vhd k importu VHDX místo dehtu.</value>
<value>This looks like a VHD file. Use --vhd to import a VHD instead of a tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1107,8 +1112,8 @@ Kód chyby: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Podpora prořídlého VHD je v současné době zakázána z důvodu možného poškození dat.
Pokud chcete distribuci vynutit použití prořídlého vhd, spusťte:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
Pokud chcete distribuci vynutit použití prořídlého VHD, spusťte:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -466,7 +466,7 @@ Argumenter til administration af Windows-undersystem til Linux:
Flyt distributionen til en ny placering.
--set-sparse, -s &lt;true|false&gt;
Angiv vhdx for distribution til sparse, hvilket gør det muligt at frigøre diskplads automatisk.
Angiv VHD for distribution til sparse, hvilket gør det muligt at frigøre diskplads automatisk.
--set-default-user &lt;Username&gt;
Angiv standardbrugeren af distributionen.
@ -546,11 +546,11 @@ Argumenter for administration af distributioner i Windows-undersystem til Linux:
Angiver den version, der skal bruges til den nye distribution.
--vhd
Angiver, at den angivne fil er en .vhdx-fil, ikke en tar-fil.
Denne handling opretter en kopi af .vhdx-filen på den angivne installationsplacering.
Angiver, at den angivne fil er en .vhd- eller.vhdx-fil, ikke en tar-fil.
Denne handling opretter en kopi af VHD-filen på den angivne installationsplacering.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importerer den angivne .vhdx-fil som en ny distribution.
Importerer den angivne VHD-fil som en ny distribution.
Denne virtuelle harddisk skal være formateret med ext4-filsystemtypen.
--list, -l [Options]
@ -704,8 +704,13 @@ Systemet skal muligvis genstartes, så ændringerne kan træde i kraft.</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Den angivne fil skal have filtypenavnet .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Den angivne fil skal have filtypenavnet {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Den angivne fil skal have filtypenavnet {} eller {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch "{}" blev ikke fundet. Tilgængelige switches: {}</value>
@ -998,7 +1003,7 @@ Går tilbage til NAT-netværk.</value>
<value>Se dokumenter</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Handlingen kunne ikke fuldføres, fordi vhdx er i brug i øjeblikket. Sådan tvinges WSL til at stoppe brug: wsl.exe --shutdown</value>
<value>Handlingen kunne ikke fuldføres, fordi VHD'en i øjeblikket er i brug. For at tvinge WSL til at stoppe skal du bruge: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Går tilbage til NAT-netværk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx understøttes kun på WSL2.</value>
<value>Sparse VHD understøttes kun på WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Kørsel af WSL som lokalt system understøttes ikke.</value>
@ -1055,7 +1060,7 @@ Går tilbage til NAT-netværk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Dette ligner en VHDX-fil. Brug --vhd til at importere en VHDX i stedet for en tar.</value>
<value>Dette ligner en VHD-fil. Brug --vhd til at importere en VHD i stedet for en tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1108,7 +1113,7 @@ Fejlkode: {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Understøttelse af sparse VHD er i øjeblikket deaktiveret på grund af potentiel datakorruption.
For at tvinge en distribution til at bruge en sparse VHD, skal du køre:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -381,7 +381,7 @@ Verbrauch:
<comment>{Locked="/l,"}{Locked="/list "}{Locked="/all "}{Locked="/running "}{Locked="/s,"}{Locked="/setdefault "}{Locked="/t,"}{Locked="/terminate "}{Locked="/u,"}{Locked="/unregister "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
<value>Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
Datenschutzinformationen zu diesem Produkt finden Sie unter https://aka.ms/privacy.
Syntax: wsl.exe [Argument] [Optionen...] [CommandLine]
@ -632,7 +632,7 @@ Buildzeit: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>Die benutzerdefinierte Kernelmodul-VHD in "{}" wurde nicht gefunden: "{}".</value>
<value>Die benutzerdefinierte Kernelmodule-VHD in {} wurde nicht gefunden: „{}“.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -710,8 +710,13 @@ Das System muss möglicherweise neu gestartet werden, damit die Änderungen wirk
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Die angegebene Datei muss die Dateierweiterung ".vhdx" aufweisen.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Die angegebene Datei muss die Dateierweiterung {} aufweisen.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Die angegebene Datei muss die Dateierweiterung {} oder {} besitzen.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch „{}“ wurde nicht gefunden. Verfügbare Switches: {}</value>
@ -1004,7 +1009,7 @@ Fallback auf NAT-Netzwerk.</value>
<value>Dokumente anzeigen</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Der Vorgang konnte nicht abgeschlossen werden, da die VHDX zurzeit verwendet wird. So erzwingen Sie, dass WSL die Verwendung beendet: wsl.exe --shutdown</value>
<value>Der Vorgang konnte nicht abgeschlossen werden, da die VHD zurzeit verwendet wird. So erzwingen Sie, dass WSL die Verwendung beendet: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ Fallback auf NAT-Netzwerk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>VHDX mit geringer Dichte wird nur für WSL2 unterstützt.</value>
<value>VHD mit geringer Dichte wird nur unter WSL2 unterstützt.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Das Ausführen von WSL als lokales System wird nicht unterstützt.</value>
@ -1061,7 +1066,7 @@ Fallback auf NAT-Netzwerk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Dies scheint eine VHDX-Datei zu sein. Verwenden Sie --vhd anstelle eines TAR-Archivs, um eine VHDX-Datei zu importieren.</value>
<value>Dies sieht wie eine VHD-Datei aus. Verwenden Sie „--vhd “, um eine VHD anstelle eines „tar“ zu importieren.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1113,8 +1118,8 @@ Fehlercode: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Die Unterstützung von Sparse VHD ist derzeit wegen möglicher Datenbeschädigung deaktiviert.
Um eine Distribution zu zwingen, eine Sparse VHD zu verwenden, führen Sie bitte Folgendes aus:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
Um eine Distribution zu zwingen, eine spärliche VHD zu verwenden, führen Sie bitte Folgendes aus:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -466,7 +466,7 @@ Arguments for managing Windows Subsystem for Linux:
Move the distribution to a new location.
--set-sparse, -s &lt;true|false&gt;
Set the vhdx of distro to be sparse, allowing disk space to be automatically reclaimed.
Set the VHD of distro to be sparse, allowing disk space to be automatically reclaimed.
--set-default-user &lt;Username&gt;
Set the default user of the distribution.
@ -546,11 +546,11 @@ Arguments for managing distributions in Windows Subsystem for Linux:
Specifies the version to use for the new distribution.
--vhd
Specifies that the provided file is a .vhdx file, not a tar file.
This operation makes a copy of the .vhdx file at the specified install location.
Specifies that the provided file is a .vhd or .vhdx file, not a tar file.
This operation makes a copy of the VHD file at the specified install location.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Imports the specified .vhdx file as a new distribution.
Imports the specified VHD file as a new distribution.
This virtual hard disk must be formatted with the ext4 filesystem type.
--list, -l [Options]
@ -626,7 +626,7 @@ Build time: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>The custom kernel modules vhd in {} was not found: '{}'.</value>
<value>The customised kernel modules VHD in {} was not found: '{}'.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ The system may need to be restarted so the changes can take effect.</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>The specified file must have the .vhdx file extension.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>The specified file must have the {} file extension.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>The specified file must have the {} or {} file extension.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>The VmSwitch '{}' was not found. Available switches: {}</value>
@ -998,7 +1003,7 @@ Falling back to NAT networking.</value>
<value>See Docs</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>The operation could not be completed because the vhdx is currently in use. To force WSL to stop use: wsl.exe --shutdown</value>
<value>The operation could not be completed because the VHD is currently in use. To force WSL to stop use: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Falling back to NAT networking.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx is supported on WSL2 only.</value>
<value>Sparse VHD is supported on WSL2 only.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Running WSL as local system is not supported.</value>
@ -1055,7 +1060,7 @@ Falling back to NAT networking.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>This looks like a VHDX file. Use --vhd to import a VHDX instead of a tar.</value>
<value>This looks like a VHD file. Use --vhd to import a VHD instead of a tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1107,8 +1112,8 @@ Error code: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Sparse VHD support is currently disabled due to potential data corruption.
To force a distribution to use a sparse vhd, please run:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
To force a distribution to use a sparse VHD, please run:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -466,7 +466,7 @@ Arguments for managing Windows Subsystem for Linux:
Move the distribution to a new location.
--set-sparse, -s &lt;true|false&gt;
Set the vhdx of distro to be sparse, allowing disk space to be automatically reclaimed.
Set the VHD of distro to be sparse, allowing disk space to be automatically reclaimed.
--set-default-user &lt;Username&gt;
Set the default user of the distribution.
@ -546,11 +546,11 @@ Arguments for managing distributions in Windows Subsystem for Linux:
Specifies the version to use for the new distribution.
--vhd
Specifies that the provided file is a .vhdx file, not a tar file.
This operation makes a copy of the .vhdx file at the specified install location.
Specifies that the provided file is a .vhd or .vhdx file, not a tar file.
This operation makes a copy of the VHD file at the specified install location.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Imports the specified .vhdx file as a new distribution.
Imports the specified VHD file as a new distribution.
This virtual hard disk must be formatted with the ext4 filesystem type.
--list, -l [Options]
@ -626,7 +626,7 @@ Build time: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>The custom kernel modules vhd in {} was not found: '{}'.</value>
<value>The custom kernel modules VHD in {} was not found: '{}'.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ The system may need to be restarted so the changes can take effect.</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>The specified file must have the .vhdx file extension.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>The specified file must have the {} file extension.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>The specified file must have the {} or {} file extension.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>The VmSwitch '{}' was not found. Available switches: {}</value>
@ -998,7 +1003,7 @@ Falling back to NAT networking.</value>
<value>See Docs</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>The operation could not be completed because the vhdx is currently in use. To force WSL to stop use: wsl.exe --shutdown</value>
<value>The operation could not be completed because the VHD is currently in use. To force WSL to stop use: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Falling back to NAT networking.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx is supported on WSL2 only.</value>
<value>Sparse VHD is supported on WSL2 only.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Running WSL as local system is not supported.</value>
@ -1055,7 +1060,7 @@ Falling back to NAT networking.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>This looks like a VHDX file. Use --vhd to import a VHDX instead of a tar.</value>
<value>This looks like a VHD file. Use --vhd to import a VHD instead of a tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1107,8 +1112,8 @@ Error code: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Sparse VHD support is currently disabled due to potential data corruption.
To force a distribution to use a sparse vhd, please run:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
To force a distribution to use a sparse VHD, please run:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -382,57 +382,57 @@ Uso:
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Todos los derechos reservados.
Para obtener información de privacidad sobre este producto, visita https://aka.ms/privacy.
Para obtener información de privacidad sobre este producto, visite https://aka.ms/privacy.
Uso: wsl.exe [Argumento] [Opciones...] [CommandLine]
Uso: wsl.exe [Argumento] [Opciones...] [Línea de comandos]
Argumentos para ejecutar archivos binarios de Linux:
Si no se proporciona ninguna línea de comandos, wsl.exe inicia el shell predeterminado.
--exec, -e &lt;CommandLine&gt;
Ejecuta el comando especificado sin usar el shell de Linux predeterminado.
Ejecute el comando especificado sin usar el shell de Linux predeterminado.
--shell-type &lt;standard|login|none&gt;
Ejecuta el comando especificado con el tipo de shell proporcionado.
Ejecute el comando especificado con el tipo de shell proporcionado.
--
Pasa la línea de comandos restante tal cual.
Opciones:
--cd &lt;Directory&gt;
Establece el directorio especificado como el directorio de trabajo actual.
Si se usa ~, se usará la ruta de acceso principal del usuario de Linux. Si la ruta de acceso comienza
con un carácter /, se interpretará como una ruta de acceso absoluta de Linux.
Establece el directorio especificado como directorio de trabajo actual.
Si se usa ~, se usará la ruta de acceso principal del usuario de Linux. Si la ruta de
acceso comienza con un carácter /, se interpretará como una ruta de acceso absoluta de Linux.
De lo contrario, el valor debe ser una ruta de acceso absoluta de Windows.
--distribution, -d &lt;DistroName&gt;
Ejecuta la distribución especificada.
Ejecute la distribución especificada.
--distribution-id &lt;DistroGuid&gt;
Ejecuta la distribución especificada.
Ejecute el id. de distribución especificado.
--user, -u &lt;UserName&gt;
Ejecuta como el usuario especificado.
Ejecutar como el usuario especificado.
--system
Inicia un shell para la distribución del sistema.
Argumentos para administrar el Subsistema de Windows para Linux:
Argumentos para administrar Subsistema de Windows para Linux:
--help
Muestra información de uso.
Mostrar información de uso.
--debug-shell
Abre un shell de depuración WSL2 con fines de diagnóstico.
Abra un shell de depuración WSL2 con fines de diagnóstico.
--install [Distro] [Options...]
Instala una distribución de Subsistema de Windows para Linux.
--install [Distribución] [Opciones...]
Instale una distribución de Subsistema de Windows para Linux.
Para obtener una lista de distribuciones válidas, use 'wsl.exe --list --online'.
Opciones:
--enable-wsl1
Habilita la compatibilidad con WSL1.
Habilitar compatibilidad con WSL1.
--fixed-vhd
Crea un disco de tamaño fijo para almacenar la distribución.
@ -450,10 +450,10 @@ Argumentos para administrar el Subsistema de Windows para Linux:
Establece el nombre de la distribución.
--no-distribution
Solo se instalan los componentes opcionales necesarios, no se instala una distribución.
Solo instalar los componentes opcionales necesarios, no instala una distribución.
--no-launch, -n
No inicia la distribución después de la instalación.
No inicies la distribución después de la instalación.
--version &lt;Version&gt;
Especifica la versión que se va a usar para la nueva distribución.
@ -462,7 +462,7 @@ Argumentos para administrar el Subsistema de Windows para Linux:
Especifica el tamaño del disco para almacenar la distribución.
--web-download
Descarga la distribución desde Internet en lugar de la Microsoft Store.
Descarga la distribución desde Internet en lugar de la Microsoft Store.
--manage &lt;Distro&gt; &lt;Options...&gt;
Cambia las opciones específicas de distribución.
@ -472,7 +472,7 @@ Argumentos para administrar el Subsistema de Windows para Linux:
Mueve la distribución a una nueva ubicación.
--set-sparse, -s &lt;true|false&gt;
Establece el vhdx de la distribución para que sea disperso, lo que permite que el espacio en disco se recupere automáticamente.
Establece el VHD de distribución en disperso, lo que permite recuperar automáticamente el espacio en disco.
--set-default-user &lt;Username&gt;
Establece el usuario predeterminado de la distribución.
@ -481,59 +481,59 @@ Argumentos para administrar el Subsistema de Windows para Linux:
Cambia el tamaño del disco de la distribución al tamaño especificado.
--mount &lt;Disk&gt;
Conecta y monta un disco físico o virtual en todas las distribuciones de WSL 2.
Conecta y monta un disco físico o virtual en todas las distribuciones de WSL 2.
Opciones:
--vhd
Especifica que &lt;Disk&gt; hace referencia a un disco duro virtual.
--bare
Conecta el disco a WSL2, pero no lo monta.
Conecta el disco a WSL2, pero no lo montes.
--name &lt;Name&gt;
Monta el disco con un nombre personalizado para el punto de montaje.
--type &lt;Type&gt;
Sistema de archivos que se va a usar al montar un disco; si no se especifica, el valor predeterminado es ext4.
--type &lt;Tipo&gt;
Sistema de archivos que se va a usar al montar un disco. Si no se especifica, el valor predeterminado es ext4.
--options &lt;Options&gt;
Opciones de montaje adicionales.
--partition &lt;Index&gt;
Índice de la partición que se va a montar; si no se especifica, el valor predeterminado es todo el disco.
Índice de la partición que se va a montar. Si no se especifica, el valor predeterminado es todo el disco.
--set-default-version &lt;Version&gt;
Cambia la versión de instalación predeterminada para las nuevas distribuciones.
--shutdown
Finaliza inmediatamente todas las distribuciones en ejecución y la
máquina virtual de utilidad ligera WSL 2.
Finaliza inmediatamente todas las distribuciones en ejecución y la máquina virtual
de la utilidad ligera WSL 2.
Opciones:
--force
--force
Finaliza la máquina virtual WSL 2 incluso si hay una operación en curso. Puede provocar la pérdida de datos.
--status
Muestra el estado del Subsistema de Windows para Linux.
Muestra el estado de Subsistema de Windows para Linux.
--unmount [Disk]
Desmonta y desasocia un disco de todas las distribuciones de WSL2.
Desmonta y desasocia todos los discos si se llama sin argumento.
--uninstall
Desinstala el paquete de Subsistema de Windows para Linux de este equipo.
--uninstall
Desinstala el paquete de Subsistema de Windows para Linux de este equipo.
--update
Actualiza el paquete de Subsistema de Windows para Linux.
--update
Actualizar el paquete del Subsistema de Windows para Linux.
Opciones:
--pre-release
Descarga una versión preliminar si está disponible.
Descargar una versión preliminar si está disponible.
--version, -v
Muestra información de la versión.
--version, -v
Mostrar información de versión.
Argumentos para administrar distribuciones en Subsistema de Windows para Linux:
Argumentos para administrar distribuciones en el Subsistema de Windows para Linux:
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
Exporta la distribución a un archivo tar.
@ -552,11 +552,11 @@ Argumentos para administrar distribuciones en Subsistema de Windows para Linux:
Especifica la versión que se va a usar para la nueva distribución.
--vhd
Especifica que el archivo proporcionado es un archivo .vhdx, no un archivo tar.
Esta operación realiza una copia del archivo .vhdx en la ubicación de instalación especificada.
Especifica que el archivo proporcionado es un archivo .vhd o .vhdx, no un archivo tar.
Esta operación realiza una copia del archivo VHD en la ubicación de instalación especificada.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importa el archivo .vhdx especificado como una nueva distribución.
Importa el archivo VHD especificado como una nueva distribución.
Este disco duro virtual debe tener el formato del tipo de sistema de archivos ext4.
--list, -l [Options]
@ -564,20 +564,20 @@ Argumentos para administrar distribuciones en Subsistema de Windows para Linux:
Opciones:
--all
Enumera todas las distribuciones, incluidas las distribuciones que
actualmente se está instalando o desinstalando.
Enumera todas las distribuciones, incluidas las distribuciones que se están
instalando o desinstalando actualmente.
--running
Enumera solo las distribuciones que se están ejecutando actualmente.
--quiet, -q
Muestra solo los nombres de distribución.
Mostrar solo nombres de distribución.
--verbose, -v
Muestra información detallada sobre todas las distribuciones.
--online, -o
Muestra una lista de las distribuciones disponibles para instalar con 'wsl.exe --install'.
Muestra una lista de distribuciones disponibles para instalar con 'wsl.exe --install'.
--set-default, -s &lt;Distro&gt;
Establece la distribución como predeterminada.
@ -710,8 +710,13 @@ Es posible que sea necesario reiniciar el sistema para que los cambios surtan ef
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>El archivo especificado debe tener la extensión de archivo .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>El archivo especificado debe tener la extensión de archivo {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>El archivo especificado debe tener la extensión de archivo {} o {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>No se encontró el VmSwitch '{}'. Modificadores disponibles: {}</value>
@ -1004,7 +1009,7 @@ Revirtiendo a las redes NAT.</value>
<value>Ver documentos</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>No se pudo completar la operación porque el vhdx está actualmente en uso. Para forzar que WSL deje de usar: wsl.exe --shutdown</value>
<value>No se pudo completar la operación porque el VHD está actualmente en uso. Para forzar que WSL deje de usar: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ Revirtiendo a las redes NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Vhdx disperso solo se admite en WSL2.</value>
<value>El VHD disperso solo se admite en WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>No se admite la ejecución de WSL como sistema local.</value>
@ -1061,7 +1066,7 @@ Revirtiendo a las redes NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Parece un archivo VHDX. Use --vhd para importar un VHDX en lugar de una tar.</value>
<value>Parece un archivo VHD. Usa --vhd para importar un VHD en lugar de una tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1113,8 +1118,8 @@ Código de error: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>La compatibilidad con VHD disperso está deshabilitada actualmente debido a posibles daños en los datos.
Para forzar que una distribución use un VHD disperso, ejecute:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
Para forzar que una distribución use un VHD disperso, ejecuta:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -546,11 +546,11 @@ Argumentit Windows-alijärjestelmän Linuxille jakelujen hallintaan:
Määrittää uudelle jakelulle käytettävän version.
--vhd
Määrittää, että annettu tiedosto on .vhdx-tiedosto, ei tar-tiedosto.
Tämä toiminto tekee .vhdx-tiedostosta kopion määritetyssä asennussijainnissa.
Määrittää, että annettu tiedosto on .vhd- tai .vhdx-tiedosto, ei tar-tiedosto.
Tämä toiminto tekee VHD-tiedostosta kopion määritetyssä asennussijainnissa.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Tuo määritetyn .vhdx-tiedoston uutena jakeluna.
Tuo määritetyn VHD-tiedoston uutena jakeluna.
Tämä virtuaalikiintolevy on alustettava ext4-tiedostojärjestelmän tyypillä.
--list, -l [Asetukset]
@ -571,7 +571,7 @@ Argumentit Windows-alijärjestelmän Linuxille jakelujen hallintaan:
Näytä yksityiskohtaiset tiedot kaikista jakeluista.
--online, -o
Näyttää luettelon asennettavissa olevista jakeluista argumentilla 'wsl.exe --install'.
Näyttää luettelon asennettavissa olevista jakeluista argumentilla wsl.exe --install'.
--set-default, -s &lt;Distro&gt;
Määrittää jakelun oletukseksi.
@ -704,8 +704,13 @@ Järjestelmä on ehkä käynnistettävä uudelleen, jotta muutokset tulevat voim
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Määritetyn tiedoston tiedostotunnisteen on oltava .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Määritetyllä tiedostolla on oltava tiedostotunniste {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Määritetyllä tiedostolla on oltava tiedostotunniste {} tai {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch-kohdetta {} ei löytynyt. Käytettävissä olevat valitsimet: {}</value>
@ -998,7 +1003,7 @@ Palataan nat-verkkopalveluun.</value>
<value>Näytä asiakirjat</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Toimintoa ei voitu suorittaa loppuun, koska vhdx on parhaillaan käytössä. WSL:n käytön lopettaminen: wsl.exe --shutdown</value>
<value>Toimintoa ei voitu suorittaa loppuun, koska VHD on parhaillaan käytössä. WSL:n käytön lopettaminen: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Palataan nat-verkkopalveluun.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Harvaa vhdx:ää tuetaan vain WSL2:ssa.</value>
<value>Harvaa virtuaalikiintolevyä tuetaan vain WSL2:ssa.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>WSL:n suorittamista paikallisena järjestelmänä ei tueta.</value>
@ -1055,7 +1060,7 @@ Palataan nat-verkkopalveluun.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Tämä näyttää VHDX-tiedostolta. --vhd näppäimellä voit tuoda VHDX:n tar-tiedoston sijaan.</value>
<value>Tämä näyttää VHD-tiedostolta. --vhd -näppäimellä voit tuoda VHD:n tar-tiedoston sijaan.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1108,7 +1113,7 @@ Virhekoodi: {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Harva virtuaalikiintolevyn tuki on tällä hetkellä poistettu käytöstä tietojen mahdollisen vioittumisen vuoksi.
Jos haluat pakottaa jakelun käyttämään harvaa virtuaalikiintolevyä, suorita seuraavasti:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -383,13 +383,13 @@ Utilisation :
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Tous droits réservés.
Pour plus d'informations sur la confidentialité de ce produit, veuillez consulter https://aka.ms/privacy.
Pour plus dinformations sur la confidentialité de ce produit, veuillez consulter https://aka.ms/privacy.
Utilisation : wsl.exe [Argument] [Options...] [CommandLine]
Utilisation : wsl.exe [Argument] [Options...] [Ligne de commande]
Arguments pour lexécution de fichiers binaires Linux :
Arguments pour lexécution des fichiers binaires Linux :
Si aucune ligne de commande n'est fournie, wsl.exe lance linterpréteur de commandes par défaut.
Si aucune ligne de commande nest fournie, wsl.exe lance linterpréteur de commandes par défaut.
--exec, -e &lt;CommandLine&gt;
Exécute la commande spécifiée sans utiliser linterpréteur de commandes Linux par défaut.
@ -398,12 +398,12 @@ Arguments pour lexécution de fichiers binaires Linux :
Exécute la commande spécifiée avec le type dinterpréteur de commandes fourni.
--
Passe la ligne de commande restante « en l'état ».
Passe la ligne de commande restante « en létat ».
Options :
--cd &lt;Directory&gt;
Définit le répertoire spécifié comme répertoire de travail actuel.
Si ~ est utilisé, le chemin d'accès personnel de l'utilisateur Linux est utilisé. Si le chemin commence
Si ~ est utilisé, le chemin daccès personnel de lutilisateur Linux est utilisé. Si le chemin commence
par un caractère /, il est interprété en tant que chemin daccès Linux absolu.
Sinon, la valeur doit être un chemin Windows absolu.
@ -414,7 +414,7 @@ Options :
Exécute lID de distribution spécifié.
--user, -u &lt;UserName&gt;
Exécute en tant que l'utilisateur spécifié.
Exécute en tant que lutilisateur spécifié.
--system
Lance un interpréteur de commandes pour la distribution du système.
@ -422,7 +422,7 @@ Options :
Arguments pour la gestion du sous-système Windows pour Linux :
--help
Affiche les informations d'utilisation.
Affiche les informations dutilisation.
--debug-shell
Ouvre un interpréteur de commandes de débogage WSL2 pour le diagnostic.
@ -439,7 +439,7 @@ Arguments pour la gestion du sous-système Windows pour Linux :
Crée un disque de taille fixe pour stocker la distribution.
--from-file &lt;Path&gt;
Installe une distribution à partir d'un fichier local.
Installe une distribution à partir dun fichier local.
--legacy
Utilise le manifeste de distribution hérité.
@ -473,10 +473,10 @@ Arguments pour la gestion du sous-système Windows pour Linux :
Déplace la distribution vers un nouvel emplacement.
--set-sparse, -s &lt;true|false&gt;
Définit le vhdx de la distribution pour quil soit clairsemé. Cela permet de récupérer automatiquement de lespace disque.
Définit le disque dur virtuel de la distribution pour quil soit clairsemé. Cela permet de récupérer automatiquement de lespace disque.
--set-default-user &lt;Username&gt;
Définit l'utilisateur par défaut de la distribution.
Définit lutilisateur par défaut de la distribution.
--resize &lt;MemoryString&gt;
Redimensionne le disque de la distribution à la taille spécifiée.
@ -542,7 +542,7 @@ Arguments pour la gestion des distributions dans Sous-système Windows pour Linu
Options :
--format &lt;Format&gt;
Spécifie le format d'exportation. Valeurs prises en charge : tar, tar.gz, tar.xz, vhd.
Spécifie le format dexportation. Valeurs prises en charge : tar, tar.gz, tar.xz, vhd.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
Importe le fichier tar spécifié en tant que nouvelle distribution.
@ -553,11 +553,11 @@ Arguments pour la gestion des distributions dans Sous-système Windows pour Linu
Spécifie la version à utiliser pour la nouvelle distribution.
--vhd
Spécifie que le fichier fourni est un fichier .vhdx, et non un fichier tar.
Cette opération effectue une copie du fichier .vhdx à lemplacement dinstallation spécifié.
Spécifie que le fichier fourni est un fichier .vhd ou .vhdx, et non un fichier tar.
Cette opération effectue une copie du fichier VHD à lemplacement dinstallation spécifié.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importe le fichier .vhdx spécifié en tant que nouvelle distribution.
Importe le fichier VHD spécifié en tant que nouvelle distribution.
Ce disque dur virtuel doit être formaté avec le type de système de fichiers ext4.
--list, -l [Options]
@ -590,7 +590,7 @@ Arguments pour la gestion des distributions dans Sous-système Windows pour Linu
Met fin à la distribution spécifiée.
--unregister &lt;Distro&gt;
Annule l'inscription de la distribution et supprime le système de fichiers racine.</value>
Annule linscription de la distribution et supprime le système de fichiers racine.</value>
<comment>{Locked="--exec,"}{Locked="--shell-type "}{Locked="--cd "}{Locked="--distribution,"}{Locked="--distribution-id "}{Locked="--user,"}{Locked="--system
"}{Locked="--help
"}{Locked="--debug-shell
@ -711,8 +711,13 @@ Le système devra peut-être être redémarré pour que les modifications prenne
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Le fichier spécifié doit avoir lextension de fichier .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Le fichier spécifié doit avoir lextension de fichier {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Le fichier spécifié doit avoir lextension de fichier {} ou {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>Le VmSwitch « {} » est introuvable. Commutateurs disponibles : {}</value>
@ -1005,7 +1010,7 @@ Retour à la mise en réseau NAT.</value>
<value>Voir les documents</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Impossible deffectuer lopération, car le vhdx est en cours dutilisation. Pour forcer WSL à arrêter lutilisation : wsl.exe --shutdown</value>
<value>Impossible deffectuer lopération, car le disque dur virtuel est en cours dutilisation. Pour forcer WSL à arrêter lutilisation : wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1013,7 +1018,7 @@ Retour à la mise en réseau NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Le vhdx partiellement alloué est pris en charge uniquement sur WSL2.</value>
<value>Le VHD partiellement alloué est pris en charge uniquement sur WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Lexécution de WSL en tant que système local nest pas prise en charge.</value>
@ -1062,7 +1067,7 @@ Retour à la mise en réseau NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Cela ressemble à un fichier VHDX. Utilisez --vhd pour importer un VHDX au lieu dun tar.</value>
<value>Cela ressemble à un fichier VHD. Utilisez --vhd pour importer un VHD au lieu dun tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1115,7 +1120,7 @@ Code d'erreur : {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>La prise en charge des VHD espacés est actuellement désactivée en raison dun risque potentiel de corruption des données.
Pour forcer une distribution à utiliser un VHD espacé, veuillez exécuter :
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -394,19 +394,19 @@ Linuxos bináris fájlok futtatására szolgáló argumentumok:
A parancssor fennmaradó részének átadása változtatás nélkül.
Kapcsolók:
--cd &lt;Directory&gt;
--cd &lt;Könyvtár&gt;
A megadott könyvtár aktuális munkakönyvtárként való beállítása.
Tilde (~) karakter használata esetén a rendszer a Linux-felhasználó kezdőkönyvtárának elérési útját használja. Ha az elérési út
perjel (/) karakterrel kezdődik, a rendszer az elérési utat linuxos abszolút elérési útként értelmezi.
Ellenkező esetben az értéknek windowsos abszolút elérési útnak kell lennie.
--distribution, -d &lt;DistroName&gt;
--distribution, -d &lt;DisztribúcióNév&gt;
A megadott disztribúció futtatása.
--distribution-id &lt;DistroGuid&gt;
--distribution-id &lt;DisztribúcióGuid&gt;
A megadott disztribúcióazonosító futtatása.
--user, -u &lt;USerName&gt;
--user, -u &lt;Felhasználónév&gt;
Futtatás a megadott felhasználóként.
--system
@ -431,132 +431,132 @@ A Linuxos Windows-alrendszer kezelésére szolgáló argumentumok:
--fixed-vhd
Rögzített méretű lemez létrehozása a disztribúció tárolásához.
--from-file &lt;Path&gt;
--from-file &lt;ElérésiÚt&gt;
Disztribúció telepítése helyi fájlból.
--legacy
Az örökölt disztribúciós jegyzékfájl használata.
--location &lt;Location&gt;
--location &lt;Hely&gt;
A disztribúció telepítési útvonalának beállítása.
--name &lt;Name&gt;
Állítsa be a disztribúció nevét.
--name &lt;Név&gt;
A disztribúció nevének beállítása.
--no-distribution
Csak a szükséges választható összetevők telepítése, nem telepít disztribúciót.
Csak a szükséges választható összetevők telepítése, a disztribúció telepítésének mellőzése.
--no-launch, -n
Telepítés után ne indítsa el a disztribúciót.
A disztribúció telepítés utáni elindításának mellőzése.
--version &lt;Version&gt;
--version &lt;Verzió&gt;
Az új disztribúcióhoz használandó verzió megadása.
--vhd-size &lt;MemoryString&gt;
Megadja a disztribúció tárolására szolgáló lemez méretét.
--vhd-size &lt;MemoriaSztring&gt;
A disztribúció tárolására szolgáló lemez méretének megadása.
--web-download
Töltse le a disztribúciót az internetről a Microsoft Store helyett.
A disztribúció letöltése az internetről a Microsoft Store helyett.
--manage &lt;Distro&gt; &lt;Options...&gt;
Disztribúcióspecifikus beállítások módosítása.
--manage &lt;Disztribúció&gt; &lt;Kapcsolók...&gt;
A disztribúcióspecifikus beállítások módosítása.
Beállítások:
--move &lt;Location&gt;
Helyezze át a disztribúciót egy új helyre.
Kapcsolók:
--move &lt;Hely&gt;
A disztribúció áthelyezése egy új helyre.
--set-sparse, -s &lt;true|false&gt;
Állítsa a disztribúció vhdx-fájlját ritkítás értékre, így a lemezterület automatikusan visszanyerhető.
A disztribúció VHD-fájljának sparse értékre állítása, hogy a lemezterület automatikusan visszanyerhető legyen.
--set-default-user &lt;Username&gt;
Állítsa be a disztribúció alapértelmezett felhasználóját.
--set-default-user &lt;Felhasználónév&gt;
A disztribúció alapértelmezett felhasználójának beállítása.
--resize &lt;MemoryString&gt;
--resize &lt;MemoriaSztring&gt;
A disztribúció lemezének átméretezése a megadott méretre.
--mount &lt;Disk&gt;
Fizikai vagy virtuális lemez csatlakoztatása és felcsatolása az összes WSL 2-disztribúcióban.
--mount &lt;Lemez&gt;
Fizikai vagy virtuális lemez hozzárendelése és csatlakoztatása az összes WSL 2-disztribúcióban.
Beállítások:
Kapcsolók:
--vhd
Annak megadása, hogy a &lt;Lemez&gt; virtuális merevlemezre hivatkozik.
Annak megadása, hogy a &lt;Lemez&gt; virtuális merevlemezre vonatkozik.
--bare
Csatlakoztatja a lemezt a WSL2-höz, de nem csatolja fel.
A lemezt WSL2-höz való hozzárendelése csatlakoztatás nélkül.
--name &lt;Name&gt;
Felcsatolja a lemezt a csatlakoztatási pont egyéni nevének használatával.
--name &lt;Név&gt;
A lemez csatlakoztatása egyéni csatlakoztatásipont-név használatával.
--type &lt;Type&gt;
Lemez felcsatolásához használandó fájlrendszer, ha nincs megadva az alapértelmezett érték az ext4.
--type &lt;Típus&gt;
Lemez csatlakoztatásához használandó fájlrendszer. Ha nincs megadva, az alapértelmezett érték az ext4.
--options &lt;Options&gt;
További felcsatolási lehetőségek.
--options &lt;Kapcsolók&gt;
További csatlakoztatási lehetőségek.
--partition &lt;Index&gt;
A felcsatolni kívánt partíció indexe, ha nincs megadva alapértelmezett érték a teljes lemezre.
A csatlakoztatni kívánt partíció indexe. Ha nincs megadva, az alapértelmezett érték a teljes lemez.
--set-default-version &lt;Version&gt;
--set-default-version &lt;Verzió&gt;
Az új disztribúciók alapértelmezett telepítési verziójának módosítása.
--shutdown
Azonnal leállítja az összes futó disztribúciót és a WSL 2
egyszerűsített segédprogram virtuális gépet.
Az összes futó disztribúció és a WSL 2
egyszerűsített segédprogram virtuális gépének azonnali leállítása.
Beállítások:
Kapcsolók:
--force
Leállítja a WSL 2 virtuális gépet, még akkor is, ha egy művelet folyamatban van. Adatvesztést okozhat.
A WSL 2 virtuális gép leállítása még akkor is, ha egy művelet folyamatban van. Adatvesztést okozhat.
--status
A Linuxos Windows-alrendszer állapotának megjelenítése.
--unmount [Disk]
Lemez lecsatolása és leválasztása a WSL2 összes disztribúciójáról.
Lecsatolja és leválasztja az összes lemezt, ha argumentum nélkül hívják meg.
--unmount [Lemez]
Lemez leválasztása és és a hozzárendelés megszüntetése a WSL2 összes disztribúciójára vonatkozóan.
Az összes lemez leválasztása és a hozzárendelésük megszüntetése, ha a meghívás argumentum nélkül történik.
--uninstall
Eltávolítja a Linuxos Windows-alrendszer csomagot erről a gépről.
A Linuxos Windows-alrendszer csomag eltávolítása erről a gépről.
--update
A Linuxos Windows-alrendszer csomagjának frissítése.
0A Linuxos Windows-alrendszer csomagjának frissítése.
Beállítások:
Kapcsolók:
--pre-release
Ha elérhető, töltsön le egy előzetes verziót.
Előzetes verzió letöltése, ha elérhető.
--version, -v
Verzióinformációk megjelenítése.
A disztribúcióknak a Linuxos Windows-alrendszerben való kezelésére szolgáló argumentumok:
A disztribúciók Linuxos Windows-alrendszerben való kezelésére szolgáló argumentumok:
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
A disztribúciót exportálja tar kiterjesztésű fájlba.
A fájlnév a következő lehet: stdout.
--export &lt;Disztribúció&gt; &lt;Fájlnév&gt; [Kapcsolók]
A disztribúció exportálása .tar fájlba.
A fájlnév stdout esetén kötőjel (-) is lehet.
Beállítások:
--format &lt;Format&gt;
Kapcsolók:
--format &lt;Formátum&gt;
Az exportálási formátum megadása. Támogatott értékek: tar, tar.gz, tar.xz, vhd.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
A megadott, tar kiterjesztésű fájl importálása új disztribúcióként.
A fájlnév a következő lehet: stdin.
--import &lt;Disztribúció&gt; &lt;TelepítésiHely&gt; &lt;Fájlnév&gt; [Kapcsolók]
A megadott .tar fájl importálása új disztribúcióként.
A fájlnév stdin esetén kötőjel (-) is lehet.
Beállítások:
--version &lt;Version&gt;
Kapcsolók:
--version &lt;Verzió&gt;
Az új disztribúcióhoz használandó verzió megadása.
--vhd
Azt adja meg, hogy a megadott fájl .vhdx fájl, nem tar fájl.
Ez a művelet másolatot készít a .vhdx fájlról a megadott telepítési helyen.
Azt adja meg, hogy a megadott fájl .vhd vagy .vhdx fájl, nem .tar fájl.
Ez a művelet másolatot készít a VHD-fájlról a megadott telepítési helyen.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
A megadott, vhdx kiterjesztésű fájl importálása új disztribúcióként.
--import-in-place &lt;Disztribúció&gt; &lt;Fájlnév&gt;
A megadott VHD-fájl importálása új disztribúcióként.
Ezt a virtuális merevlemezt az ext4 fájlrendszertípussal kell formázni.
--list, -l [Options]
--list, -l [Kapcsolók]
A disztribúciók listázása.
Beállítások:
Kapcsolók:
--all
Az összes disztribúciót listázza, beleértve a
jelenleg telepítés vagy eltávolítás alatt állókat is.
@ -571,18 +571,18 @@ A disztribúcióknak a Linuxos Windows-alrendszerben való kezelésére szolgál
Az összes disztribúció részletes adatainak megjelenítése.
--online, -o
Megjeleníti a 'wsl.exe --install' paranccsal telepíthető, elérhető disztribúciók listáját.
A 'wsl.exe --install' paranccsal telepíthető elérhető disztribúciók listájának megjelenítése.
--set-default, -s &lt;Distro&gt;
Az adott disztribúció beállítása alapértelmezettként.
--set-default, -s &lt;Disztribúció&gt;
A disztribúció beállítása alapértelmezettként.
--set-version &lt;Distro&gt; &lt;Version&gt;
--set-version &lt;Disztribúció&gt; &lt;Verzió&gt;
A megadott disztribúció verziójának módosítása.
--terminate, -t &lt;Distro&gt;
Leállítja a megadott disztribúciót.
--terminate, -t &lt;Disztribúció&gt;
A megadott disztribúció leállítása.
--unregister &lt;Distro&gt;
--unregister &lt;Disztribúció&gt;
A disztribúció regisztrációjának megszüntetése és a gyökérszintű fájlrendszer törlése.</value>
<comment>{Locked="--exec,"}{Locked="--shell-type "}{Locked="--cd "}{Locked="--distribution,"}{Locked="--distribution-id "}{Locked="--user,"}{Locked="--system
"}{Locked="--help
@ -704,8 +704,13 @@ Lehet, hogy újra kell indítani a rendszert, hogy a módosítások érvénybe l
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>A megadott fájlnak .vhdx kiterjesztésűnek kell lennie.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>A megadott fájlnak {} kiterjesztésűnek kell lennie.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>A megadott fájlnak {} vagy {} kiterjesztésűnek kell lennie.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>A(z) {} VmSwitch nem található. Elérhető kapcsolók: {}</value>
@ -998,7 +1003,7 @@ Visszaállás NAT-hálózatkezelésre.</value>
<value>Dokumentumok megtekintése</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>A művelet nem hajtható végre, mert a vhdx jelenleg használatban van. A WSL használatának kényszerítése: wsl.exe --shutdown</value>
<value>A művelet nem hajtható végre, mert a virtuális merevlemez jelenleg használatban van. A WSL használatának kényszerítése: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Visszaállás NAT-hálózatkezelésre.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>A ritka vhdx csak WSL2 esetén támogatott.</value>
<value>A ritka VHD csak WSL2 esetén támogatott.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>A WSL helyi rendszerként való futtatása nem támogatott.</value>
@ -1055,7 +1060,7 @@ Visszaállás NAT-hálózatkezelésre.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Ez egy VHDX-fájlnak tűnik. VHDX importálásához használja a --vhd formátumot tar helyett.</value>
<value>Ez egy VHD-fájlnak tűnik. VHD importálásához használja a --vhd formátumot tar helyett.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1106,9 +1111,9 @@ Hibakód: {}</value>
<value>A Globális biztonságos hozzáférés ügyféllel kapcsolatos jelenlegi kompatibilitási probléma miatt a DNS-alagútképzés le van tiltva.</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>A ritka VHD-támogatás jelenleg le van tiltva, mivel lehetséges adatsérülés léphet fel.
A ritka virtuális merevlemez használatának kényszerítéséhez futtassa a következő parancsot:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>A ritka VHD-támogatás jelenleg le van tiltva az adatok esetleges sérülése miatt.
Ha egy disztribúciót ritka VHD használatára szeretne kényszeríteni, futtassa a következőt:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -402,7 +402,7 @@ Argomenti per l'esecuzione di file binari Linux:
Opzioni:
--cd &lt;Directory&gt;
Imposta la directory specificata come directory di lavoro corrente.
Se si usa ~, verrà usato il percorso home dell'utente Linux. Se il percorso inizia
Se viene usato ~, verrà usato il percorso home dell'utente Linux. Se il percorso inizia
con un carattere /, verrà interpretato come un percorso Linux assoluto.
In caso contrario, il valore deve essere un percorso assoluto di Windows.
@ -472,7 +472,7 @@ Argomenti per la gestione del sottosistema Windows per Linux:
Sposta la distribuzione in una nuova posizione.
--set-sparse, -s &lt;true|false&gt;
Imposta il vhdx della distribuzione su sparse, consentendo il recupero automatico dello spazio su disco.
Imposta il VHD della distribuzione su sparse, consentendo il recupero automatico dello spazio su disco.
--set-default-user &lt;Username&gt;
Imposta l'utente predefinito della distribuzione.
@ -552,11 +552,11 @@ Argomenti per la gestione delle distribuzioni del sottosistema Windows per Linux
Specifica la versione da usare per la nuova distribuzione.
--vhd
Specifica che il file fornito è un file con estensione vhdx, non un file TAR.
Questa operazione crea una copia del file con estensione vhdx nel percorso di installazione specificato.
Specifica che il file fornito è un file con estensione vhd o vhdx, non un file TAR.
Questa operazione crea una copia del file VHD nel percorso di installazione specificato.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importa il file con estensione vhdx specificato come nuova distribuzione.
Importa il file VHD specificato come nuova distribuzione.
Questo disco rigido virtuale deve essere formattato con il tipo di file system ext4.
--list, -l [Options]
@ -577,7 +577,7 @@ Argomenti per la gestione delle distribuzioni del sottosistema Windows per Linux
Mostra informazioni dettagliate su tutte le distribuzioni.
--online, -o
Visualizza un elenco di distribuzioni disponibili per l'installazione con 'wsl--install'.
Visualizza un elenco di distribuzioni disponibili per l'installazione con 'wsl.exe --install'.
--set-default, -s &lt;Distro&gt;
Imposta la distribuzione come predefinita.
@ -710,8 +710,13 @@ Potrebbe essere necessario riavviare il sistema per rendere effettive le modific
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Il file specificato deve avere l'estensione vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Il file specificato deve avere l'estensione {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Il file specificato deve avere l'estensione {} o {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch '{}' non è stato trovato. Switch disponibili: {}</value>
@ -1004,7 +1009,7 @@ Fallback alla rete NAT.</value>
<value>Visualizza documenti</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Non è stato possibile completare l'operazione perché vhdx è attualmente in uso. Per forzare l'arresto di WSL, usare: wsl.exe --shutdown</value>
<value>Impossibile completare l'operazione perché il disco rigido virtuale è attualmente in uso. Per forzare l'arresto di WSL, usare: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ Fallback alla rete NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>VHDX di tipo sparse supportato solo in WSL2.</value>
<value>Disco rigido virtuale di tipo sparse supportato solo in WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>L'esecuzione di WSL come sistema locale non è supportata.</value>
@ -1061,7 +1066,7 @@ Fallback alla rete NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Sembra un file VHDX. Usa --vhd per importare un VHDX anziché un tar.</value>
<value>Questo sembra un file disco rigido virtuale. Usa --vhd per importare un disco rigido virtuale anziché un tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1112,9 +1117,9 @@ Codice errore: {}</value>
<value>A causa di un problema di compatibilità con Accesso globale sicuro, il tunneling DNS è attualmente disabilitato.</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Il supporto VHD di tipo Sparse è attualmente disabilitato a causa di un potenziale danneggiamento dei dati.
Per forzare l'uso di un disco rigido virtuale di tipo Sparse in una distribuzione, esegui:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>Il supporto disco rigido virtuale di tipo sparse attualmente è disabilitato a causa di un potenziale danneggiamento dei dati.
Per forzare una distribuzione per usare un disco rigido virtuale sparse, esegui:
wsl.exe --manage &lt;NomeDistribuzione&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -384,13 +384,13 @@ WSL1 を使用するには、"Linux 用 Windows サブシステム" オプショ
<value>Copyright (c) Microsoft Corporation.All rights reserved.
この製品のプライバシーに関する情報については、https://aka.ms/privacy にアクセスしてください。
使用法: wsl.exe [引数] [オプション...] [コマンド ライン]
使用法: wsl.exe [Argument] [Options...] [CommandLine]
Linux バイナリを実行するための引数:
コマンド ラインが指定されていない場合、wsl.exe は既定のシェルを起動します。
--exec, -e &lt;コマンド ライン&gt;
--exec, -e &lt;CommandLine&gt;
既定の Linux シェルを使用せずに、指定されたコマンドを実行します。
--shell-type &lt;standard|login|none&gt;
@ -400,19 +400,19 @@ Linux バイナリを実行するための引数:
残りのコマンド ラインをそのまま渡します。
オプション:
--cd &lt;ディレクトリ&gt;
--cd &lt;Directory&gt;
指定されたディレクトリを現在の作業ディレクトリとして設定します。
~ が使用されている場合、Linux ユーザーのホーム パスが使用されます。パスが
/ 文字で始まる場合、絶対 Linux パスとして解釈されます。
それ以外の場合、値は絶対 Windows パスである必要があります。
--distribution, -d &lt;ディストリビューション名&gt;
--distribution, -d &lt;DistroName&gt;
指定されたディストリビューションを実行します。
--distribution-id &lt;DistroGuid&gt;
指定されたディストリビューション ID を実行します。
--user, -u &lt;ユーザー名&gt;
--user, -u &lt;UserName&gt;
指定されたユーザーとして実行します。
--system
@ -426,7 +426,7 @@ Linux 用 Windows サブシステムを管理するための引数:
--debug-shell
診断のために WSL2 デバッグ シェルを開きます。
--install [ディストリビューション] [オプション...]
--install [Distro] [Options...]
Linux 用 Windows サブシステム ディストリビューションをインストールします。
有効なディストリビューションの一覧を表示するには、'wsl.exe --list --online' を使用します。
@ -437,16 +437,16 @@ Linux 用 Windows サブシステムを管理するための引数:
--fixed-vhd
ディストリビューションを保存するための固定サイズのディスクを作成します。
--from-file &lt;パス&gt;
--from-file &lt;Path&gt;
ローカル ファイルからディストリビューションをインストールします。
--legacy
レガシ ディストリビューション マニフェストを使用します。
--location &lt;場所&gt;
--location &lt;Location&gt;
ディストリビューションのインストール パスを設定します。
--name &lt;名前&gt;
--name &lt;Name&gt;
ディストリビューションの名前を設定します。
--no-distribution
@ -455,32 +455,32 @@ Linux 用 Windows サブシステムを管理するための引数:
--no-launch, -n
インストール後にディストリビューションを起動しません。
--version &lt;バージョン&gt;
--version &lt;Version&gt;
新しいディストリビューションに使用するバージョンを指定します。
--vhd-size &lt;メモリ文字列&gt;
--vhd-size &lt;MemoryString&gt;
ディストリビューションを保存するディスクのサイズを指定します。
--web-download
Microsoft Store ではなく、インターネットからディストリビューションをダウンロードします。
--manage &lt;ディストリビューション&gt; &lt;オプション...&gt;
--manage &lt;Distro&gt; &lt;Options...&gt;
ディストリビューション固有のオプションを変更します。
オプション:
--move &lt;場所&gt;
--move &lt;Location&gt;
ディストリビューションを新しい場所に移動します。
--set-sparse, -s &lt;true|false&gt;
ディストリビューションの vhdx をスパースに設定し、ディスク領域を自動的に解放できるようにします。
ディストリビューションの VHD をスパースに設定し、ディスク領域を自動的に解放できるようにします。
--set-default-user &lt;ユーザー名&gt;
--set-default-user &lt;Username&gt;
ディストリビューションの既定のユーザーを設定します。
--resize &lt;メモリ文字列&gt;
--resize &lt;MemoryString&gt;
ディストリビューションのディスクのサイズを指定したサイズに変更します。
--mount &lt;ディスク&gt;
--mount &lt;Disk&gt;
物理ディスクまたは仮想ディスクをすべての WSL 2 ディストリビューションにアタッチしてマウントします。
オプション:
@ -490,19 +490,19 @@ Linux 用 Windows サブシステムを管理するための引数:
--bare
ディスクを WSL2 にアタッチしますが、マウントはしません。
--name &lt;名前&gt;
--name &lt;Name&gt;
マウントポイントにカスタム名を使用してディスクをマウントします。
--type &lt;種類&gt;
--type &lt;Type&gt;
ディスクをマウントするときに使用するファイルシステム。指定しない場合は既定で ext4 になります。
--options &lt;オプション&gt;
--options &lt;Options&gt;
追加のマウント オプション。
--partition &lt;インデックス&gt;
--partition &lt;Index&gt;
マウントするパーティションのインデックス。指定しない場合は既定でディスク全体になります。
--set-default-version &lt;バージョン&gt;
--set-default-version &lt;Version&gt;
新しいディストリビューションの既定のインストール バージョンを変更します。
--shutdown
@ -516,7 +516,7 @@ Linux 用 Windows サブシステムを管理するための引数:
--status
Linux 用 Windows サブシステムの状態を表示します。
--unmount [ディスク]
--unmount [Disk]
すべての WSL2 ディストリビューションからディスクのマウントを解除してデタッチします。
引数を指定せずに呼び出した場合、すべてのディスクのマウントを解除してデタッチします。
@ -535,31 +535,31 @@ Linux 用 Windows サブシステムを管理するための引数:
Linux 用 Windows サブシステムでディストリビューションを管理するための引数:
--export &lt;ディストリビューション&gt; &lt;ファイル名&gt; [オプション]
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
ディストリビューションを tar ファイルにエクスポートします。
stdout の場合は、ファイル名に - を使用できます。
オプション:
--format &lt;形式&gt;
--format &lt;Format&gt;
エクスポート形式を指定します。サポートされている値は、tar、tar.gz、tar.xz、vhd です。
--import &lt;ディストリビューション&gt; &lt;インストール場所&gt; &lt;ファイル名&gt; [オプション]
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
指定された tar ファイルを新しいディストリビューションとしてインポートします。
stdin の場合は、ファイル名に - を使用できます。
オプション:
--version &lt;バージョン&gt;
--version &lt;Version&gt;
新しいディストリビューションに使用するバージョンを指定します。
--vhd
提供されたファイルが tar ファイルではなく .vhdx ファイルであることを指定します。
この操作により、指定されたインストール場所に .vhdx ファイルのコピーが作成されます。
指定されたファイルが tar ファイルではなく、.vhd または .vhdx ファイルであることを指定します。
この操作により、指定したインストール場所に VHD ファイルのコピーが作成されます。
--import-in-place &lt;ディストリビューション&gt; &lt;ファイル名&gt;
指定された .vhdx ファイルを新しいディストリビューションとしてインポートします。
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
指定した VHD ファイルを新しいディストリビューションとしてインポートします。
この仮想ハード ディスクは、ext4 ファイルシステムの種類でフォーマットする必要があります。
--list, -l [オプション]
--list, -l [Options]
ディストリビューションを一覧表示します。
オプション:
@ -579,16 +579,16 @@ Linux 用 Windows サブシステムでディストリビューションを管
--online, -o
'wsl.exe --install' を使用してインストールできるディストリビューションの一覧を表示します。
--set-default, -s &lt;ディストリビューション&gt;
--set-default, -s &lt;Distro&gt;
このディストリビューションを既定として設定します。
--set-version &lt;ディストリビューション&gt; &lt;バージョン&gt;
--set-version &lt;Distro&gt; &lt;Version&gt;
指定されたディストリビューションのバージョンを変更します。
--terminate, -t &lt;ディストリビューション&gt;
--terminate, -t &lt;Distro&gt;
指定されたディストリビューションを終了します。
--unregister &lt;ディストリビューション&gt;
--unregister &lt;Distro&gt;
このディストリビューションの登録を解除し、ルート ファイルシステムを削除します。</value>
<comment>{Locked="--exec,"}{Locked="--shell-type "}{Locked="--cd "}{Locked="--distribution,"}{Locked="--distribution-id "}{Locked="--user,"}{Locked="--system
"}{Locked="--help
@ -632,7 +632,7 @@ Windows バージョン: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>{} にカスタム カーネル モジュール VHD が見つかりませんでした: '{}'。</value>
<value>{} にあるカスタム カーネル モジュール VHD が見つかりませんでした: '{}'。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -710,8 +710,13 @@ Windows バージョン: {}</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>指定されたファイルには .vhdx ファイル拡張子が必要です。</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>指定されたファイルには {} ファイル拡張子が必要です。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>指定されたファイルには、{} または {} のファイル拡張子が必要です。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch '{}' が見つかりませんでした。使用可能なスイッチ: {}</value>
@ -1004,7 +1009,7 @@ NAT ネットワークにフォールバックしています。</value>
<value>ドキュメントを表示</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>vhdx が現在使用中のため、操作を完了できませんでした。WSL の使用を強制的に停止するには: wsl.exe --shutdown</value>
<value>VHD が現在使用中のため、操作を完了できませんでした。WSL の使用を強制的に停止するには: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ NAT ネットワークにフォールバックしています。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>スパース vhdx は WSL2 でのみサポートされています。</value>
<value>スパース VHD は WSL2 のみでサポートされています。</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>ローカル システムとして WSL を実行することはサポートされていません。</value>
@ -1061,7 +1066,7 @@ NAT ネットワークにフォールバックしています。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>これは VHDX ファイルのようです。--vhd を使用して、tar ではなく VHDX をインポートします。</value>
<value>これは VHD ファイルのようです。--vhd を使用して、tar ではなく VHD をインポートします。</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1114,7 +1119,7 @@ WSL を修復するには任意のキーを押すか、取り消すには CTRL-C
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>スパース VHD のサポートは、データの破損の可能性があるため、現在無効になっています。
ディストリビューションでスパース VHD を強制的に使用するには、次を実行してください。
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -402,8 +402,8 @@ Linux 이진 파일을 실행하기 위한 인수:
옵션:
--cd &lt;Directory&gt;
지정된 디렉터리를 현재 작업 디렉터리로 설정합니다.
~가 사용되는 경우 Linux 사용자의 홈 경로가 사용됩니다. 경로가 시작되면
/ 문자를 사용하면 절대 Linux 경로로 해석됩니다.
~가 사용되는 경우 Linux 사용자의 홈 경로가 사용됩니다. 경로가
/ 문자로 시작하면 절대 Linux 경로로 해석됩니다.
그렇지 않으면 값이 절대 Windows 경로여야 합니다.
--distribution, -d &lt;DistroName&gt;
@ -472,7 +472,7 @@ Linux용 Windows 하위 시스템을 관리하기 위한 인수:
배포를 새 위치로 이동합니다.
--set-sparse, -s &lt;true|false&gt;
배포판의 vhdx를 스파스로 설정하여 디스크 공간을 자동으로 회수할 수 있도록 합니다.
배포판의 VHD를 스파스로 설정하여 디스크 공간을 자동으로 회수할 수 있도록 합니다.
--set-default-user &lt;Username&gt;
배포의 기본 사용자를 설정합니다.
@ -552,11 +552,11 @@ Linux용 Windows 하위 시스템 배포를 관리하기 위한 인수:
새 배포에 사용할 버전을 지정합니다.
--vhd
제공된 파일이 tar 파일이 아닌 .vhdx 파일임을 지정합니다.
이 작업은 지정된 설치 위치에 .vhdx 파일의 복사본을 만듭니다.
제공된 파일이 tar 파일이 아닌 .vhd 또는 .vhdx 파일임을 지정합니다.
이 작업은 지정된 설치 위치에 VHD 파일의 복사본을 만듭니다.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
지정된 .vhdx 파일을 새 배포판로 가져옵니다.
지정된 VHD 파일을 새 배포판으로 가져옵니다.
이 가상 하드 디스크는 ext4 파일 시스템 형식으로 포맷해야 합니다.
--list, -l [Options]
@ -710,8 +710,13 @@ Windows 버전: {}</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>지정한 파일의 확장명은 .vhdx여야 합니다.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>지정한 파일에는 {} 파일 확장명이 있어야 합니다.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>지정한 파일에는 {} 또는 {} 파일 확장명이 있어야 합니다.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch '{}'을(를) 찾을 수 없습니다. 사용 가능한 스위치: {}</value>
@ -1004,7 +1009,7 @@ NAT 네트워킹으로 대체합니다.</value>
<value>문서 보기</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>vhdx가 현재 사용 중이므로 작업을 완료할 수 없습니다. WSL을 강제로 사용 중지하려면: wsl.exe --shutdown</value>
<value>VHD가 현재 사용 중이므로 작업을 완료할 수 없습니다. WSL을 강제로 사용 중지하려면: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ NAT 네트워킹으로 대체합니다.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>스파스 vhdx는 WSL2에서만 지원됩니다.</value>
<value>스파스 VHD는 WSL2에서만 지원됩니다.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>WSL을 로컬 시스템으로 실행할 수 없습니다.</value>
@ -1061,7 +1066,7 @@ NAT 네트워킹으로 대체합니다.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>VHDX 파일인 것 같습니다. --vhd 사용하여 tar 대신 VHDX를 가져옵니다.</value>
<value>VHD 파일인 것 같습니다. --vhd 사용하여 tar 대신 VHD를 가져옵니다.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1113,8 +1118,8 @@ NAT 네트워킹으로 대체합니다.</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>데이터 손상 가능성으로 인해 스파스 VHD 지원은 현재 비활성화되어 있습니다.
배포 시 강제로 스파스 VHD를 사용하도록 하려면 다음을 실행하세요.
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
배포 시 강제로 스파스 VHD를 사용하도록 하려면 다음을 실행하세요.
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -375,63 +375,63 @@ Bruk:
<comment>{Locked="/l,"}{Locked="/list "}{Locked="/all "}{Locked="/running "}{Locked="/s,"}{Locked="/setdefault "}{Locked="/t,"}{Locked="/terminate "}{Locked="/u,"}{Locked="/unregister "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Med enerett.
Hvis du vil ha informasjon om personvern vedrørende dette produktet, kan du gå til https://aka.ms/privacy.
<value>Opphavsrett (c) Microsoft Corporation. Med enerett.
Hvis du vil ha personverninformasjon om dette produktet, kan du gå til https://aka.ms/privacy.
Bruk: wsl.exe [argument] [alternativer...] [kommandolinje]
Bruk: wsl.exe [Argument] [Alternativer...] [Kommandolinje]
Argumenter for å kjøre Linux-binærfiler:
Hvis ingen kommandolinje er angitt, starter wsl.exe standardgrensesnittet.
Hvis ingen kommandolinje er angitt, starter wsl.exe standardgrensesnittet.
--exec, -e &lt;CommandLine&gt;
Kjører den angitte kommandoen uten å bruke standard Linux-grensesnitt.
--exec, -e &lt;CommandLine&gt;
Utfør den angitte kommandoen uten å bruke standard Linux shell.
--shell-type &lt;standard|login|none&gt;
Kjør den spesifiserte kommandoen med den angitte grensesnittypen.
Utfør den angitte kommandoen med den angitte skalltypen.
--
Send den gjenstående kommandolinjen slik den er.
--
Sender gjenstående kommandolinje slik den er.
Alternativer:
Options:
--cd &lt;Directory&gt;
Angir den spesifiserte katalogen som gjeldende arbeidskatalog.
Hvis ~ brukes, brukes Linux-brukerens startbane. Hvis banen starter
med et /-tegn, blir den tolket som en absolutt Linux-bane.
Hvis ikke må verdien være en absolutt Windows-bane.
Angir den angitte mappen som gjeldende arbeidsmappe.
Hvis ~ brukes, brukes Linux-brukerens hjemmebane. Hvis banen begynner
med et /-tegn, tolkes det som en absolutt Linux-bane.
Ellers må verdien være en absolutt Windows-bane.
--distribution, -d &lt;distronavn&gt;
Kjør den spesifiserte distribusjonen.
--distribution, -d &lt;DistroName&gt;
Kjør den angitte distribusjonen.
--distribution-id &lt;distroguid&gt;
Kjør den spesifiserte distribusjon-ID-en.
--distribution-id &lt;DistroGuid&gt;
Kjør den angitte distribusjons-ID-en.
--user, -u &lt;UserName&gt;
Kjør som den spesifiserte brukeren.
Kjør som den angitte brukeren.
--system
Starter et skall for systemdistribusjonen.
Argumenter for å behandle Windows-undersystemet for Linux:
Argumenter for behandling av Windows-undersystem for Linux:
--help
Vis informasjon om bruk.
Vis bruksinformasjon.
--debug-shell
Åpner et WSL 2-feilsøkingsgrensesnitt for diagnoseformål.
Åpne et WSL2 feilsøkingsskal til diagnoseformål.
--install [Distro] [Options...]
Installerer en distribusjon av typen Windows-undersystem for Linux.
Hvis du vil ha en liste over gyldige distribusjoner, kan du bruke 'wsl.exe --list --online'.
--install [Distro] [Alternativer ...]
Installer et Windows-undersystem for Linux-distribusjon.
For en liste over gyldige distribusjoner kan du bruke 'wsl.exe --list --online'.
Alternativer:
--enable-wsl1
Aktiver WSL1-støtte.
--fixed-vhd
Opprett en disk med fast størrelse for lagring av distribusjonen.
Opprett en disk med fast størrelse for å lagre distribusjonen.
--from-file &lt;bane&gt;
--from-file &lt;Path&gt;
Installer en distribusjon fra en lokal fil.
--legacy
@ -440,149 +440,149 @@ Argumenter for å behandle Windows-undersystemet for Linux:
--location &lt;Location&gt;
Angi installasjonsbanen for distribusjonen.
--name &lt;navn&gt;
--name &lt;Name&gt;
Angi navnet på distribusjonen.
--no-distribution
Installerer bare de nødvendige valgfrie komponentene. Installerer ikke en distribusjon.
Installer kun de nødvendige valgfrie komponentene, installerer ikke en distribusjon.
--no-launch, -n
Ikke start distribusjonen etter installasjon.
Ikke start distribusjonen etter installeringen.
--version &lt;versjon&gt;
Angir hvilken versjon som skal brukes for den nye distribusjonen.
--version &lt;Version&gt;
Angir versjonen som skal brukes til den nye distribusjonen.
--vhd-size &lt;MemoryString&gt;
Angir størrelsen på disken for å lagre distribusjonen.
Angir størrelsen på disken som skal lagre distribusjonen.
--web-download
Laster ned distribusjonen fra Internett i stedet for fra Microsoft Store.
Last ned distribusjonen fra internett i stedet for Microsoft Store.
--manage &lt;distribusjon&gt; &lt;alternativer ...&gt;
Endrer bestemte alternativer for distribusjonen.
--manage &lt;Distro&gt; &lt;Options...&gt;
Endrer bestemte alternativer for Distro.
Alternativer:
--move &lt;plassering&gt;
Flytt utrullingen til en ny plassering.
--move &lt;Location&gt;
Flytt distribusjonen til en ny plassering.
--set-sparse, -s &lt;sann|usann&gt;
Angir at VHDX-filen for distribusjonen skal være plassbesparende, slik at diskplass kan frigjøres automatisk.
--set-sparse, -s &lt;true|false&gt;
Angi at VHD-en for distro skal være spredt, slik at diskplass kan frigjøres automatisk.
--set-default-user &lt;brukernavn&gt;
--set-default-user &lt;Username&gt;
Angi standardbruker for distribusjonen.
--resize &lt;minnestreng&gt;
Endre størrelsen på disken for fordelingen til den angitte størrelsen.
--resize &lt;MemoryString&gt;
Endre størrelsen på disken i distribusjonen til den angitte størrelsen.
--mount &lt;disk&gt;
Kobler til og monterer en fysisk eller virtuell disk på alle WSL 2-distribusjoner.
--mount &lt;Disk&gt;
Fester og monterer en fysisk eller virtuell disk i alle WSL 2-distribusjonene.
Alternativer:
--vhd
Angir at &lt;disk&gt; refererer til en virtuell harddisk.
Angir at &lt;Disk&gt; refererer til en virtuell harddisk.
--bare
Kobler disken til WSL 2, men monterer den ikke.
Fest disken til WSL2, men ikke monter den.
--name &lt;navn&gt;
Monterer disken og bruker et egendefinert navn for monteringspunktet.
--name &lt;Name&gt;
Monter disken med et egendefinert navn på monteringspunktet.
--type &lt;type&gt;
Filsystemet som skal brukes ved montering av en disk. Hvis det ikke angis, brukes ext4 som standard.
--type &lt;Type&gt;
Filsystem til bruk ved montering av disk, om ikke angitt settes det som standard til ext4.
--options &lt;alternativer&gt;
--options &lt;Options&gt;
Flere monteringsalternativer.
--partition &lt;indeks&gt;
Indeksen for partisjonen som skal monteres. Hvis den ikke angis, brukes hele disken som standard.
--partition &lt;Index&gt;
Indeksen for partisjonen som skal monteres, hvis den ikke er angitt som standard for hele disken.
--set-default-version &lt;versjon&gt;
--set-default-version &lt;Version&gt;
Endrer standard installasjonsversjon for nye distribusjoner.
--shutdown
Avslutter umiddelbart alle kjørende distribusjoner og WSL 2
virtuell maskin for lette verktøy.
Avslutter umiddelbart alle kjørende distribusjoner og den virtuelle WSL 2
lightweight utility-maskinen.
Alternativer:
--force
Avslutt den virtuelle WSL 2-maskinen selv om en operasjon pågår. Kan føre til tap av data.
--status
Viser statusen til Windows-undersystem for Linux.
Vis statusen for Windows-undersystem for Linux.
--unmount [disk]
Demonterer og kobler fra en disk fra alle WSL 2-distribusjoner.
Demonterer og kobler fra alle disker hvis den kalles uten argument.
--unmount [Disk]
Demonterer og kobler fra en disk fra alle WSL2-distribusjoner.
Demonterer og løsner alle disker hvis de kalles uten argument.
--uninstall
Avinstallerer Windows-undersystemet for Linux-pakke fra denne maskinen.
Avinstallerer Windows-undersystem for Linux-pakken fra denne maskinen.
--update
Oppdaterer pakken med Windows-undersystemet for Linux.
Oppdaterer Windows-undersystem for Linux-pakken.
Alternativer:
--pre-release
Laster ned en forhåndsversjon hvis den er tilgjengelig.
Last ned en forhåndsversjon hvis tilgjengelig.
--version, -v
Viser versjonsinformasjon.
Vis versjonsinformasjon.
Argumenter for behandling av distribusjoner i Windows-undersystem for Linux:
--export &lt;distribusjon&gt; &lt;filnavn&gt; [alternativer]
Eksporterer distribusjonen til en TAR-fil.
Filnavnet kan være - for standard utdata.
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
Eksporterer distribusjonen til en tjærefil.
Filnavnet kan være - for stdout.
Alternativer:
--format &lt;Format&gt;
Angir eksportformatet. Støttede verdier: tar, tar.gz, vhd.
Angir eksportformatet. Støttede verdier: tar, tar.gz, tar.xz, vhd.
--import &lt;distribusjon&gt; &lt;installasjonsplassering&gt; &lt;filnavn&gt; [alternativer]
Importerer den angitte TAR-filen som en ny distribusjon.
Filnavnet kan være - for standard inndata.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
Importerer den angitte tjærefilen som en ny distribusjon.
Filnavnet kan være - for stdin.
Alternativer:
--version &lt;versjon&gt;
Angir hvilken versjon som skal brukes for den nye distribusjonen.
--version &lt;Version&gt;
Angir versjonen som skal brukes i den nye distribusjonen.
--vhd
Angir at den angitte filen er en VHDX-fil, ikke en TAR-fil.
Denne operasjonen lager en kopi av VHDX-filen på den angitte installasjonsplasseringen.
Angir at den angitte filen er en .vhd- eller .vhdx-fil, ikke en tjærefil.
Denne operasjonen lager en kopi av VHD-filen på den angitte installasjonsplasseringen.
--import-in-place &lt;distribusjon&gt; &lt;filnavn&gt;
Importerer den angitte VHDX-filen som en ny distribusjon.
Denne virtuelle harddisken må være formatert med filsystemtypen EXT4.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importerer den angitte VHD-filen som en ny distribusjon.
Denne virtuelle harddisken må formateres med filsystemtypen ext4.
--list, -l [alternativer]
Viser en liste over distribusjoner.
--list, -l [Options]
Viser distribusjoner.
Alternativer:
--all
Viser en liste over alle distribusjoner, inkludert distribusjoner som
installeres eller avinstalleres for øyeblikket.
Viser alle distribusjoner, inkludert distribusjoner som
for øyeblikket installeres eller avinstalleres.
--running
Viser en liste over bare distribusjoner som kjører.
Viser kun distribusjoner som kjører for øyeblikket.
--quiet, -q
Vis bare distribusjonsnavn.
Viser bare distribusjonsnavn.
--verbose, -v
Vis detaljert informasjon om alle distribusjoner.
Viser detaljert informasjon om alle distribusjonene.
--online, -o
Viser en liste over distribusjoner som kan installeres med 'wsl.exe --install'.
Viser en liste over tilgjengelige distribusjoner for installering med 'wsl.exe --install'.
--set-default, -s &lt;distribusjon&gt;
--set-default, -s &lt;Distro&gt;
Angir distribusjonen som standard.
--set-version &lt;distribusjon&gt; &lt;versjon&gt;
Endrer versjonen til den angitte distribusjonen.
--set-version &lt;Distro&gt; &lt;Version&gt;
Endrer versjonen for den angitte distribusjonen.
--terminate, -t &lt;distribusjon&gt;
--terminate, -t &lt;Distro&gt;
Avslutter den angitte distribusjonen.
--unregister &lt;distribusjon&gt;
--unregister &lt;Distro&gt;
Avregistrerer distribusjonen og sletter rotfilsystemet.</value>
<comment>{Locked="--exec,"}{Locked="--shell-type "}{Locked="--cd "}{Locked="--distribution,"}{Locked="--distribution-id "}{Locked="--user,"}{Locked="--system
"}{Locked="--help
@ -704,8 +704,13 @@ Systemet må kanskje startes på nytt slik at endringene kan tre i kraft.</value
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Den angitte filen må ha filtypen VHDX.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Den angitte filen må ha filtypen {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Den angitte filen må ha filendelsen {} eller {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>Finner ikke VmSwitch {}. Tilgjengelige brytere: {}</value>
@ -998,7 +1003,7 @@ Faller tilbake til NAT-nettverk.</value>
<value>Vis dokumenter</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Operasjonen kan ikke fullføres fordi VHDX-filen er i bruk. Slik tvinger du WSL til å stoppe bruk: wsl.exe --shutdown</value>
<value>Operasjonen kan ikke fullføres fordi VHD-en er i bruk. Slik tvinger du WSL til å stoppe: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Faller tilbake til NAT-nettverk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx støttes bare på WSL2.</value>
<value>Sparse VHD støttes bare på WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Kjøring av WSL som lokalt system støttes ikke.</value>
@ -1055,7 +1060,7 @@ Faller tilbake til NAT-nettverk.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Dette ser ut som en VDHX-fil. Bruk --vhd til å importere en VHDX i stedet for en tar.</value>
<value>Dette ser ut som en VHD-fil. Bruk --vhd til å importere en VHD i stedet for en tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1107,8 +1112,8 @@ Feilkode: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Sparsom VHD-støtte er deaktivert på grunn av potensiell dataskade.
Hvis du vil tvinge en distribusjon til å bruke en sparsom vhd, kan du kjøre:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
Hvis du vil tvinge en distribusjon til å bruke en sparsom VHD, kan du kjøre:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -420,7 +420,7 @@ Argumenten voor het beheren van het Windows-subsysteem voor Linux:
--debug-shell
Een WSL2-foutopsporingsshell voor diagnostische doeleinden openen.
--install [Distributie] [Opties...]
--install [Distro] [Options...]
Een Windows-subsysteem voor Linux-distributie installeren.
Gebruik 'wsl.exe --list --online' voor een lijst met geldige distributies.
@ -429,7 +429,7 @@ Argumenten voor het beheren van het Windows-subsysteem voor Linux:
WSL1-ondersteuning inschakelen.
--fixed-vhd
Maak een schijf met een vaste grootte om de distributie op te slaan.
Een schijf met een vaste grootte maken om de distributie op te slaan.
--from-file &lt;Path&gt;
Een distributie installeren vanaf een lokaal bestand.
@ -450,10 +450,10 @@ Argumenten voor het beheren van het Windows-subsysteem voor Linux:
De distributie niet na de installatie starten.
--version &lt;Version&gt;
Hiermee geeft u de versie op die moet worden gebruikt voor de nieuwe distributie.
Specificeert de versie die moet worden gebruikt voor de nieuwe distributie.
--vhd-size &lt;MemoryString&gt;
Geeft de grootte van de schijf op om de distributie op te slaan.
Specificeert de grootte van de schijf om de distributie op te slaan.
--web-download
De distributie downloaden van internet in plaats van Microsoft Store.
@ -463,10 +463,10 @@ Argumenten voor het beheren van het Windows-subsysteem voor Linux:
Opties:
--move &lt;Location&gt;
Verplaats de distributie naar een nieuwe locatie.
De distributie naar een nieuwe locatie verplaatsen.
--set-sparse, -s &lt;true|false&gt;
De vhdx van distro instellen op sparse, zodat schijfruimte automatisch opnieuw kan worden geclaimd.
De VHD van de distributie instellen op sparse, zodat schijfruimte automatisch opnieuw kan worden geclaimd.
--set-default-user &lt;Username&gt;
De standaardgebruiker van de distributie instellen.
@ -505,7 +505,7 @@ Argumenten voor het beheren van het Windows-subsysteem voor Linux:
Opties:
--force
Beëindig de WSL 2 virtuele machine, zelfs als er een bewerking wordt uitgevoerd. Dit kan gegevensverlies veroorzaken.
De WSL 2-VM beëindigen, zelfs als er een bewerking wordt uitgevoerd. Dit kan gegevensverlies veroorzaken.
--status
De status van het Windows-subsysteem voor Linux weergeven.
@ -535,7 +535,7 @@ Argumenten voor het beheren van distributies in het Windows-subsysteem voor Linu
Opties:
--format &lt;Format&gt;
De exportindeling opgeven. Ondersteunde waarden: tar, tar.gz, tar.xz, vhd.
Specificeert de exportindeling. Ondersteunde waarden: tar, tar.gz, tar.xz, vhd.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Opties]
Hiermee importeer je het opgegeven TAR-bestand als een nieuwe distributie.
@ -546,11 +546,11 @@ Argumenten voor het beheren van distributies in het Windows-subsysteem voor Linu
Hiermee geef je de versie op die moet worden gebruikt voor de nieuwe distributie.
--vhd
Hiermee geef je op dat het opgegeven bestand een VHDX-bestand is en geen TAR-bestand.
Met deze bewerking wordt een kopie gemaakt van het VHDX-bestand op de opgegeven installatielocatie.
Hiermee geef je op dat het opgegeven bestand een VHD- of VHDX-bestand is en geen TAR-bestand.
Met deze bewerking wordt een kopie gemaakt van het VHD-bestand op de opgegeven installatielocatie.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Hiermee importeer je het opgegeven VHDX-bestand als een nieuwe distributie.
Hiermee importeer je het opgegeven VHD-bestand als een nieuwe distributie.
Deze virtuele harde schijf moet zijn geformatteerd met het ext4-type bestandssysteem.
--list, -l [Opties]
@ -606,7 +606,7 @@ Argumenten voor het beheren van distributies in het Windows-subsysteem voor Linu
"}{Locked="--quiet,"}{Locked="--verbose,"}{Locked="--online,"}{Locked="--install'"}{Locked="--set-default,"}{Locked="--set-version "}{Locked="--terminate,"}{Locked="--unregister "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePackageVersions" xml:space="preserve">
<value>WSL-versiie: {}
<value>WSL-versie: {}
Kernelversie: {}
WSLg-versie: {}
MSRDC-versie: {}
@ -626,7 +626,7 @@ Buildtijd: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>De VHD van de aangepaste kernelmodules in {} is niet gevonden: {}.</value>
<value>De aangepaste kernelmodules VHD in {} is niet gevonden: {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ Het systeem moet mogelijk opnieuw worden opgestart, zodat de wijzigingen van kra
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Het opgegeven bestand moet de bestandsextensie .vhdx hebben.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Het opgegeven bestand moet de bestandsextensie {} hebben.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Het opgegeven bestand moet de bestandsextensie {} of {} hebben.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>Kan de VmSwitch {} niet vinden. Beschikbare switches: {}</value>
@ -998,7 +1003,7 @@ Terugvallen op NAT-netwerken.</value>
<value>Documenten weergeven</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>De bewerking kan niet worden voltooid omdat de VHDX momenteel in gebruik is. Stoppen van WSL forceren: wsl.exe --shutdown</value>
<value>De bewerking kan niet worden voltooid omdat de VHD momenteel in gebruik is. Stoppen van WSL forceren: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Terugvallen op NAT-netwerken.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx wordt alleen ondersteund op WSL2.</value>
<value>Sparse VHD wordt alleen ondersteund op WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Het uitvoeren van WSL als lokaal systeem wordt niet ondersteund.</value>
@ -1055,7 +1060,7 @@ Terugvallen op NAT-netwerken.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Dit ziet eruit als een VHDX-bestand. Gebruik --vhd om een VHDX te importeren in plaats van een tar.</value>
<value>Dit ziet eruit als een VHD-bestand. Gebruik --vhd om een VHD te importeren in plaats van een tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1107,7 +1112,7 @@ Foutcode: {}</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Sparse VHD-ondersteuning is momenteel uitgeschakeld vanwege mogelijk beschadigde gegevens.
Om een distributie te dwingen een sparse vhd te gebruiken, voer je het volgende uit:
Om een distributie te dwingen een sparse VHD te gebruiken, voer je het volgende uit:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>

View File

@ -466,7 +466,7 @@ Argumenty zarządzania podsystemem Windows dla systemu Linux:
Przenosi dystrybucję do nowej lokalizacji.
--set-sparse, -s &lt;true|false&gt;
Ustawia dysk vhdx dystrybucji jako rozrzedzony, dzięki czemu miejsce na dysku jest automatycznie odzyskiwane.
Ustawia dysk VHD dystrybucji jako rozrzedzony, dzięki czemu miejsce na dysku jest automatycznie odzyskiwane.
--set-default-user &lt;Username&gt;
Ustawia domyślnego użytkownika dystrybucji.
@ -546,11 +546,11 @@ Argumenty zarządzania dystrybucjami w Podsystemie Windows dla systemu Linux:
Określa wersję do użycia dla nowej dystrybucji.
--vhd
Określa, że podany plik jest plikiem vhdx, a nie plikiem tar.
Ta operacja tworzy kopię pliku vhdx w określonej lokalizacji instalacji.
Określa, że podany plik jest plikiem .vhd lub .vhdx, a nie plikiem tar.
Ta operacja tworzy kopię pliku VHD w określonej lokalizacji instalacji.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importuje określony plik .vhdx jako nową dystrybucję.
Importuje określony plik VHD jako nową dystrybucję.
Ten wirtualny dysk twardy musi być sformatowany przy użyciu typu systemu plików ext4.
--list, -l [Options]
@ -704,8 +704,13 @@ Może być konieczne ponowne uruchomienie systemu, aby zmiany zostały wprowadzo
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Określony plik musi mieć rozszerzenie pliku vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Określony plik musi mieć rozszerzenie pliku {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Określony plik musi mieć rozszerzenie pliku {} lub {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>Nie znaleziono przełącznika maszyny wirtualnej „{}”. Dostępne przełączniki: {}</value>
@ -998,7 +1003,7 @@ Powrót do sieci NAT.</value>
<value>Zobacz dokumenty</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Nie można ukończyć operacji, ponieważ dysk vhdx jest obecnie używany. Aby wymusić zatrzymanie używania protokołu WSL: wsl.exe --shutdown</value>
<value>Nie można ukończyć operacji, ponieważ dysk VHD jest obecnie używany. Aby wymusić zatrzymanie używania protokołu WSL: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Powrót do sieci NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Rozrzedzony dysk vhdx jest obsługiwany tylko w systemie WSL2.</value>
<value>Rozrzedzony dysk VHD jest obsługiwany tylko w systemie WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Uruchamianie podsystemu WSL jako systemu lokalnego nie jest obsługiwane.</value>
@ -1055,7 +1060,7 @@ Powrót do sieci NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Wygląda to na plik VHDX. Użyj polecenia --vhd , aby zaimportować plik VHDX zamiast tar.</value>
<value>This looks like a VHD file. Use --vhd to import a VHD instead of a tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1108,7 +1113,7 @@ Kod błędu: {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Obsługa rozrzedzonych dysków VHD jest obecnie wyłączona z powodu potencjalnego uszkodzenia danych.
Aby wymusić używanie rozrzedzonego dysku VHD przez dystrybucję, uruchom polecenie:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -383,7 +383,7 @@ Uso:
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Todos os direitos reservados.
Para obter informações sobre a privacidade desse produto, visite https://aka.ms/privacy.
Para obter informações sobre a privacidade deste produto, visite https://aka.ms/privacy.
Uso: wsl.exe [Argumento] [Opções...] [Linha de comando]
@ -408,13 +408,13 @@ Opções:
Caso contrário, o valor deverá ser um caminho do Windows absoluto.
--distribution, -d &lt;DistroName&gt;
Executar a distribuição especificada.
Executa a distribuição especificada.
--distribution-id &lt;DistroGuid&gt;
Executa a ID da distribuição especificada.
--user, -u &lt;UserName&gt;
Executar como o usuário especificado.
Executa como o usuário especificado.
--system
Inicia um shell para a distribuição do sistema.
@ -429,7 +429,7 @@ Argumentos para gerenciar o Subsistema do Windows para Linux:
--install [Distribuição] [Opções...]
Instala uma distribuição do Subsistema do Windows para Linux.
Para uma lista de distribuições válidas, use 'wsl.exe --list --online'.
Para uma lista de distribuições válidas, use ''wsl.exe --list --online''.
Opções:
--enable-wsl1
@ -466,14 +466,14 @@ Argumentos para gerenciar o Subsistema do Windows para Linux:
Baixa a distribuição da internet em vez da Microsoft Store.
--manage &lt;Distro&gt; &lt;Options...&gt;
Altera opções específicas da distribuição.
Altera as opções específicas da distribuição.
Opções:
--move &lt;Location&gt;
Move a distribuição para um novo local.
--set-sparse, -s &lt;true|false&gt;
Define o vhdx da distribuição como esparso, permitindo que o espaço em disco seja recuperado automaticamente.
Defina o VHD de distribuição como esparso, permitindo que o espaço em disco seja recuperado automaticamente.
--set-default-user &lt;Username&gt;
Define o usuário padrão da distribuição.
@ -553,12 +553,12 @@ Argumentos para gerenciar as distribuições no Subsistema do Windows para Linux
Especifica a versão a ser usada para a nova distribuição.
--vhd
Especifica que o arquivo fornecido é um arquivo .vhdx, e não um arquivo tar.
Essa operação faz uma cópia do arquivo .vhdx no local de instalação especificado.
Especifica que o arquivo fornecido é um arquivo .vhd ou .vhdx, não um arquivo tar.
Esta operação faz uma cópia do arquivo VHD no local de instalação especificado.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importa o arquivo .vhdx especificado como uma nova distribuição.
Esse disco rígido virtual deve ser formatado com o tipo de sistema de arquivos ext4.
Importa o arquivo VHD especificado como uma nova distribuição.
Este disco rígido virtual deve ser formatado com o tipo de sistema de arquivos ext4.
--list, -l [Opções]
Lista as distribuições.
@ -578,7 +578,7 @@ Argumentos para gerenciar as distribuições no Subsistema do Windows para Linux
Mostra informações detalhadas sobre todas as distribuições.
--online, -o
Exibe uma lista de distribuições disponíveis para instalação com 'wsl.exe --install'.
Exibe uma lista de distribuições disponíveis para instalação com ''wsl.exe --install''.
--set-default, -s &lt;Distro&gt;
Define a distribuição como o padrão.
@ -633,7 +633,7 @@ Tempo de compilação: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>Os módulos de kernel personalizados vhd em {} não foram encontrados: '{}'.</value>
<value>O VHD dos módulos de kernel personalizados em {} não foi encontrado: '{}'.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -711,8 +711,13 @@ Talvez seja necessário reiniciar o sistema para que as alterações entrem em v
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>O arquivo especificado deve ter a extensão de arquivo .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>O arquivo especificado deve ter a extensão de arquivo {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>O arquivo especificado deve ter a extensão de arquivo {} ou {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>O VmSwitch '{}' não foi encontrado. Switches disponíveis: {}</value>
@ -1005,7 +1010,7 @@ Voltando à rede NAT.</value>
<value>Ver Documentos</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Não foi possível concluir a operação porque o vhdx está em uso no momento. Para forçar o WSL a interromper o uso: wsl.exe --shutdown</value>
<value>Não foi possível concluir a operação porque o VHD está em uso no momento. Para forçar o WSL a interromper o uso: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1013,7 +1018,7 @@ Voltando à rede NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Há suporte para vhdx esparso somente no WSL2.</value>
<value>O VHD esparso é compatível apenas com o WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>A execução do WSL como sistema local não é suportada.</value>
@ -1062,7 +1067,7 @@ Voltando à rede NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Parece um arquivo VHDX. Use --vhd para importar um VHDX em vez de um tar.</value>
<value>Parece um arquivo VHD. Use --vhd para importar um VHD em vez de um tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1113,9 +1118,9 @@ Código de erro: {}</value>
<value>Devido a um problema de compatibilidade atual com o Cliente do Acesso Global Seguro, o Túnel DNS está desabilitado.</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>O suporte ao VHD esparso está desabilitado no momento devido à possível corrupção de dados.
<value>O suporte a VHD esparso está atualmente desativado devido a possível corrupção de dados.
Para forçar uma distribuição a usar um VHD esparso, execute:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -376,38 +376,38 @@ Utilização:
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Todos os direitos reservados.
Para obter informações de privacidade sobre este produto, visite https://aka.ms/privacy.
Para informações de privacidade sobre este produto, visite https://aka.ms/privacy.
Utilização: wsl.exe [Argument] [Options...] [CommandLine]
Argumentos para executar binários do Linux:
Se não for fornecida nenhuma linha de comandos, o wsl.exe inicia a shell predefinida.
Se nenhuma linha de comandos for fornecida, o wsl.exe inicia a shell predefinida.
--exec, -e &lt;CommandLine&gt;
Executar o comando especificado sem utilizar a shell predefinida do Linux.
Executa o comando especificado sem utilizar a shell predefinida do Linux.
--shell-type &lt;standard|login|none&gt;
Executar o comando especificado com o tipo de shell fornecido.
Executa o comando especificado com o tipo de shell fornecido.
--
Passar a linha de comandos restante tal como está.
Passa a linha de comandos restante tal como está.
Opções:
--cd &lt;Diretório&gt;
--cd &lt;Directory&gt;
Define o diretório especificado como o diretório de trabalho atual.
Se ~ for utilizado, será utilizado o caminho raiz do utilizador do Linux. Se o caminho começar
por um caráter /, será interpretado como caminho absoluto do Linux.
Caso contrário, o valor tem de ser um caminho absoluto do Windows.
Caso contrário, o valor deve ser um caminho absoluto do Windows.
--distribution, -d &lt;DistroName&gt;
Executar a distribuição especificada.
Executa a distribuição especificada.
--distribution-id &lt;DistroGuid&gt;
Executar o ID da distribuição especificada.
Executa o ID da distribuição especificada.
--user, -u &lt;UserName&gt;
Executar como o utilizador especificado.
Executa como o utilizador especificado.
--system
Inicia uma shell para a distribuição do sistema.
@ -415,33 +415,33 @@ Opções:
Argumentos para gerir o Subsistema Windows para Linux:
--help
Apresentar informações de utilização.
Apresenta informações de utilização.
--debug-shell
Abrir uma shell de depuração do WSL2 para fins de diagnóstico.
Abre uma shell de depuração do WSL2 para fins de diagnóstico.
--install [Distro] [Options...]
Instalar uma distribuição do Subsistema Windows para Linux.
Para uma lista de distribuições válidas, utilize 'wsl.exe --list --online'.
Instala uma distribuição do Subsistema Windows para Linux.
Para obter uma lista de distribuições válidas, utilize 'wsl.exe --list --online'
Opções:
--enable-wsl1
Ativar o suporte WSL1.
Ativa o suporte WSL1.
--fixed-vhd
Crie um disco de tamanho fixo para armazenar a distribuição.
Cria um disco de tamanho fixo para armazenar a distribuição.
--from-file &lt;Path&gt;
Instalar uma distribuição a partir de um ficheiro local.
Instala uma distribuição a partir de um ficheiro local.
--legacy
Utilizar o manifesto de distribuição legado.
Utiliza o manifesto de distribuição legado.
--location &lt;Location&gt;
Definir o caminho de instalação para a distribuição.
Define o caminho de instalação da distribuição.
--name &lt;Name&gt;
Definir o nome da distribuição.
Define o nome da distribuição.
--no-distribution
Instala apenas os componentes opcionais necessários. Não instala uma distribuição.
@ -450,29 +450,29 @@ Argumentos para gerir o Subsistema Windows para Linux:
Não inicia a distribuição após a instalação.
--version &lt;Version&gt;
Especifica a versão a utilizar para a nova distribuição.
Especifica a versão a utilizar na nova distribuição.
--vhd-size &lt;MemoryString&gt;
Especifica o tamanho do disco para armazenar a distribuição.
--web-download
Transfere a distribuição da Internet em vez de transferir da Microsoft Store.
Transfere a distribuição da Internet, em vez de pela Microsoft Store.
--manage &lt;Distro&gt; &lt;Options...&gt;
Altera as opções específicas da distribuição.
Opções:
--move &lt;Location&gt;
Mover a distribuição para uma nova localização.
Move a distribuição para uma nova localização.
--set-sparse, -s &lt;true|false&gt;
Define o vhdx da distribuição para ser disperso, o que permite que o espaço em disco seja automaticamente recuperado.
Define o VHD da distribuição para ser disperso, permitindo que o espaço em disco seja automaticamente recuperado.
--set-default-user &lt;Username&gt;
Definir o utilizador predefinido da distribuição.
Define o utilizador predefinido da distribuição.
--resize &lt;MemoryString&gt;
Redimensionar o disco da distribuição para o tamanho especificado.
Redimensiona o disco da distribuição ao tamanho especificado.
--mount &lt;Disk&gt;
Liga e monta um disco físico ou virtual em todas as distribuições do WSL 2.
@ -482,7 +482,7 @@ Argumentos para gerir o Subsistema Windows para Linux:
Especifica que &lt;Disk&gt; se refere a um disco rígido virtual.
--bare
Liga o disco ao WSL 2, mas sem o montar.
Liga o disco ao WSL2, mas sem o montar.
--name &lt;Name&gt;
Monta o disco com um nome personalizado para o ponto de montagem.
@ -497,7 +497,7 @@ Argumentos para gerir o Subsistema Windows para Linux:
Índice da partição a montar. Se não for especificado, é predefinido para todo o disco.
--set-default-version &lt;Version&gt;
Altera a versão de instalação predefinida para as novas distribuições.
Altera a versão de instalação predefinida para novas distribuições.
--shutdown
Termina imediatamente todas as distribuições em execução e o WSL 2
@ -505,7 +505,7 @@ Argumentos para gerir o Subsistema Windows para Linux:
Opções:
--force
Terminar a máquina virtual WSL 2 mesmo que esteja a decorrer uma operação. Pode causar perda de dados.
Termina a máquina virtual WSL 2 mesmo que esteja a decorrer uma operação. Pode causar perda de dados.
--status
Mostra o estado do Subsistema Windows para Linux.
@ -515,7 +515,7 @@ Argumentos para gerir o Subsistema Windows para Linux:
Desmonta e desliga todos os discos se for chamado sem argumento.
--uninstall
Desinstala o pacote do Subsistema Windows para Linux a partir deste computador.
Desinstala o pacote do Subsistema Windows para Linux a partir deste computador.
--update
Atualiza o pacote do Subsistema Windows para Linux.
@ -531,7 +531,7 @@ Argumentos para gerir distribuições no Subsistema Windows para Linux:
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
Exporta a distribuição para um ficheiro tar.
O nome de ficheiro pode ser - para Stdout.
O nome de ficheiro pode ser - para stdout.
Opções:
--format &lt;Format&gt;
@ -546,11 +546,11 @@ Argumentos para gerir distribuições no Subsistema Windows para Linux:
Especifica a versão a utilizar para a nova distribuição.
--vhd
Especifica que o ficheiro fornecido é um ficheiro .vhdx e não um ficheiro tar.
Esta operação faz uma cópia do ficheiro .vhdx na localização de instalação especificada.
Especifica que o ficheiro fornecido é um ficheiro .vhd ou .vhdx, não um ficheiro tar.
Esta operação faz uma cópia do ficheiro VHD na localização de instalação especificada.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importa o ficheiro .vhdx especificado como nova distribuição.
Importa o ficheiro VHD especificado como nova distribuição.
Este disco rígido virtual tem de ser formatado com o tipo de sistema de ficheiros ext4.
--list, -l [Options]
@ -626,7 +626,7 @@ Hora da criação: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>O vhd de módulos kernel personalizados em {} não foi encontrado: "{}".</value>
<value>O VHD dos módulos kernel personalizados em {} não foi encontrado: "{}".</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ O sistema poderá ter de ser reiniciado para que as alterações possam ter efei
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>O ficheiro especificado tem de ter a extensão de ficheiro. vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>O ficheiro especificado tem de ter a extensão de ficheiro {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>O ficheiro especificado tem de ter a extensão de ficheiro {} ou {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>O VmSwitch "{}" não foi encontrado. Interruptores disponíveis: {}</value>
@ -998,7 +1003,7 @@ A reverter para a rede NAT.</value>
<value>Ver Documentos</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Não foi possível concluir a operação porque o vhdx está atualmente a ser utilizado. Para forçar o WSL a parar a utilização: wsl.exe --shutdown</value>
<value>Não foi possível concluir a operação porque o VHD está atualmente a ser utilizado. Para forçar o WSL a parar, utilize: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ A reverter para a rede NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>O vhdx disperso é suportado apenas em WSL2.</value>
<value>O VHD disperso é suportado apenas no WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>A execução do WSL como sistema local não é suportada.</value>
@ -1055,7 +1060,7 @@ A reverter para a rede NAT.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Este parece ser um ficheiro VHDX. Utilize --vhd para importar um ficheiro VHDX em vez de tar.</value>
<value>Este parece ser um ficheiro VHD. Utilize --vhd para importar um ficheiro VHD em vez de um tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1108,7 +1113,7 @@ Código de erro: {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>O suporte a VHD disperso está atualmente desativado devido a potenciais danos nos dados.
Para forçar uma distribuição a utilizar um VHD disperso, execute:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -460,7 +460,7 @@
Указывает версию, используемую для нового дистрибутива.
--vhd-size &lt;MemoryString&gt;
Указывает размер диска для хранения распределения.
Указывает размер диска для хранения дистрибутива.
--web-download
Скачать дистрибутив из Интернета вместо Microsoft Store.
@ -473,7 +473,7 @@
Переместить дистрибутив в новое местоположение.
--set-sparse, -s &lt;true|false&gt;
Задать для VHDX дистрибутива значение "разреженный", чтобы обеспечить автоматическое освобождение дискового пространства.
Задать для VHD дистрибутива значение "разреженный", чтобы обеспечить автоматическое освобождение дискового пространства.
--set-default-user &lt;Username&gt;
Задать пользователя по умолчанию для дистрибутива.
@ -553,11 +553,11 @@
Указывает версию, используемую для нового дистрибутива.
--vhd
Указывает, что предоставленный файл является VHDX-файлом, а не TAR-файлом.
Эта операция создает копию VHDX-файла в указанном расположении установки.
Указывает, что предоставленный файл является файлом VHD или VHDX, а не TAR-файлом.
Эта операция создает копию VHD-файла в указанном расположении установки.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Импортирует указанный VHDX-файл в качестве нового дистрибутива.
Импортирует указанный VHD-файл в качестве нового дистрибутива.
Этот виртуальный жесткий диск должен быть отформатирован с типом файловой системы ext4.
--list, -l [параметры]
@ -711,8 +711,13 @@
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Указанный файл должен иметь расширение VHDX-файла.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Указанный файл должен иметь расширение файла {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Указанный файл должен иметь расширение файла {} или {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>VmSwitch "{}" не найден. Доступные коммутаторы: {}</value>
@ -1005,7 +1010,7 @@
<value>Просмотреть документы</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Не удалось завершить операцию, так как VHDX сейчас используется. Чтобы принудительно остановить использование WSL, выполните команду wsl.exe --shutdown</value>
<value>Не удалось завершить операцию, так как VHD сейчас используется. Чтобы принудительно остановить использование WSL, выполните команду wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1013,7 +1018,7 @@
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Разреженный VHDX поддерживается только в WSL2.</value>
<value>Разреженный VHD поддерживается только в WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Запуск WSL в виде локальной системы не поддерживается.</value>
@ -1062,7 +1067,7 @@
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Похоже, это VHDX-файл. Используйте --vhd для импорта VHDX вместо TAR.</value>
<value>Похоже, это VHD-файл. Используйте --vhd для импорта VHD вместо tar.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1115,7 +1120,7 @@
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Поддержка разреженного VHD в настоящее время отключена из-за возможного повреждения данных.
Чтобы принудительно использовать разреженный VHD в дистрибутиве, выполните команду:
wsl.exe --manage &lt;имя_дистрибутива&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -376,16 +376,16 @@ Användning:
</data>
<data name="MessageWslUsage" xml:space="preserve">
<value>Copyright (c) Microsoft Corporation. Med ensamrätt.
Sekretessinformation för den här produkten finns på https://aka.ms/privacy.
Sekretessinformation om den här produkten finns i https://aka.ms/privacy.
Användning: wsl.exe [Argument] [Options...] [CommandLine]
Usage: wsl.exe [Argument] [Options...] [CommandLine]
Argument för att köra Linux-binärfiler:
Om ingen kommandorad anges startar wsl.exe standardgränssnittet.
--exec, -e &lt;CommandLine&gt;
Kör det angivna kommandot utan att använda standardgränssnittet för Linux.
Kör det angivna kommandot utan.
--shell-type &lt;standard|login|none&gt;
Kör det angivna kommandot med den angivna gränssnittstypen.
@ -396,18 +396,18 @@ Argument för att köra Linux-binärfiler:
Alternativ:
--cd &lt;Directory&gt;
Anger den angivna katalogen som aktuell arbetskatalog.
Om ~ används kommer Linux-användarens hemsökväg att användas. Om sökvägen börjar
med ett /-tecken tolkas det som en absolut Linux-sökväg.
Om ~ används används Linux-användarens hemsökväg. Om sökvägen börjar
med ett/-tecken tolkas den som en absolut Linux-sökväg.
Annars måste värdet vara en absolut Windows-sökväg.
--distribution, -d &lt;DistroName&gt;
Kör den angivna distributionen.
--distribution-id &lt;DistroGuid&gt;
Kör det angivna distributions-ID:t.
Kör det angivna distributions-ID:t.
--user, -u &lt;UserName&gt;
Kör som den angivna användaren.
Kör som angiven användare.
--system
Startar ett gränssnitt för systemdistributionen.
@ -420,9 +420,9 @@ Argument för att hantera Windows-undersystem för Linux:
--debug-shell
Öppna ett WSL2-felsökningsgränssnitt i diagnostiksyfte.
--install [Distro] [Options...]
Installera ett Windows-undersystem för Linux distribution.
Om du vill ha en lista över giltiga distributioner använder du 'wsl.exe --list --online'.
--install [Distro] [Alternativ...]
Installera en Windows-undersystem för Linux distribution.
Använd 'wsl.exe --list --online' för en lista över giltiga distributioner'.
Alternativ:
--enable-wsl1
@ -441,10 +441,10 @@ Argument för att hantera Windows-undersystem för Linux:
Ange installationssökvägen för distributionen.
--name &lt;Name&gt;
Ange ett namn på distributionen.
Ange namnet på distributionen.
--no-distribution
Installera endast de valfria komponenter som krävs, ingen distribution installeras.
Installera endast nödvändiga valfria komponenter, installerar inte någon distribution.
--no-launch, -n
Starta inte distributionen efter installationen.
@ -453,23 +453,23 @@ Argument för att hantera Windows-undersystem för Linux:
Anger vilken version som ska användas för den nya distributionen.
--vhd-size &lt;MemoryString&gt;
Anger storleken på disken för att lagra distributionen.
Anger storleken på den disk som distributionen ska lagras på.
--web-download
Ladda ned distributionen från Internet i stället för Microsoft Store.
--manage &lt;Distro&gt; &lt;Options...&gt;
Ändrar distributionsspecifika alternativ.
Distributionsalternativ för ändringar.
Alternativ:
--move &lt;Location&gt;
Flytta distributionen till en ny plats.
--set-sparse, -s &lt;true|false&gt;
Ange att vhdx-distributionen ska vara sparsam, vilket gör att diskutrymmet automatiskt kan frigöras.
Ange att den virtuella hårddisken för distribution ska vara sparse, vilket gör att diskutrymmet kan frigöras automatiskt.
--set-default-user &lt;Username&gt;
Ange standardanvändaren för distributionen.
Ange standardanvändaren för fördelningen.
--resize &lt;MemoryString&gt;
Ändra storlek på disken för fördelningen till den angivna storleken.
@ -488,57 +488,57 @@ Argument för att hantera Windows-undersystem för Linux:
Montera disken med ett anpassat namn för monteringspunkten.
--type &lt;Type&gt;
Filsystem som ska användas vid montering av en disk, om inget anges används ext4 som standard.
Filsystem som ska användas vid montering av en disk, om inget standardvärde anges till ext4.
--options &lt;Options&gt;
Fler monteringsalternativ.
Ytterligare monteringsalternativ.
--partition &lt;Index&gt;
Index för partitionen som ska monteras, om inget anges är standardvärdet hela disken.
Index för partitionen som ska monteras, om det inte anges som standard för hela disken.
--set-default-version &lt;Version&gt;
Ändrar standardinstallationsversionen för nya distributioner.
--shutdown
Avslutar omedelbart alla distributioner som körs och WSL 2
den virtuella datorn med förenklat verktyg.
Avslutar omedelbart alla distributioner som körs och den virtuella WSL 2-
lightweight utility virtual machine.
Alternativ:
--force
Avsluta den virtuella WSL 2-datorn även om en åtgärd pågår. Kan orsaka dataförlust.
--status
Visa statusen för Windows-undersystem för Linux.
Visa status för Windows-undersystem för Linux.
--unmount [Disk]
Demonterar och kopplar bort en disk från alla WSL2-distributioner.
Demonterar och kopplar bort alla diskar om de anropas utan argument.
Demonterar och kopplar bort alla diskar om det anropas utan argument.
--uninstall
Avinstallerar Windows-undersystem för Linux-paketet från den här datorn.
Avinstallerar Windows-undersystem för Linux paketet från den här datorn.
--update
Uppdatera Windows-undersystem för Linux-paketet.
Alternativ:
--pre-release
Ladda ned en förhandsversion om den är tillgänglig.
Ladda ned en förhandsversion om tillgänglig.
--version, -v
Övrig versionsinformation.
Visa versionsinformation.
Argument för att hantera distributioner i Windows-undersystem för Linux:
Arguments for managing Argument för att hantera distributioner i Windows-undersystem för Linux:
--export &lt;Distro&gt; &lt;FileName&gt; [Options]
Exporterar fördelningen till en TAR-fil.
Exporterar distributionen till en tar-fil.
Filnamnet kan vara - för stdout.
Alternativ:
--format &lt;Format&gt;
Anger exportformatet. Värden som stöds: tar, tar.gz, tar.xz, vhd.
S Anger exportformatet. Värden som stöds: tar, tar.gz, tar.xz, vhd.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
Importerar den angivna tar-filen som en ny distribution.
Importerar den angivna tar-filen som en ny distribution.
Filnamnet kan vara - för stdin.
Alternativ:
@ -546,20 +546,20 @@ Argument för att hantera distributioner i Windows-undersystem för Linux:
Anger vilken version som ska användas för den nya distributionen.
--vhd
Anger att den angivna filen är en VHDX-fil, inte en TAR-fil.
Den här åtgärden gör en kopia av VHDX-filen på den angivna installationsplatsen.
Anger att den angivna filen är en VHD- eller VHDX-fil, inte en tar-fil.
ThDen här åtgärden gör en kopia av VHD-filen på den angivna installationsplatsen.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Importerar den angivna VHDX-filen som en ny distribution.
Den här virtuella hårddisken måste vara formaterad med filsystemtypen ext4.
Importerar den angivna VHD-filen som en ny distribution.
Den här virtuella hårddisken måste formateras med filsystemtypen ext4.
--list, -l [Options]
Listar distributioner.
Visar distributioner.
Alternativ:
--all
Lista alla distributioner, inklusive distributioner som
håller på att installeras eller avinstalleras.
Lista alla distributioner, inklusive distributioner som
håller på att installeras eller avinstalleras.
--running
Lista endast distributioner som körs för närvarande.
@ -574,10 +574,10 @@ Argument för att hantera distributioner i Windows-undersystem för Linux:
Visar en lista över tillgängliga distributioner för installation med 'wsl.exe --install'.
--set-default, -s &lt;Distro&gt;
Anger fördelningen som standard.
Anger fördelningen som standard
--set-version &lt;Distro&gt; &lt;Version&gt;
Ändrar den angivna distributionens version.
Ändrar versionen av den angivna distributionen.
--terminate, -t &lt;Distro&gt;
Avslutar den angivna distributionen.
@ -704,8 +704,13 @@ Systemet kan behöva startas om så att ändringarna kan börja gälla.</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Den angivna filen måste ha filnamnstillägget .vhdx.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Den angivna filen måste ha filnamnstillägget {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Den angivna filen måste ha filnamnstillägget {} eller {}.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>Det gick inte att hitta VmSwitch {}. Tillgängliga växlar: {}</value>
@ -998,7 +1003,7 @@ Mer information finns på https://aka.ms/wslinstall</value>
<value>Visa dokument</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>Det gick inte att slutföra åtgärden eftersom vhdx används för närvarande. Så här tvingar du WSL att sluta använda: wsl.exe --shutdown</value>
<value>Det gick inte att slutföra åtgärden eftersom den virtuella hårddisken används för närvarande. Så här tvingar du WSL att sluta använda: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ Mer information finns på https://aka.ms/wslinstall</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Sparse vhdx stöds endast på WSL2.</value>
<value>Sparse VHD stöds endast på WSL2.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>Det finns inte stöd för att köra WSL som lokalt system.</value>
@ -1055,7 +1060,7 @@ Mer information finns på https://aka.ms/wslinstall</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Det här ser ut som en VHDX-fil. Använd --vhd för att importera en VHDX i stället för en tjära.</value>
<value>Det här ser ut som en VHD-fil. Använd --vhd för att importera en virtuell hårddisk i stället för en tjära.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1108,7 +1113,7 @@ Felkod: {}</value>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Stöd för dynamiskt expanderbar VHD är för närvarande inaktiverat på grund av potentiell datakorruption.
Om du vill tvinga en distribution att använda en dynamiskt expanderbar VHD kör du:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -466,7 +466,7 @@ Linux için Windows Alt Sistemini yönetmeyi sağlayan bağımsız değişkenler
Dağıtımı yeni bir konuma taşır.
--set-sparse, -s &lt;true|false&gt;
Dağıtım vhdx'inin aralıklı olacak şekilde ayarlar ve böylece disk alanının otomatik olarak geri kazanılmasını sağlar.
Dağıtım VHD'inin aralıklı olacak şekilde ayarlar ve böylece disk alanının otomatik olarak geri kazanılmasını sağlar.
--set-default-user &lt;Username&gt;
Dağıtımın varsayılan kullanıcısını ayarlar.
@ -537,7 +537,7 @@ Linux için Windows Alt Sistemi'nde dağıtımı yönetmek için bağımsız de
--format &lt;Format&gt;
Dışarı aktarma biçimini belirtir. Desteklenen değerler: tar, tar.gz, vhd.
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Options]
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [Seçenekler]
Belirtilen tar dosyasını yeni bir dağıtım olarak içeri aktarır.
Dosya adı - for stdin olabilir.
@ -546,11 +546,11 @@ Linux için Windows Alt Sistemi'nde dağıtımı yönetmek için bağımsız de
Yeni dağıtım için kullanılacak sürümü belirtir.
--vhd
Sağlanan dosyanın tar dosyası değil, .vhdx dosyası olduğunu belirtir.
Bu işlem, belirtilen yükleme konumunda .vhdx dosyasının bir kopyasını oluşturur.
Sağlanan dosyanın tar dosyası değil, .vhd veya .vhdx dosyası olduğunu belirtir.
Bu işlem, belirtilen yükleme konumunda VHD dosyasının bir kopyasını oluşturur.
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
Belirtilen .vhdx dosyasını yeni bir dağıtım olarak içeri aktarır.
Belirtilen VHD dosyasını yeni bir dağıtım olarak içeri aktarır.
Bu sanal sabit diskin ext4 dosya sistemi türüyle biçimlendirilmesi gerekir.
--list, -l [Seçenekler]
@ -626,7 +626,7 @@ Derleme zamanı: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomKernelModulesNotFound" xml:space="preserve">
<value>{} içinde vhd özel çekirdek modülleri bulunamadı: '{}'.</value>
<value>{} içinde özel çekirdek modülleri VHD'si bulunamadı: '{}'.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCustomSystemDistroError" xml:space="preserve">
@ -704,8 +704,13 @@ Değişikliklerin etkili olması için sistemin yeniden başlatılması gerekebi
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>Belirtilen dosyanın .vhdx dosya uzantısı olmalıdır.</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>Belirtilen dosyada {} dosya uzantısı olmalıdır.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>Belirtilen dosyada {} veya {} dosya uzantısı olmalıdır.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>'{}' VmSwitch bulunamadı. Uygun anahtarlar: {}</value>
@ -998,7 +1003,7 @@ NAT ağ bağlantısına geri dönülüyor.</value>
<value>Belgeleri Göster</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>vhdx şu anda kullanımda olduğundan işlem tamamlanamadı. WSL'yi durmaya zorlamak için şunu kullanın: wsl.exe --shutdown</value>
<value>İşlem tamamlanamadı çünkü VHD şu anda kullanımda. WSL'yi durmaya zorlamak için şu komutu kullanın: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1006,7 +1011,7 @@ NAT ağ bağlantısına geri dönülüyor.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>Seyrek vhdx yalnızca WSL2'de desteklenir.</value>
<value>Seyrek VHD yalnızca WSL2'de desteklenir.</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>WSL'nin yerel sistem olarak çalıştırılması desteklenmez.</value>
@ -1055,7 +1060,7 @@ NAT ağ bağlantısına geri dönülüyor.</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>Bu bir VHDX dosyası gibi görünüyor. Katran --vhd VHDX içeri aktarın.</value>
<value>Bu bir VHD dosyası gibi görünüyor. Katran --vhd VHD içeri aktarın.</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
@ -1106,9 +1111,9 @@ Hata kodu: {}</value>
<value>Küresel Güvenli Erişim İstemcisiyle ilgili mevcut bir uyumluluk sorunu nedeniyle DNS Tünelleme devre dışı bırakıldı.</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>Seyrek VHD desteği olası veri bozulması nedeniyle şu anda devre dışıdır.
<value>Seyrek VHD desteği olası veri bozulması nedeniyle şu anda devre dışı bırakılmıştır.
Bir dağıtımı seyrek VHD kullanmaya zorlamak için lütfen şu komutu çalıştırın:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">

View File

@ -132,7 +132,7 @@
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDiskAlreadyAttached" xml:space="preserve">
<value>磁盘“{}”已连接。</value>
<value>磁盘“{}”已连接。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDiskAlreadyMounted" xml:space="preserve">
@ -407,16 +407,16 @@
否则,该值必须是绝对 Windows 路径。
--distribution, -d &lt;DistroName&gt;
运行指定的发版。
运行指定的发版。
--distribution-id &lt;DistroGuid&gt;
运行指定的发版 ID。
运行指定的发版 ID。
--user, -u &lt;UserName&gt;
以指定用户身份运行。
--system
为系统发版启动 shell。
为系统发版启动 shell。
用于管理适用于 Linux 的 Windows 子系统的参数:
@ -427,61 +427,61 @@
出于诊断目的打开 WSL2 调试 shell。
--install [Distro] [Options...]
安装适用于 Linux 的 Windows 子系统发版。
有关有效发版的列表,请使用 'wsl.exe --list --online'。
安装适用于 Linux 的 Windows 子系统发版。
有关有效发版的列表,请使用 'wsl.exe --list --online'。
选项:
--enable-wsl1
启用 WSL1 支持。
--fixed-vhd
创建固定大小的磁盘来存储发版。
创建固定大小的磁盘来存储发版。
--from-file &lt;Path&gt;
从本地文件安装发版。
从本地文件安装发版。
--legacy
使用旧发版清单。
使用旧发版清单。
--location &lt;Location&gt;
设置发版的安装路径。
设置发版的安装路径。
--name &lt;Name&gt;
设置发版的名称。
设置发版的名称。
--no-distribution
仅安装所需的可选组件,不安装发版。
仅安装所需的可选组件,不安装发版。
--no-launch, -n
安装后不要启动发版。
安装后不要启动发版。
--version &lt;Version&gt;
指定要用于新分发的版本。
--vhd-size &lt;MemoryString&gt;
指定用于存储发版的磁盘的大小。
指定用于存储发版的磁盘的大小。
--web-download
从 Internet 而不是 Microsoft Store 下载发版。
从 Internet 而不是 Microsoft Store 下载发版。
--manage &lt;Distro&gt; &lt;Options...&gt;
更改发行版特定选项。
选项:
--move &lt;Location&gt;
发版移到新位置。
将发版移到新位置。
--set-sparse, -s &lt;true|false&gt;
将发行版的 vhdx 设置为稀疏,从而允许自动回收磁盘空间。
将发行版的 VHD 设置为稀疏,从而允许自动回收磁盘空间。
--set-default-user &lt;Username&gt;
设置发版的默认用户。
设置发版的默认用户。
--resize &lt;MemoryString&gt;
发版的磁盘大小调整为指定大小。
将发版的磁盘大小调整为指定大小。
--mount &lt;Disk&gt;
在所有 WSL 2 发版中附加和装载物理磁盘或虚拟磁盘。
在所有 WSL 2 发版中附加和装载物理磁盘或虚拟磁盘。
选项:
--vhd
@ -503,10 +503,10 @@
要装载的分区的索引(如果未指定)默认为整个磁盘。
--set-default-version &lt;Version&gt;
更改新发版的默认安装版本。
更改新发版的默认安装版本。
--shutdown
立即终止所有正在运行的发版和 WSL 2
立即终止所有正在运行的发版和 WSL 2
轻型实用工具虚拟机。
选项:
@ -517,7 +517,7 @@
显示适用于 Linux 的 Windows 子系统状态。
--unmount [磁盘]
从所有 WSL2 发版中卸载和分离磁盘。
从所有 WSL2 发版中卸载和分离磁盘。
如果在没有参数的情况下调用,则卸载和分离所有磁盘。
--uninstall
@ -533,10 +533,10 @@
--version, -v
显示版本信息。
用于在适用于 Linux 的 Windows 子系统中管理发版的参数:
用于在适用于 Linux 的 Windows 子系统中管理发版的参数:
--export &lt;Distro&gt; &lt;FileName&gt; [选项]
发版导出到 tar 文件。
将发版导出到 tar 文件。
文件名可以是 - for stdout。
选项:
@ -544,7 +544,7 @@
指定导出格式。支持的值: tar、tar.gz、tar.xz、vhd。
--import &lt;Distro&gt; &lt;InstallLocation&gt; &lt;FileName&gt; [选项]
将指定的 tar 文件作为新发版导入。
将指定的 tar 文件作为新发版导入。
文件名可以是 - for stdin。
选项:
@ -552,44 +552,44 @@
指定要用于新分发的版本。
--vhd
指定所提供的文件是 .vhdx 文件,而不是 tar 文件。
此操作在指定的安装位置创建 .vhdx 文件的副本。
指定所提供的文件是 .vhd 还是 .vhdx 文件,而不是 tar 文件。
此操作在指定的安装位置创建 VHD 文件的副本。
--import-in-place &lt;Distro&gt; &lt;FileName&gt;
将指定的 .vhdx 文件作为新分发版导入。
将指定的 VHD 文件作为新发行版导入。
必须使用 ext4 文件系统类型设置此虚拟硬盘的格式。
--list, -l [选项]
列出发版。
列出发版。
选项:
--all
列出所有发版,包括当前
正在安装或卸载的发版。
列出所有发版,包括当前
正在安装或卸载的发版。
--running
仅列出当前正在运行的发版。
仅列出当前正在运行的发版。
--quiet, -q
仅显示发版名称。
仅显示发版名称。
--verbose, -v
显示有关所有发版的详细信息。
显示有关所有发版的详细信息。
--online, -o
显示适合通过 'wsl --install' 安装的可用发版列表。
显示适合通过 'wsl --install' 安装的可用发版列表。
--set-default, -s &lt;Distro&gt;
将分布版设置为默认值。
--set-version &lt;Distro&gt; &lt;Version&gt;
更改指定发版的版本。
更改指定发版的版本。
--terminate, -t &lt;Distro&gt;
终止指定的发版。
终止指定的发版。
--unregister &lt;Distro&gt;
取消注册发版并删除根文件系统。</value>
取消注册发版并删除根文件系统。</value>
<comment>{Locked="--exec,"}{Locked="--shell-type "}{Locked="--cd "}{Locked="--distribution,"}{Locked="--distribution-id "}{Locked="--user,"}{Locked="--system
"}{Locked="--help
"}{Locked="--debug-shell
@ -683,7 +683,7 @@ Windows: {}</value>
<value>正在导入,这可能需要几分钟时间。</value>
</data>
<data name="GuiApplicationsDisabled" xml:space="preserve">
<value>通过 {} 或 /etc/wsl.conf 禁用 GUI 应用程序支持。</value>
<value>通过 {} 或 /etc/wsl.conf 禁用 GUI 应用程序支持。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageCheckingForUpdates" xml:space="preserve">
@ -710,8 +710,13 @@ Windows: {}</value>
<comment>{Locked="--install "}{Locked="--no-distribution
"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresVhdxFileExtension" xml:space="preserve">
<value>指定的文件必须具有 .vhdx 文件扩展名。</value>
<data name="MessageRequiresFileExtension" xml:space="preserve">
<value>指定的文件必须具有 {} 文件扩展名。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageRequiresFileExtensions" xml:space="preserve">
<value>指定的文件必须具有 {} 或 {} 文件扩展名。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageVmSwitchNotFound" xml:space="preserve">
<value>找不到 VmSwitch“{}”。可用开关: {}</value>
@ -817,11 +822,11 @@ Windows: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidInstallDistributionName" xml:space="preserve">
<value>分发名称无效:“{}”。</value>
<value>无效分发名称:“{}”。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageUsingLegacyDistribution" xml:space="preserve">
<value>使用旧分发注册。请考虑改用基于 tar 的分发。</value>
<value>正在使用旧分发注册。请考虑改用基于 tar 的分发。</value>
</data>
<data name="MessageLegacyDistributionVersionArgNotSupported" xml:space="preserve">
<value>旧分发注册不支持 --version 参数。</value>
@ -859,7 +864,7 @@ Windows: {}</value>
<value>此计算机上不支持嵌套虚拟化。</value>
</data>
<data name="MessageFailedToCreateNetworkEndpoint" xml:space="preserve">
<value>无法创建地址为“{}”的网络终结点,已分配新地址:“{}”</value>
<value>无法创建地址为“{}”的网络点,已分配新地址:“{}”</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageFailedToCreateNetwork" xml:space="preserve">
@ -900,10 +905,10 @@ Windows: {}</value>
<value>检测到 IPv6 代理配置,但未镜像到 WSL。NAT 模式下的 WSL 不支持 IPv6。</value>
</data>
<data name="MessageProxyLoopbackV6SettingsDropped" xml:space="preserve">
<value>检测到 localhost IPv6 代理配置,但未镜像到 WSL。WSL 不支持 localhost IPv6 代理。</value>
<value>检测到 localhost IPv6 代理配置,但未镜像到 WSL。WSL 不支持 localhost IPv6 代理。</value>
</data>
<data name="MessageProxyUnexpectedSettingsDropped" xml:space="preserve">
<value>尝试解析代理设置时发生意外错误,代理设置未镜像到 WSL。</value>
<value>尝试解析代理设置时发生意外错误,代理设置未镜像到 WSL。</value>
</data>
<data name="MessageRegistryError" xml:space="preserve">
<value>访问注册表时出错。路径:“{}”。错误: {}</value>
@ -942,14 +947,14 @@ Windows: {}</value>
<comment>{FixedPlaceholder="{}"}{Locked=".wslconfig"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDebugShellDisabled" xml:space="preserve">
<value>计算机策略禁用调试 shell。</value>
<value>计算机策略禁用调试 shell。</value>
</data>
<data name="MessageWSLMountDisabled" xml:space="preserve">
<value>wsl.exe --mount 被计算机策略禁用。</value>
<comment>{Locked="--mount "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageWSL1Disabled" xml:space="preserve">
<value>WSL1 被计算机策略禁用。</value>
<value>计算机策略禁用 WSL1。</value>
</data>
<data name="MessageUpgradeToWSL2" xml:space="preserve">
<value>请运行“wsl.exe --set-version {} 2”以升级到 WSL2。</value>
@ -1004,7 +1009,7 @@ Windows: {}</value>
<value>请参阅文档</value>
</data>
<data name="MessageVhdInUse" xml:space="preserve">
<value>无法完成该操作,因为 vhdx 当前正在使用中。若要强制 WSL 停止使用: wsl.exe --shutdown</value>
<value>无法完成该操作,因为 VHD 当前正在使用中。强制 WSL 停止使用: wsl.exe --shutdown</value>
<comment>{Locked="--shutdown"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageInvalidBoolean" xml:space="preserve">
@ -1012,7 +1017,7 @@ Windows: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageSparseVhdWsl2Only" xml:space="preserve">
<value>仅 WSL2 支持稀疏 vhdx。</value>
<value>仅 WSL2 支持稀疏 VHD。</value>
</data>
<data name="MessageLocalSystemNotSupported" xml:space="preserve">
<value>不支持将 WSL 作为本地系统运行。</value>
@ -1061,11 +1066,11 @@ Windows: {}</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessagePassVhdFlag" xml:space="preserve">
<value>这似乎是 VHDX 文件。使用 --vhd 导入 VHDX 而不是 tar。</value>
<value>这看起来像一个 VHD 文件。使用 --vhd 导入 VHD而不是导入 tar。</value>
<comment>{Locked="--vhd "}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDistroStoreInstallFailed" xml:space="preserve">
<value>未能从以下Microsoft Store安装 {} {}
<value>未能从 Microsoft Store 安装 {}{}
正在尝试 Web 下载...</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
@ -1077,7 +1082,7 @@ Windows: {}</value>
</data>
<data name="MessageInstallationCorrupted" xml:space="preserve">
<value>WSL 安装似乎已损坏 (错误代码: {})。
按任意键修复 WSL或 CTRL-C 取消。
按任意键修复 WSL CTRL-C 取消。
此提示将在 60 秒后超时。</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
@ -1109,12 +1114,12 @@ Windows: {}</value>
<value>提供的自定义内核模块未指定自定义内核。有关详细信息,请参阅 https://aka.ms/wslcustomkernel。</value>
</data>
<data name="MessageDnsTunnelingDisabled" xml:space="preserve">
<value>由于当前与全安全访问客户端的兼容性问题DNS 隧道被禁用。</value>
<value>由于当前与全安全访问客户端的兼容性问题DNS 隧道被禁用。</value>
</data>
<data name="MessageSparseVhdDisabled" xml:space="preserve">
<value>由于潜在的数据损坏,目前已禁用稀疏 VHD 支持。
若要强制分发使用稀疏 vhd请运行
wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
要强制发行版使用稀疏 VHD请运行:
wsl.exe --manage &lt;DistributionName&gt; --set-sparse true --allow-unsafe</value>
<comment>{Locked="--manage "}{Locked="--set-sparse "}{Locked="--allow-unsafe"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageDrvfsMountFailed" xml:space="preserve">
@ -1122,7 +1127,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="MessageFstabMountFailed" xml:space="preserve">
<value>使用装载 -a 处理 /etc/fstab 失败。</value>
<value>使用 mount -a 处理 /etc/fstab 失败。</value>
</data>
<data name="MessageReadOnlyDistro" xml:space="preserve">
<value>装载分发磁盘时出错,该磁盘作为回退以只读方式装载。
@ -1133,7 +1138,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<comment>{FixedPlaceholder="{}"}Command line arguments, file names and string inserts should not be translated</comment>
</data>
<data name="Settings_ErrorTryAgainLater.Text" xml:space="preserve">
<value>出现错误。请稍后再试一次。</value>
<value>出现错误。请稍后再试。</value>
</data>
<data name="Settings_AboutPageTitle.Text" xml:space="preserve">
<value>关于</value>
@ -1155,28 +1160,28 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>自动内存回收</value>
</data>
<data name="Settings_AutoMemoryReclaim.Description" xml:space="preserve">
<value>检测到空闲 CPU 使用情况后自动释放缓存内存。为缓存的即时释放设置为慢速释放和 dropcache。</value>
<value>检测到空闲 CPU 使用情况后自动释放缓存内存。设为 gradual 缓慢释放;设为 dropcache 迅速释放。</value>
</data>
<data name="Settings_AutoMemoryReclaimComboBox.AutomationProperties.Name" xml:space="preserve">
<value>自动内存回收。</value>
</data>
<data name="Settings_AutoMemoryReclaimComboBox.AutomationProperties.HelpText" xml:space="preserve">
<value>检测到空闲 CPU 使用情况后自动释放缓存内存。为缓存的即时释放设置为慢速释放和 dropcache。</value>
<value>检测到空闲 CPU 使用情况后自动释放缓存内存。设为 gradual 缓慢释放;设为 dropcache 迅速释放。</value>
</data>
<data name="Settings_AutoProxy.Header" xml:space="preserve">
<value>已启用自动代理</value>
</data>
<data name="Settings_AutoProxy.Description" xml:space="preserve">
<value>使 WSL 能够使用 Windows 的 HTTP 代理信息。</value>
<value>允许 WSL 使用 Windows 的 HTTP 代理信息。</value>
</data>
<data name="Settings_AutoProxyToggleSwitch.AutomationProperties.Name" xml:space="preserve">
<value>已启用自动代理。</value>
</data>
<data name="Settings_AutoProxyToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>使 WSL 能够使用 Windows 的 HTTP 代理信息。</value>
<value>允许 WSL 使用 Windows 的 HTTP 代理信息。</value>
</data>
<data name="Settings_BestEffortDNS.Header" xml:space="preserve">
<value>尽力进行 DNS 析</value>
<value>尽力进行 DNS 析</value>
</data>
<data name="Settings_BestEffortDNS.Description" xml:space="preserve">
<value>仅当 wsl2.dnsTunneling 设置为 true 时适用。设置为 true 时Windows 将从 DNS 请求中提取问题并尝试解决该问题,忽略未知记录。</value>
@ -1186,7 +1191,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>尽力进行 DNS 分析。</value>
</data>
<data name="Settings_BestEffortDNSToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>仅当 wsl2.dnsTunneling 设置为 true 时适用。设置为 true 时Windows 将从 DNS 请求中提取问题并尝试解决该问题,忽略未知记录。</value>
<value>仅当 wsl2.dnsTunneling 设置为 true 时适用。设置为 true 时Windows 将从 DNS 请求中提取问题并尝试解决该问题,忽略未知记录。</value>
</data>
<data name="Settings_CustomKernelPath.Header" xml:space="preserve">
<value>自定义内核</value>
@ -1225,7 +1230,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>浏览发行版</value>
</data>
<data name="Settings_CustomSystemDistroPathDescription.Text" xml:space="preserve">
<value>指定 VHD 的路径,该路径将作为自定义系统发行版加载,主要用于为 WSL 中的 GUI 应用提供电源。[在此处详细了解系统发行]。</value>
<value>指定一个 VHD 路径,该 VHD 将作为自定义系统发行版加载,主要用于在 WSL 中运行 GUI 应用。[在此处详细了解系统发行]。</value>
<comment>{Locked="["}{Locked="]"}The text in between the delimiters [ ] is made into a hyperlink in code, and the delimiters are removed</comment>
</data>
<data name="Settings_CustomSystemDistroPathDescription.NavigateUri" xml:space="preserve">
@ -1236,7 +1241,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>自定义系统发行版</value>
</data>
<data name="Settings_CustomSystemDistroPathTextBox.AutomationProperties.HelpText" xml:space="preserve">
<value>指定 VHD 的路径,该路径将作为自定义系统发行版加载,主要用于为 WSL 中的 GUI 应用提供电源。</value>
<value>指定一个 VHD 路径,该 VHD 将作为自定义系统发行版加载,主要用于在 WSL 中运行 GUI 应用。</value>
</data>
<data name="Settings_DebugConsole.Header" xml:space="preserve">
<value>启用调试控制台</value>
@ -1254,7 +1259,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>默认 VHD 大小</value>
</data>
<data name="Settings_DefaultVHDSize.Description" xml:space="preserve">
<value>对于新创建的分发,可扩展 WSL 虚拟硬盘 (VHD) 的默认最大大小。</value>
<value>为可扩展的 WSL 虚拟硬盘指定的默认最大大小 (VHD),仅用于新创建的分发。</value>
</data>
<data name="Settings_DefaultVHDSizeResetButton.Content" xml:space="preserve">
<value>重设大小</value>
@ -1263,7 +1268,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>默认 VHD 大小</value>
</data>
<data name="Settings_DefaultVHDSizeTextBox.AutomationProperties.HelpText" xml:space="preserve">
<value>为可扩展的 WSL 虚拟硬盘指定的默认最大大小 (VHD) 仅用于新创建的分发。</value>
<value>为可扩展的 WSL 虚拟硬盘指定的默认最大大小 (VHD)仅用于新创建的分发。</value>
</data>
<data name="Settings_DeveloperPageTitle.Text" xml:space="preserve">
<value>开发人员</value>
@ -1279,20 +1284,20 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>更改 DrvFS 模式</value>
</data>
<data name="Settings_DrvFSMode.Description" xml:space="preserve">
<value>更改 WSL 中的跨 OS 文件访问实施。</value>
<value>更改 WSL 中的跨系统文件访问实现。</value>
</data>
<data name="Settings_DNSProxy.Header" xml:space="preserve">
<value>已启用 DNS 代理</value>
</data>
<data name="Settings_DNSProxy.Description" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为 NAT 时适用。布尔值通知 WSL 将 Linux 中的 DNS 服务器配置为主机上的 NAT。设置为 false 将镜像从 Windows 到 Linux 的 DNS 服务器。</value>
<value>仅当 wsl2.networkingMode 设置为 NAT 时适用。用于通知 WSL 将 Linux 中的 DNS 服务器配置为主机上的 NAT 的布尔值。设置为 false 将把 Windows 中 DNS 服务器镜像到 Linux。</value>
<comment>{Locked="wsl2.networkingMode"}.wslconfig property key names should not be translated</comment>
</data>
<data name="Settings_DNSProxyToggleSwitch.AutomationProperties.Name" xml:space="preserve">
<value>已启用 DNS 代理。</value>
</data>
<data name="Settings_DNSProxyToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为 NAT 时适用。布尔值通知 WSL 将 Linux 中的 DNS 服务器配置为主机上的 NAT。设置为 false 将镜像从 Windows 到 Linux 的 DNS 服务器。</value>
<value>仅当 wsl2.networkingMode 设置为 NAT 时适用。用于通知 WSL 将 Linux 中的 DNS 服务器配置为主机上的 NAT 的布尔值。设置为 false 将把 Windows 中 DNS 服务器镜像到 Linux。</value>
</data>
<data name="Settings_DNSTunneling.Header" xml:space="preserve">
<value>已启用 DNS 隧道</value>
@ -1353,20 +1358,20 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>主机地址环回</value>
</data>
<data name="Settings_HostAddressLoopback.Description" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为镜像时适用。设置为 True 时,将允许容器通过分配给主机的 IP 地址连接到主机或主机连接到容器。请注意,始终可以使用 127.0.0.1 环回地址 - 此选项还允许使用所有额外分配的本地 IP 地址。</value>
<value>仅当 wsl2.networkingMode 设置为镜像(mirrored)时适用。设置为 True 时,将允许容器与主机通过分配给主机的 IP 地址互相连接。请注意,始终可以使用 127.0.0.1 环回地址 - 此选项还允许使用所有额外分配的本地 IP 地址。</value>
<comment>{Locked="wsl2.networkingMode"}.wslconfig property key names should not be translated</comment>
</data>
<data name="Settings_HostAddressLoopbackToggleSwitch.AutomationProperties.Name" xml:space="preserve">
<value>主机地址环回。</value>
</data>
<data name="Settings_HostAddressLoopbackToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为镜像时适用。设置为 True 时,将允许容器通过分配给主机的 IP 地址连接到主机或主机连接到容器。请注意,始终可以使用 127.0.0.1 环回地址 - 此选项还允许使用所有额外分配的本地 IP 地址。</value>
<value>仅当 wsl2.networkingMode 设置为镜像(mirrored)时适用。设置为 True 时,将允许容器与主机通过分配给主机的 IP 地址互相连接。请注意,始终可以使用 127.0.0.1 环回地址 - 此选项还允许使用所有额外分配的本地 IP 地址。</value>
</data>
<data name="Settings_IgnoredPorts.Header" xml:space="preserve">
<value>忽略的端口</value>
</data>
<data name="Settings_IgnoredPorts.Description" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为镜像时适用。指定 Linux 应用程序可以绑定到的端口,不会在 Windows 中自动转发或考虑这些端口。应以逗号分隔的列表格式化,例如: 3000,9000,9090。</value>
<value>仅当 wsl2.networkingMode 设置为镜像(mirrored)时适用。指定 Linux 应用程序可以绑定的端口,这些端口不会 Windows 自动转发或考虑。应采用逗号分隔的列表格式,例如:3000,9000,9090。</value>
<comment>{Locked="wsl2.networkingMode"}.wslconfig property key names should not be translated</comment>
</data>
<data name="Settings_IgnoredPortsResetButton.Content" xml:space="preserve">
@ -1376,13 +1381,13 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>忽略的端口</value>
</data>
<data name="Settings_IgnoredPortsTextBox.AutomationProperties.HelpText" xml:space="preserve">
<value>仅当 wsl2.networkingMode 设置为镜像时适用。指定 Linux 应用程序可以绑定到的端口,不会在 Windows 中自动转发或考虑这些端口。应以逗号分隔的列表格式化,例如 3000、9000、9090。</value>
<value>仅当 wsl2.networkingMode 设置为镜像(mirrored)时适用。指定 Linux 应用程序可以绑定的端口,这些端口不会在 Windows 中自动转发或考虑。应采用逗号分隔的列表格式,例如 3000,9000,9090。</value>
</data>
<data name="Settings_InitialAutoProxyTimeout.Header" xml:space="preserve">
<value>初始自动代理超时</value>
</data>
<data name="Settings_InitialAutoProxyTimeout.Description" xml:space="preserve">
<value>仅当 wsl2.autoProxy 设置为 true 时适用。配置启动 WSL 容器时 WSL 等待检索 HTTP 代理信息) (毫秒。如果在此时间后解析代理设置,则必须重新启动 WSL 实例才能使用检索到的代理设置。</value>
<value>仅当 wsl2.autoProxy 设置为 true 时适用。配置启动 WSL 容器时 WSL 等待检索 HTTP 代理信息的时间(以毫秒计)。如果在此时间后解析到代理设置,则必须重新启动 WSL 实例才能使用检索到的代理设置。</value>
<comment>{Locked="wsl2.autoProxy"}.wslconfig property key names should not be translated</comment>
</data>
<data name="Settings_InitialAutoProxyTimeoutResetButton.Content" xml:space="preserve">
@ -1392,25 +1397,25 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>初始自动代理超时</value>
</data>
<data name="Settings_InitialAutoProxyTimeoutTextBox.AutomationProperties.HelpText" xml:space="preserve">
<value>仅当 wsl2.autoProxy 设置为 true 时才适用。配置启动 WSL 容器时 WSL 等待检索 HTTP 代理信息的时间,以毫秒为单位。如果在此时间后解析代理设置,则必须重新启动 WSL 实例才能使用检索到的代理设置。</value>
<value>仅当 wsl2.autoProxy 设置为 true 时才适用。配置启动 WSL 容器时 WSL 等待检索 HTTP 代理信息的时间,以毫秒为单位。如果在此时间后解析代理设置,则必须重新启动 WSL 实例才能使用检索到的代理设置。</value>
</data>
<data name="Settings_KernelCommandLine.Header" xml:space="preserve">
<value>内核命令行</value>
</data>
<data name="Settings_KernelCommandLine.Description" xml:space="preserve">
<value>其他内核命令行参数。</value>
<value>额外的内核命令行参数。</value>
</data>
<data name="Settings_LocalhostForwarding.Header" xml:space="preserve">
<value>启用 localhost 转发</value>
</data>
<data name="Settings_LocalhostForwarding.Description" xml:space="preserve">
<value>布尔值,指定是否应通过 localhostport 从主机连接到 WSL 2 VM 中通配符或 localhost 的端口。</value>
<value>布尔值,用于指定 WSL 2 VM 中绑定通配符或本地主机的端口是否应允许主机通过`localhost:端口号`进行连接。</value>
</data>
<data name="Settings_LocalhostForwardingToggleSwitch.AutomationProperties.Name" xml:space="preserve">
<value>启用 localhost 转发。</value>
</data>
<data name="Settings_LocalhostForwardingToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>一个布尔值,指定绑定到 WSL 2 VM 中的通配符或 localhost 的端口是否应可通过 localhost、colon、port 从主机连接。</value>
<value>布尔值,用于指定 WSL 2 VM 中绑定通配符或本地主机的端口是否应允许主机通过`localhost:端口号`进行连接。</value>
</data>
<data name="Settings_MegabyteStringFormat" xml:space="preserve">
<value>{0} MB</value>
@ -1440,13 +1445,13 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>启用嵌套虚拟化</value>
</data>
<data name="Settings_NestedVirtualization.Description" xml:space="preserve">
<value>用于打开或关闭嵌套虚拟化的布尔值,使其他嵌套 VM 能够在 WSL 2 内运行。</value>
<value>用于打开或关闭嵌套虚拟化的布尔值,使其他嵌套虚拟机能够在 WSL 2 内运行。</value>
</data>
<data name="Settings_NestedVirtualizationToggleSwitch.AutomationProperties.Name" xml:space="preserve">
<value>启用嵌套虚拟化。</value>
</data>
<data name="Settings_NestedVirtualizationToggleSwitch.AutomationProperties.HelpText" xml:space="preserve">
<value>用于打开或关闭嵌套虚拟化的布尔值,使其他嵌套 VM 能够在 WSL 2 内运行。</value>
<value>用于打开或关闭嵌套虚拟化的布尔值,使其他嵌套虚拟机能够在 WSL 2 内运行。</value>
</data>
<data name="Settings_NetworkingMode.Header" xml:space="preserve">
<value>网络模式</value>
@ -1467,7 +1472,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>你可以跨操作系统处理所有文件!</value>
</data>
<data name="Settings_OOBECrossOSFileAccess.Title" xml:space="preserve">
<value>跨 OS 文件访问</value>
<value>跨系统文件访问</value>
</data>
<data name="Settings_OOBECrossOSFileAccess_WindowsFromLinuxTitle.Text" xml:space="preserve">
<value>从 Linux 访问 Windows 文件</value>
@ -1510,7 +1515,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>WSL 还包括一种称为镜像模式的新网络模式,该模式添加了 IPv6 支持等高级功能,并且能够访问局域网中的网络应用程序。</value>
</data>
<data name="Settings_OOBECrossOSFileAccessLink.Content" xml:space="preserve">
<value>了解有关跨 OS 文件访问的详细信息</value>
<value>了解有关跨系统文件访问的详细信息</value>
</data>
<data name="Settings_OOBECrossOSFileAccessLink.NavigateUri" xml:space="preserve">
<value>https://aka.ms/wslfilesystems</value>
@ -1547,7 +1552,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<comment>{Locked="-l -o"}Command line arguments and file names should not be translated</comment>
</data>
<data name="Settings_OOBEDistroManagement_InstallNamedDistrosTitle.Text" xml:space="preserve">
<value>安装命名的 WSL 发行版命令</value>
<value>安装指定名称的 WSL 发行版命令</value>
</data>
<data name="Settings_OOBEDistroManagement_InstallNamedDistrosSample.Text" xml:space="preserve">
<value>'wsl.exe --install &lt;DistroName&gt;'</value>
@ -1563,11 +1568,11 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<data name="Settings_OOBEDockerDesktopIntegration.Description" xml:space="preserve">
<value>Docker Desktop 非常适合与 WSL 配合使用,可帮助你使用 Linux 容器进行开发。
将 Docker Desktop 与 WSL 配合使用的一些优点:
一些将 Docker Desktop 与 WSL 配合使用的优点:
• 可以使用相同的 Docker 守护程序和映像在 WSL 或 Windows 中运行 Docker 命令。
• 可以使用 WSL 中的 Windows 驱动器自动装载功能在 Windows 和 Linux 之间无缝共享文件和文件夹。
• 由于 WSL 的互操作性,你可以使用首选的 Windows 工具和编辑器处理 Linux 代码和文件,反之亦然。</value>
• 由于 WSL 的互操作性,你可以使用偏好的 Windows 工具和编辑器处理 Linux 代码和文件,反之亦然。</value>
</data>
<data name="Settings_OOBEDockerDesktopIntegration.Title" xml:space="preserve">
<value>Docker Desktop 集成</value>
@ -1749,7 +1754,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>关于</value>
</data>
<data name="Settings_Shell_Developer.Content" xml:space="preserve">
<value>开发</value>
<value>开发人员</value>
</data>
<data name="Settings_Shell_DistroManagement.Content" xml:space="preserve">
<value>发行版管理</value>
@ -1797,7 +1802,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>新增功能</value>
</data>
<data name="Settings_Shell_WorkingAcrossFileSystems.Content" xml:space="preserve">
<value>跨文件系统工作</value>
<value>跨系统文件访问</value>
</data>
<data name="Settings_IssuesLink.Content" xml:space="preserve">
<value>问题</value>
@ -1852,7 +1857,7 @@ wsl.exe --manage &lt;DistributionName&gt; --set-sparse --allow-unsafe</value>
<value>启用 VirtIO</value>
</data>
<data name="Settings_Virtio.Description" xml:space="preserve">
<value>使用 virtiofs 而不是计划 9 来访问主机文件,加快速度。</value>
<value>使用 virtiofs 而不是 plan 9 来访问主机文件,加快速度。</value>
</data>
<data name="Settings_Virtio9p.Header" xml:space="preserve">
<value>启用 Virtio 9p</value>

File diff suppressed because it is too large Load Diff

View File

@ -242,7 +242,6 @@
<File Id="RdpWinStlHelper.dll" Source="${MSRDC_SOURCE_DIR}/${TARGET_PLATFORM}/RdpWinStlHelper.dll" />
<?endif?>
<File Id="wsldevicehost.dll" Source="${BIN}/wsldevicehost.dll" />
<File Id="lxutil.dll" Source="${BIN}/lxutil.dll" />
<File Id="${WSLG_TS_PLUGIN_DLL}" Source="${BIN}/${WSLG_TS_PLUGIN_DLL}" />
<!-- MSRDC Plugin registration -->
@ -397,6 +396,14 @@
Execute="deferred"
/>
<CustomAction Id="FinalizeInstall"
Impersonate="no"
BinaryRef="wslinstall.dll"
DllEntry="WslFinalizeInstallation"
Return="check"
Execute="deferred"
/>
<CustomAction Id="DeprovisionMsix"
Impersonate="no"
BinaryRef="wslinstall.dll"
@ -533,6 +540,8 @@
<Custom Action="CalculateWslSettingsProtocolIds" Before="WriteRegistryValues" Condition='(not REMOVE~="ALL")' />
<?endif?>
<Custom Action="FinalizeInstall" After="PublishFeatures"/>
</InstallExecuteSequence>
<!-- Don't show a 'Modify' button in settings since there is nothing to modify -->

View File

@ -6,28 +6,26 @@
<package id="Microsoft.Direct3D.Linux" version="1.611.1-81528511" targetFramework="native" />
<package id="Microsoft.DXCore.Linux.amd64fre" version="10.0.26100.1-240331-1435.ge-release" targetFramework="native" />
<package id="Microsoft.DXCore.Linux.arm64fre" version="10.0.26100.1-240331-1435.ge-release" targetFramework="native" />
<package id="Microsoft.Extensions.Hosting" version="9.0.4" />
<package id="Microsoft.Extensions.Hosting" version="10.0.0" />
<package id="Microsoft.Identity.MSAL.WSL.Proxy" version="0.1.1" />
<package id="Microsoft.NETCore.App.Runtime.win-arm64" version="9.0.6" />
<package id="Microsoft.NETCore.App.Runtime.win-x64" version="9.0.6" />
<package id="Microsoft.RemoteDesktop.Client.MSRDC.SessionHost" version="1.2.6353" />
<package id="Microsoft.Taef" version="10.97.250317001" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.250325.1" targetFramework="native" />
<package id="Microsoft.Windows.SDK.NET.Ref" version="10.0.26100.57" />
<package id="Microsoft.WindowsAppSDK" version="1.7.250401001" />
<package id="Microsoft.NETCore.App.Runtime.win-arm64" version="10.0.0" />
<package id="Microsoft.NETCore.App.Runtime.win-x64" version="10.0.0" />
<package id="Microsoft.RemoteDesktop.Client.MSRDC.SessionHost" version="1.2.6676" />
<package id="Microsoft.Taef" version="10.100.251104001" targetFramework="native" />
<package id="Microsoft.Windows.ImplementationLibrary" version="1.0.251108.1" targetFramework="native" />
<package id="Microsoft.Windows.SDK.NET.Ref" version="10.0.26100.81" />
<package id="Microsoft.WindowsAppSDK" version="1.8.251106002" />
<package id="Microsoft.WSL.bsdtar" version="0.0.2-2" />
<package id="Microsoft.WSL.Dependencies.amd64fre" version="10.0.27820.1000-250318-1700.rs-base2-hyp" targetFramework="native" />
<package id="Microsoft.WSL.Dependencies.arm64fre" version="10.0.27820.1000-250318-1700.rs-base2-hyp" targetFramework="native" />
<package id="Microsoft.WSL.DeviceHost" version="1.0.0-20241009.4" />
<package id="Microsoft.WSL.Kernel" version="6.6.87.2-1" targetFramework="native" />
<package id="Microsoft.WSL.DeviceHost" version="1.0.0-20251202.1" />
<package id="Microsoft.WSL.Kernel" version="6.6.114.1-1" targetFramework="native" />
<package id="Microsoft.WSL.LinuxSdk" version="1.20.0" targetFramework="native" />
<package id="Microsoft.WSL.LxUtil.amd64fre" version="10.0.26100.1-240331-1435.ge-release" />
<package id="Microsoft.WSL.LxUtil.arm64fre" version="10.0.26100.1-240331-1435.ge-release" />
<package id="Microsoft.WSL.TestDistro" version="2.5.7-47" />
<package id="Microsoft.WSLg" version="1.0.66" />
<package id="Microsoft.WSLg" version="1.0.71" />
<package id="Microsoft.Xaml.Behaviors.WinUI.Managed" version="3.0.0" />
<package id="StrawberryPerl" version="5.28.0.1" />
<package id="StrawberryPerl" version="5.32.1.1" />
<package id="vswhere" version="3.1.7" />
<package id="WinUIEx" version="2.5.1" />
<package id="WinUIEx" version="2.9.0" />
<package id="Wix" version="5.0.2" />
</packages>

View File

@ -77,7 +77,9 @@ void SecCompDispatcher::Run()
for (;;)
{
if (!wait_for_fd(m_notifyFd.get(), POLLIN))
{
break;
}
// Clear the buffers to make the 5.15 kernel happy.
notification_buffer.clear();

View File

@ -28,6 +28,7 @@ WslDistributionConfig::WslDistributionConfig(const char* configFilePath)
ConfigKey("automount.options", DrvFsOptions),
ConfigKey(c_ConfigMountFsTabOption, MountFsTab),
ConfigKey(c_ConfigLinkOsLibsOption, LinkOsLibs),
ConfigKey("automount.cgroups", {{"v1", CGroupVersion::v1}, {"v2", CGroupVersion::v2}}, CGroup, nullptr),
ConfigKey("filesystem.umask", Umask),

View File

@ -48,6 +48,12 @@ struct WslDistributionConfig
WslDistributionConfig(WslDistributionConfig&&) = default;
WslDistributionConfig& operator=(WslDistributionConfig&&) = default;
enum class CGroupVersion
{
v1 = 0,
v2 = 1
};
bool AutoMount = true;
bool AutoUpdateTimezone = true;
std::optional<std::string> BootCommand;
@ -71,14 +77,15 @@ struct WslDistributionConfig
bool AppendGpuLibPath = true;
bool GpuEnabled = true;
bool LinkOsLibs = true;
CGroupVersion CGroup = CGroupVersion::v2;
//
// Values not set by /etc/wsl.conf.
//
bool GuiAppsEnabled = false;
std::optional<int> FeatureFlags = 0;
std::optional<LX_MINI_INIT_NETWORKING_MODE> NetworkingMode = LxMiniInitNetworkingModeNone;
std::optional<int> FeatureFlags;
std::optional<LX_MINI_INIT_NETWORKING_MODE> NetworkingMode;
std::optional<std::string> VmId;
//

View File

@ -19,15 +19,6 @@ Abstract:
//
#define LX_INIT_BINFMT_NAME "WSLInterop"
//
// Name of the WSL 'late' binfmt_misc interpreter.
// This name is used by the wsl-binfmt systemd unit which
// registers the interpreter a second time after systemd-binfmt to make sure
// that wsl's interpreter is always registered last.
//
#define LX_INIT_BINFMT_NAME_LATE "WSLInterop-late"
#define BINFMT_MISC_MOUNT_TARGET "/proc/sys/fs/binfmt_misc"
#define BINFMT_MISC_REGISTER_FILE BINFMT_MISC_MOUNT_TARGET "/register"
#define BINFMT_INTEROP_REGISTRATION_STRING(Name) ":" Name ":M::MZ::" LX_INIT_PATH ":P"

View File

@ -54,9 +54,6 @@ Abstract:
#include <cstdarg>
#include "lxinitshared.h"
#include "defs.h"
#include "retryshared.h"
#include "socketshared.h"
#include "stringshared.h"
#define ETC_FOLDER "/etc/"
#define NAME_ENV "NAME"
@ -151,6 +148,11 @@ auto LogImpl(int fd, const std::format_string<Args...>& format, Args&&... args)
#define FATAL_ERROR(str, ...) FATAL_ERROR_EX(1, str, ##__VA_ARGS__)
// Some of these files need the LOG_* macros.
#include "retryshared.h"
#include "socketshared.h"
#include "stringshared.h"
int InitializeLogging(bool SetStderr, wil::LogFunction* ExceptionCallback = nullptr) noexcept;
void LogException(const char* Message, const char* Description) noexcept;

View File

@ -73,6 +73,8 @@ Abstract:
#define MOUNTS_DEVICE_FIELD 0
#define MOUNTS_FSTYPE_FIELD 2
using wsl::linux::WslDistributionConfig;
static void ConfigApplyWindowsLibPath(const wsl::linux::WslDistributionConfig& Config);
static bool CreateLoginSession(const wsl::linux::WslDistributionConfig& Config, const char* Username, uid_t Uid);
@ -567,7 +569,7 @@ Return Value:
// Initialize cgroups based on what the kernel supports.
//
ConfigInitializeCgroups();
ConfigInitializeCgroups(Config);
//
// Attempt to register the NT interop binfmt extension.
@ -953,6 +955,7 @@ try
//
if (Config.InitPid.has_value())
{
try
{
std::string LinkPath = std::format(WSL_INTEROP_SOCKET_FORMAT, WSL_TEMP_FOLDER, 1, WSL_INTEROP_SOCKET);
@ -961,7 +964,8 @@ try
LOG_ERROR("symlink({}, {}) failed {}", InteropServer.Path(), LinkPath.c_str(), errno);
}
}
CATCH_LOG()
CATCH_LOG()
}
UtilCreateWorkerThread(
"Interop", [InteropChannel = std::move(InteropChannel), InteropServer = std::move(InteropServer), Elevated, &Config]() mutable {
@ -1783,7 +1787,7 @@ Return Value:
{LX_WSL2_GUI_APP_SUPPORT_ENV, "1"}};
}
void ConfigInitializeCgroups(void)
void ConfigInitializeCgroups(wsl::linux::WslDistributionConfig& Config)
/*++
@ -1795,7 +1799,7 @@ Routine Description:
Arguments:
None.
Config - Supplies the distribution configuration.
Return Value:
@ -1805,50 +1809,82 @@ Return Value:
try
{
//
// For WSL2 mount cgroup v2.
//
// N.B. Cgroup v2 is not implemented for WSL1.
//
std::vector<std::string> DisabledControllers;
if (UtilIsUtilityVm())
{
const auto Target = CGROUP_MOUNTPOINT;
if (Config.CGroup == WslDistributionConfig::CGroupVersion::v1)
{
auto commandLine = UtilReadFileContent("/proc/cmdline");
auto position = commandLine.find(CGROUPS_NO_V1);
if (position != std::string::npos)
{
auto list = commandLine.substr(position + sizeof(CGROUPS_NO_V1) - 1);
auto end = list.find_first_of(" \n");
if (end != std::string::npos)
{
list = list.substr(0, end);
}
if (list == "all")
{
LOG_WARNING("Distribution has cgroupv1 enabled, but kernel command line has {}all. Falling back to cgroupv2", CGROUPS_NO_V1);
Config.CGroup = WslDistributionConfig::CGroupVersion::v2;
}
else
{
DisabledControllers = wsl::shared::string::Split(list, ',');
}
}
}
if (Config.CGroup == WslDistributionConfig::CGroupVersion::v1)
{
THROW_LAST_ERROR_IF(mount("tmpfs", CGROUP_MOUNTPOINT, "tmpfs", (MS_NOSUID | MS_NODEV | MS_NOEXEC), "mode=755") < 0);
}
const auto Target = Config.CGroup == WslDistributionConfig::CGroupVersion::v1 ? CGROUP_MOUNTPOINT "/unified" : CGROUP_MOUNTPOINT;
THROW_LAST_ERROR_IF(
UtilMount(CGROUP2_DEVICE, Target, CGROUP2_DEVICE, (MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_RELATIME), "nsdelegate") < 0);
if (Config.CGroup == WslDistributionConfig::CGroupVersion::v2)
{
return;
}
}
else
{
//
// Mount cgroup v1 when running in WSL1 mode.
//
// Open the /proc/cgroups file and parse each line, ignoring malformed
// lines and disabled controllers.
//
THROW_LAST_ERROR_IF(mount("tmpfs", CGROUP_MOUNTPOINT, "tmpfs", (MS_NOSUID | MS_NODEV | MS_NOEXEC), "mode=755") < 0);
}
wil::unique_file Cgroups{fopen(CGROUPS_FILE, "r")};
THROW_LAST_ERROR_IF(!Cgroups);
//
// Mount cgroup v1 when running in WSL1 mode or when a WSL2 distro has automount.cgroups=v1 specified.
//
// Open the /proc/cgroups file and parse each line, ignoring malformed
// lines and disabled controllers.
//
wil::unique_file Cgroups{fopen(CGROUPS_FILE, "r")};
THROW_LAST_ERROR_IF(!Cgroups);
ssize_t BytesRead;
char* Line = nullptr;
auto LineCleanup = wil::scope_exit([&]() { free(Line); });
size_t LineLength = 0;
while ((BytesRead = getline(&Line, &LineLength, Cgroups.get())) != -1)
{
char* Subsystem = nullptr;
bool Enabled = false;
if ((UtilParseCgroupsLine(Line, &Subsystem, &Enabled) < 0) || (Enabled == false) ||
std::find(DisabledControllers.begin(), DisabledControllers.end(), Subsystem) != DisabledControllers.end())
ssize_t BytesRead;
char* Line = nullptr;
auto LineCleanup = wil::scope_exit([&]() { free(Line); });
size_t LineLength = 0;
while ((BytesRead = getline(&Line, &LineLength, Cgroups.get())) != -1)
{
char* Subsystem = nullptr;
bool Enabled = false;
if ((UtilParseCgroupsLine(Line, &Subsystem, &Enabled) < 0) || (Enabled == false))
{
continue;
}
auto Target = std::format("{}/{}", CGROUP_MOUNTPOINT, Subsystem);
THROW_LAST_ERROR_IF(
UtilMount(CGROUP_DEVICE, Target.c_str(), CGROUP_DEVICE, (MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_RELATIME), Subsystem) < 0);
continue;
}
auto Target = std::format("{}/{}", CGROUP_MOUNTPOINT, Subsystem);
THROW_LAST_ERROR_IF(
UtilMount(CGROUP_DEVICE, Target.c_str(), CGROUP_DEVICE, (MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_RELATIME), Subsystem) < 0);
}
}
CATCH_LOG()

View File

@ -406,7 +406,7 @@ void ConfigHandleInteropMessage(
const MESSAGE_HEADER* Header,
const wsl::linux::WslDistributionConfig& Config);
void ConfigInitializeCgroups(void);
void ConfigInitializeCgroups(wsl::linux::WslDistributionConfig& Config);
int ConfigInitializeInstance(wsl::shared::SocketChannel& Channel, gsl::span<gsl::byte> Buffer, wsl::linux::WslDistributionConfig& Config);

View File

@ -129,6 +129,8 @@ void InitEntryUtilityVm(wsl::linux::WslDistributionConfig& Config);
void InitTerminateInstance(gsl::span<gsl::byte> Buffer, wsl::shared::SocketChannel& Channel, wsl::linux::WslDistributionConfig& Config);
void InitTerminateInstanceInternal(const wsl::linux::WslDistributionConfig& Config);
void InstallSystemdUnit(const char* Path, const std::string& Name, const char* Content);
int GenerateSystemdUnits(int Argc, char** Argv);
@ -219,6 +221,7 @@ int WslEntryPoint(int Argc, char* Argv[])
{
// Handle the special case for import result messages, everything else is sent to the binfmt interpreter.
if (Pid == 1 && strcmp(BaseName, "init") == 0 && Argc == 3 && strcmp(Argv[1], LX_INIT_IMPORT_MESSAGE_ARG) == 0)
{
try
{
wsl::shared::MessageWriter<LX_MINI_INIT_IMPORT_RESULT> message;
@ -228,7 +231,8 @@ int WslEntryPoint(int Argc, char* Argv[])
read(STDIN_FILENO, buffer, sizeof(buffer));
exit(0);
}
CATCH_RETURN_ERRNO()
CATCH_RETURN_ERRNO()
}
ExitCode = CreateNtProcess(Argc - 1, &Argv[1]);
}
@ -325,6 +329,10 @@ int GenerateSystemdUnits(int Argc, char** Argv)
File.reset();
}
// Mask systemd-networkd-wait-online.service since WSL always ensures that networking is configured during boot.
// That unit can cause systemd boot timeouts since WSL's network interface is unmanaged by systemd.
THROW_LAST_ERROR_IF(symlink("/dev/null", std::format("{}/systemd-networkd-wait-online.service", installPath).c_str()) < 0);
// Only create the wslg unit if both enabled in wsl.conf, and if the wslg folder actually exists.
if (enableGuiApps && access("/mnt/wslg/runtime-dir", F_OK) == 0)
{
@ -365,8 +373,8 @@ ExecStart=/bin/mount -o bind,ro,X-mount.mkdir -t none /mnt/wslg/.X11-unix /tmp/.
ExecStop=
ExecStart=/bin/sh -c '(echo -1 > {}/{}) ; (echo "{}" > {})' )",
BINFMT_MISC_MOUNT_TARGET,
LX_INIT_BINFMT_NAME_LATE,
BINFMT_INTEROP_REGISTRATION_STRING(LX_INIT_BINFMT_NAME_LATE),
LX_INIT_BINFMT_NAME,
BINFMT_INTEROP_REGISTRATION_STRING(LX_INIT_BINFMT_NAME),
BINFMT_MISC_REGISTER_FILE);
// Install the override for systemd-binfmt.service.
@ -2251,10 +2259,12 @@ Return Value:
{
Config.VmId = Value;
//
// Unset the environment variable for user distros.
// TODO: this can be removed when WSLg is updated to use `wslinfo --vm-id` instead of the environment variable.
Value = getenv(LX_WSL2_SYSTEM_DISTRO);
if (!Value || strcmp(Value, "1") != 0)
//
Value = getenv(LX_WSL2_SHARED_MEMORY_OB_DIRECTORY);
if (!Value)
{
unsetenv(LX_WSL2_VM_ID_ENV);
}
@ -2514,18 +2524,7 @@ Return Value:
}
}
//
// If the distro init process was booted, use the shutdown command to terminate the instance.
//
if (Config.BootInit && !Config.BootStartWriteSocket)
{
UtilExecCommandLine("systemctl reboot", nullptr);
}
reboot(RB_POWER_OFF);
FATAL_ERROR("reboot(RB_POWER_OFF) failed {}", errno);
InitTerminateInstanceInternal(Config);
return;
}
@ -2668,10 +2667,56 @@ try
}
//
// Respond to the instance termination request.
// Attempt to stop the plan9 server, if it is not able to be stopped because of an
// in-use file, reply to the service that the instance could not be terminated.
//
Channel.SendResultMessage<bool>(StopPlan9Server(Message->Force, Config));
if (!StopPlan9Server(Message->Force, Config))
{
Channel.SendResultMessage<bool>(false);
return;
}
InitTerminateInstanceInternal(Config);
}
CATCH_LOG();
void InitTerminateInstanceInternal(const wsl::linux::WslDistributionConfig& Config)
/*++
Routine Description:
This routine attempts to cleanly terminate the instance.
Arguments:
Config - Supplies the distribution config.
Return Value:
None.
--*/
try
{
//
// If systemd is enabled, attempt to poweroff the instance via systemctl.
//
if (Config.BootInit && !Config.BootStartWriteSocket)
{
THROW_LAST_ERROR_IF(UtilSetSignalHandlers(g_SavedSignalActions, false) < 0);
if (UtilExecCommandLine("systemctl poweroff", nullptr) == 0)
{
std::this_thread::sleep_for(std::chrono::milliseconds(Config.BootInitTimeout));
LOG_ERROR("systemctl poweroff did not terminate the instance in {} ms, calling reboot(RB_POWER_OFF)", Config.BootInitTimeout);
}
}
reboot(RB_POWER_OFF);
FATAL_ERROR("reboot(RB_POWER_OFF) failed {}", errno);
}
CATCH_LOG();

View File

@ -857,10 +857,10 @@ Return Value:
if (WI_IsFlagSet(Flags, LxMiniInitMessageFlagVerbose))
{
compressionArguments += "v";
compressionArguments += "vv";
}
const char* arguments[] = {
std::vector<const char*> arguments{
BSDTAR_PATH,
"-C",
Source,
@ -872,7 +872,13 @@ Return Value:
"-",
".",
nullptr};
execv(BSDTAR_PATH, const_cast<char**>(arguments));
if (WI_IsFlagSet(Flags, LxMiniInitMessageFlagVerbose))
{
arguments.emplace(arguments.begin() + 3, "--totals");
}
execv(BSDTAR_PATH, const_cast<char**>(arguments.data()));
LOG_ERROR("execl failed, {}", errno);
});
@ -1158,7 +1164,7 @@ Return Value:
"-C",
Destination,
"-x",
WI_IsFlagSet(Flags, LxMiniInitMessageFlagVerbose) ? "-vp" : "-p",
WI_IsFlagSet(Flags, LxMiniInitMessageFlagVerbose) ? "-vvp" : "-p",
"--xattrs",
"--numeric-owner",
"-f",
@ -1194,9 +1200,27 @@ Return Value:
--*/
{
UtilCreateChildProcess("agetty", []() {
execl("/usr/bin/setsid", "/usr/bin/setsid", "/sbin/agetty", "-w", "-L", LX_INIT_HVC_DEBUG_SHELL, "-a", "root", NULL);
LOG_ERROR("execl failed, {}", errno);
// Spawn a child process to handle relaunching the debug shell if it exits.
UtilCreateChildProcess("DebugShell", []() {
for (;;)
{
const auto Pid = UtilCreateChildProcess("agetty", []() {
execl("/usr/bin/setsid", "/usr/bin/setsid", "/sbin/agetty", "-w", "-L", LX_INIT_HVC_DEBUG_SHELL, "-a", "root", NULL);
LOG_ERROR("execl failed, {}", errno);
});
if (Pid < 0)
{
_exit(1);
}
int Status = -1;
if (TEMP_FAILURE_RETRY(waitpid(Pid, &Status, 0)) < 0)
{
LOG_ERROR("waitpid failed {}", errno);
_exit(1);
}
}
});
}
@ -1827,11 +1851,6 @@ try
AddEnvironmentVariable(LX_WSL2_USER_PROFILE, UserProfile);
AddEnvironmentVariable(LX_WSL2_NETWORKING_MODE_ENV, std::to_string(static_cast<int>(Config.NetworkingMode)).c_str());
if (UserProfile)
{
AddEnvironmentVariable(LX_WSL2_SYSTEM_DISTRO, "1");
}
if (DistroInitPid.has_value())
{
AddEnvironmentVariable(LX_WSL2_DISTRO_INIT_PID, std::to_string(static_cast<int>(DistroInitPid.value())).c_str());
@ -3862,6 +3881,63 @@ Return Value:
int WslEntryPoint(int Argc, char* Argv[]);
void EnableDebugMode(const std::string& Mode)
{
if (Mode == "hvsocket")
{
// Mount the debugfs.
THROW_LAST_ERROR_IF(UtilMount("none", "/sys/kernel/debug", "debugfs", 0, nullptr) < 0);
// Enable hvsocket events.
std::vector<const char*> files{
"/sys/kernel/debug/tracing/events/hyperv/vmbus_on_msg_dpc/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_on_message/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_onoffer/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_onoffer_rescind/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_onopen_result/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_ongpadl_created/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_ongpadl_torndown/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_open/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_close_internal/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_establish_gpadl_header/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_establish_gpadl_body/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_teardown_gpadl/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_release_relid/enable",
"/sys/kernel/debug/tracing/events/hyperv/vmbus_send_tl_connect_request/enable"};
for (auto* e : files)
{
WriteToFile(e, "1");
}
// Relay logs to the host.
std::thread relayThread{[]() {
constexpr auto path = "/sys/kernel/debug/tracing/trace_pipe";
std::ifstream file(path);
if (!file)
{
LOG_ERROR("Failed to open {}, {}", path, errno);
return;
}
std::string line;
while (std::getline(file, line))
{
LOG_INFO("{}", line);
}
LOG_ERROR("{}: closed", path);
}};
relayThread.detach();
}
else
{
LOG_ERROR("Unknown debugging mode: '{}'", Mode);
}
}
int main(int Argc, char* Argv[])
{
std::vector<gsl::byte> Buffer;
@ -3984,6 +4060,37 @@ int main(int Argc, char* Argv[])
}
}
//
// Create the etc directory and mount procfs and sysfs.
//
if (UtilMkdir(ETC_PATH, 0755) < 0)
{
return -1;
}
if (UtilMount(nullptr, PROCFS_PATH, "proc", 0, nullptr) < 0)
{
return -1;
}
if (UtilMount(nullptr, SYSFS_PATH, "sysfs", 0, nullptr) < 0)
{
return -1;
}
//
// Enable debug mode, if specified.
//
if (const auto* debugMode = getenv(WSL_DEBUG_ENV))
{
LOG_ERROR("Running in debug mode: '{}'", debugMode);
EnableDebugMode(debugMode);
unsetenv(WSL_DEBUG_ENV);
}
//
// Establish the message channel with the service via hvsocket.
//
@ -4011,25 +4118,6 @@ int main(int Argc, char* Argv[])
goto ErrorExit;
}
//
// Create the etc directory and mount procfs and sysfs.
//
if (UtilMkdir(ETC_PATH, 0755) < 0)
{
return -1;
}
if (UtilMount(nullptr, PROCFS_PATH, "proc", 0, nullptr) < 0)
{
return -1;
}
if (UtilMount(nullptr, SYSFS_PATH, "sysfs", 0, nullptr) < 0)
{
return -1;
}
if (getenv(WSL_ENABLE_CRASH_DUMP_ENV))
{
Config.EnableCrashDumpCollection = true;

View File

@ -537,7 +537,7 @@ Return Value:
return Socket;
}
wil::unique_fd UtilConnectVsock(unsigned int Port, bool CloseOnExec, std::optional<int> SocketBuffer) noexcept
wil::unique_fd UtilConnectVsock(unsigned int Port, bool CloseOnExec, std::optional<int> SocketBuffer, const std::source_location& Source) noexcept
/*++
@ -553,6 +553,8 @@ Arguments:
SocketBuffer - Optionally supplies the size to use for the socket send and receive buffers.
Source - Supplies the caller location.
Return Value:
A file descriptor representing the connected socket, -1 on failure.
@ -565,7 +567,7 @@ Return Value:
wil::unique_fd SocketFd{socket(AF_VSOCK, Type, 0)};
if (!SocketFd)
{
LOG_ERROR("socket failed {}", errno);
LOG_ERROR("socket failed {} (from: {})", errno, Source);
return {};
}
@ -577,7 +579,7 @@ Return Value:
Timeout.tv_sec = LX_INIT_HVSOCKET_TIMEOUT_SECONDS;
if (setsockopt(SocketFd.get(), AF_VSOCK, SO_VM_SOCKETS_CONNECT_TIMEOUT, &Timeout, sizeof(Timeout)) < 0)
{
LOG_ERROR("setsockopt SO_VM_SOCKETS_CONNECT_TIMEOUT failed {}", errno);
LOG_ERROR("setsockopt SO_VM_SOCKETS_CONNECT_TIMEOUT failed {}, (from: {})", errno, Source);
return {};
}
@ -586,13 +588,13 @@ Return Value:
int BufferSize = *SocketBuffer;
if (setsockopt(SocketFd.get(), SOL_SOCKET, SO_SNDBUF, &BufferSize, sizeof(BufferSize)) < 0)
{
LOG_ERROR("setsockopt(SO_SNDBUF, {}) failed {}", BufferSize, errno);
LOG_ERROR("setsockopt(SO_SNDBUF, {}) failed {}, (from: {})", BufferSize, errno, Source);
return {};
}
if (setsockopt(SocketFd.get(), SOL_SOCKET, SO_RCVBUF, &BufferSize, sizeof(BufferSize)) < 0)
{
LOG_ERROR("setsockopt(SO_RCVBUF, {}) failed {}", BufferSize, errno);
LOG_ERROR("setsockopt(SO_RCVBUF, {}) failed {}, (from: {})", BufferSize, errno, Source);
return {};
}
}
@ -603,7 +605,7 @@ Return Value:
SocketAddress.svm_port = Port;
if (connect(SocketFd.get(), (const struct sockaddr*)&SocketAddress, sizeof(SocketAddress)) < 0)
{
LOG_ERROR("connect port {} failed {}", Port, errno);
LOG_ERROR("connect port {} failed {} (from: {})", Port, errno, Source);
return {};
}

View File

@ -28,6 +28,7 @@ Abstract:
#include <future>
#include <filesystem>
#include <vector>
#include <source_location>
#include "lxinitshared.h"
#include "lxdef.h"
#include "common.h"
@ -128,7 +129,8 @@ wil::unique_fd UtilConnectToInteropServer(std::optional<pid_t> Pid = {});
wil::unique_fd UtilConnectUnix(const char* Path);
wil::unique_fd UtilConnectVsock(unsigned int Port, bool CloseOnExec, std::optional<int> SocketBuffer = {}) noexcept;
wil::unique_fd UtilConnectVsock(
unsigned int Port, bool CloseOnExec, std::optional<int> SocketBuffer = {}, const std::source_location& Source = std::source_location::current()) noexcept;
// Needs to be declared before UtilCreateChildProcess().
void UtilSetThreadName(const char* Name);

View File

@ -25,7 +25,9 @@ public:
{
std::unique_lock lck(m_mtx);
while (m_value.has_value())
{
m_cv.wait(lck);
}
m_value = value;
m_cv.notify_all();
}
@ -39,7 +41,9 @@ public:
{
std::unique_lock lck(m_mtx);
while (!m_value.has_value())
{
m_cv.wait(lck);
}
auto return_value = m_value.value();
m_value.reset();
m_cv.notify_all();
@ -57,8 +61,12 @@ public:
{
std::unique_lock lck(m_mtx);
while (!m_value.has_value())
{
if (m_cv.wait_for(lck, timeout) == std::cv_status::timeout)
{
return std::nullopt;
}
}
auto return_value = m_value.value();
m_value.reset();
m_cv.notify_all();

View File

@ -65,23 +65,41 @@ bool ParseArpReply(const T& ArpReply, uint16_t ProtocolType, const Neighbor& Sou
Target.ipAddress.ConvertToBytes(TargetIp.data());
if (ArpReply.Destination != Source.macAddress)
{
return false;
}
if (ArpReply.EthernetType != htons(ETH_P_ARP))
{
return false;
}
if (ArpReply.HardwareType != htons(ARPHRD_ETHER))
{
return false;
}
if (ArpReply.ProtocolType != htons(ProtocolType))
{
return false;
}
if (ArpReply.HardwareAddressLength != sizeof(ArpReply.SenderHardwareAddress))
{
return false;
}
if (ArpReply.ProtocolAddressLength != sizeof(ArpReply.SenderIpAddress))
{
return false;
}
if (ArpReply.Operation != htons(ARPOP_REPLY))
{
return false;
}
if (ArpReply.TargetHardwareAddress != Source.macAddress)
{
return false;
}
if (ArpReply.TargetIpAddress != SourceIp)
{
return false;
}
Target.macAddress = ArpReply.SenderHardwareAddress;
return true;
@ -129,7 +147,9 @@ bool IpNeighborManager::PerformNeighborDiscovery(Neighbor& Local, Neighbor& Neig
while (std::chrono::steady_clock::now() < expiry)
{
if (!wait_for_read(packet_socket.get(), std::chrono::duration_cast<std::chrono::milliseconds>(expiry - std::chrono::steady_clock::now())))
{
continue;
}
int bytes_read = Syscall(read, packet_socket.get(), &ArpReply, ArpPacketSize);
if (bytes_read != ArpPacketSize)
{
@ -138,12 +158,16 @@ bool IpNeighborManager::PerformNeighborDiscovery(Neighbor& Local, Neighbor& Neig
if (Local.getFamily() == AF_INET)
{
if (ParseArpReply(ArpReply.IPv4, ETH_P_IP, Local, Neighbor))
{
return true;
}
}
else
{
if (ParseArpReply(ArpReply.IPv6, ETH_P_IPV6, Local, Neighbor))
{
return true;
}
}
}
}

View File

@ -31,10 +31,14 @@ public:
bool adjust_head(long count)
{
if ((count + data_offset) < 0)
{
return false;
}
if ((count + data_offset) > data_end_offset)
{
return false;
}
data_offset += count;
return true;
@ -43,9 +47,13 @@ public:
bool adjust_tail(long count)
{
if ((count + data_end_offset) < data_offset)
{
return false;
}
if ((count + data_end_offset) > Buffer.size())
{
Buffer.resize(count + data_end_offset);
}
data_end_offset += count;
return true;

View File

@ -46,18 +46,18 @@ std::wstring ToJsonW(const T& Value)
return wsl::shared::string::MultiByteToWide(ToJson(Value));
}
template <typename T>
template <typename T, typename TJson = nlohmann::json>
T FromJson(const char* Value)
{
try
{
auto json = nlohmann::json::parse(Value);
auto json = TJson::parse(Value);
T object{};
from_json(json, object);
return object;
}
catch (const nlohmann::json::exception& e)
catch (const TJson::exception& e)
{
#ifdef WIN32
@ -72,10 +72,10 @@ T FromJson(const char* Value)
}
}
template <typename T>
template <typename T, typename TJson = nlohmann::json>
T FromJson(const wchar_t* Value)
{
return FromJson<T>(wsl::shared::string::WideToMultiByte(Value).c_str());
return FromJson<T, TJson>(wsl::shared::string::WideToMultiByte(Value).c_str());
}
template <typename T>

View File

@ -112,12 +112,13 @@ public:
#ifdef WIN32
auto sentBytes = wsl::windows::common::socket::Send(m_socket.get(), span, m_exitEvent);
WSL_LOG(
"SentMessage",
TraceLoggingValue(m_name, "Name"),
TraceLoggingValue(reinterpret_cast<const TMessage*>(span.data())->PrettyPrint().c_str(), "Content"));
wsl::windows::common::socket::Send(m_socket.get(), span, m_exitEvent);
TraceLoggingValue(reinterpret_cast<const TMessage*>(span.data())->PrettyPrint().c_str(), "Content"),
TraceLoggingValue(sentBytes, "SentBytes"));
#else
@ -130,7 +131,7 @@ public:
{
LOG_ERROR("Failed to write message {}. Channel: {}", header->MessageType, m_name);
THROW_LAST_ERROR();
};
}
#endif
}

View File

@ -191,6 +191,8 @@ Abstract:
#define WSL_ENABLE_CRASH_DUMP_ENV "WSL_ENABLE_CRASH_DUMP"
#define WSL_DEBUG_ENV "WSL_DEBUG"
#define WSL_DISTRIBUTION_CONF "/etc/wsl-distribution.conf"
//
@ -255,7 +257,6 @@ Abstract:
#define LX_WSL2_SHARED_MEMORY_OB_DIRECTORY "WSL2_SHARED_MEMORY_OB_DIRECTORY"
#define LX_WSL2_INSTALL_PATH "WSL2_INSTALL_PATH"
#define LX_WSL2_SAFE_MODE "WSL2_SAFE_MODE"
#define LX_WSL2_SYSTEM_DISTRO "WSL2_SYSTEM_DISTRO"
#define LX_WSL2_USER_PROFILE "WSL2_USER_PROFILE"
#define LX_WSL2_VM_ID_ENV "WSL2_VM_ID"
#define LX_WSL_PID_ENV "WSL2_PID"

View File

@ -80,6 +80,27 @@ try
#endif
if (BytesRead <= 0)
{
const auto* Header = reinterpret_cast<const MESSAGE_HEADER*>(Buffer.data());
#if defined(_MSC_VER)
LOG_HR_MSG(
E_UNEXPECTED,
"Socket closed while reading message. Size: %u, type: %i, sequence: %u",
Header->MessageSize,
Header->MessageType,
Header->SequenceNumber);
#elif defined(__GNUC__)
LOG_ERROR(
"Socket closed while reading message. Size: {}, type: {}, sequence: {}",
Header->MessageSize,
Header->MessageType,
Header->SequenceNumber);
#endif
return {};
}

View File

@ -20,6 +20,7 @@ Abstract:
#include <fstream>
#include <gsl/gsl>
#include <format>
#include <source_location>
#ifndef WIN32
#include <string.h>
@ -834,6 +835,22 @@ struct std::formatter<wchar_t[N], char>
}
};
template <>
struct std::formatter<std::source_location, char>
{
template <typename TCtx>
static constexpr auto parse(TCtx& ctx)
{
return ctx.begin();
}
template <typename TCtx>
auto format(const std::source_location& location, TCtx& ctx) const
{
return std::format_to(ctx.out(), "{}[{}:{}]", location.function_name(), location.file_name(), location.line());
}
};
template <>
struct std::formatter<char*, wchar_t>
{

View File

@ -1,9 +1,16 @@
set(SOURCES
ConsoleProgressBar.cpp
ConsoleProgressIndicator.cpp
DeviceHostProxy.cpp
disk.cpp
Distribution.cpp
Dmesg.cpp
DnsResolver.cpp
DnsTunnelingChannel.cpp
filesystem.cpp
GnsChannel.cpp
GnsPortTrackerChannel.cpp
GuestDeviceManager.cpp
HandleConsoleProgressBar.cpp
hcs.cpp
helpers.cpp
@ -15,21 +22,28 @@ set(SOURCES
lxssbusclient.cpp
lxssclient.cpp
LxssMessagePort.cpp
LxssSecurity.cpp
LxssServerPort.cpp
NatNetworking.cpp
Redirector.cpp
registry.cpp
relay.cpp
RingBuffer.cpp
string.cpp
SubProcess.cpp
svccomm.cpp
svccommio.cpp
WslClient.cpp
WslCoreConfig.cpp
WslCoreFilesystem.cpp
WslCoreFirewallSupport.cpp
WslCoreHostDnsInfo.cpp
WslCoreNetworkEndpointSettings.cpp
WslCoreNetworkingSupport.cpp
WslInstall.cpp
WslSecurity.cpp
WslTelemetry.cpp
VirtioNetworking.cpp
wslutil.cpp
notifications.cpp)
@ -60,24 +74,35 @@ set(HEADERS
../inc/wslrelay.h
ConsoleProgressBar.h
ConsoleProgressIndicator.h
DeviceHostProxy.h
disk.hpp
Distribution.h
Dmesg.h
DnsResolver.h
DnsTunnelingChannel.h
filesystem.hpp
GnsChannel.h
GnsPortTrackerChannel.h
GuestDeviceManager.h
HandleConsoleProgressBar.h
hcs.hpp
hcs_schema.h
helpers.hpp
HandleConsoleProgressBar.h
interop.hpp
ExecutionContext.h
socket.hpp
hvsocket.hpp
INetworkingEngine.h
LxssMessagePort.h
LxssPort.h
LxssSecurity.h
LxssServerPort.h
NatNetworking.h
precomp.h
Redirector.h
registry.hpp
relay.hpp
RingBuffer.h
string.hpp
Stringify.h
SubProcess.h
@ -85,11 +110,16 @@ set(HEADERS
svccommio.hpp
WslClient.h
WslCoreConfig.h
WslCoreFilesystem.h
WslCoreFirewallSupport.h
WslCoreHostDnsInfo.h
WslCoreMessageQueue.h
WslCoreNetworkEndpointSettings.h
WslCoreNetworkingSupport.h
WslInstall.h
WslSecurity.h
WslTelemetry.h
VirtioNetworking.h
wslutil.h
notifications.h)

View File

@ -101,14 +101,18 @@ DistributionList ReadFromManifest(const std::wstring& url)
}
else
{
const winrt::Windows::Web::Http::HttpClient client;
const winrt::Windows::Web::Http::Filters::HttpBaseProtocolFilter filter;
filter.CacheControl().WriteBehavior(winrt::Windows::Web::Http::Filters::HttpCacheWriteBehavior::NoCache);
filter.CacheControl().ReadBehavior(winrt::Windows::Web::Http::Filters::HttpCacheReadBehavior::NoCache);
const winrt::Windows::Web::Http::HttpClient client(filter);
const auto response = client.GetAsync(winrt::Windows::Foundation::Uri(url)).get();
response.EnsureSuccessStatusCode();
content = response.Content().ReadAsStringAsync().get();
}
auto distros = wsl::shared::FromJson<DistributionList>(content.c_str());
auto distros = wsl::shared::FromJson<DistributionList, nlohmann::ordered_json>(content.c_str());
if (distros.Distributions.has_value())
{

View File

@ -58,10 +58,28 @@ struct Distribution
struct DistributionList
{
std::optional<std::vector<Distribution>> Distributions;
std::optional<std::map<std::string, std::vector<ModernDistributionVersion>>> ModernDistributions;
std::optional<nlohmann::ordered_map<std::string, std::vector<ModernDistributionVersion>>> ModernDistributions;
std::optional<std::wstring> Default;
NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(DistributionList, Distributions, ModernDistributions, Default)
friend void from_json(const nlohmann::ordered_json& nlohmann_json_j, DistributionList& nlohmann_json_t)
{
const DistributionList nlohmann_json_default_obj{};
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, Distributions, Default));
auto modernDistributions = nlohmann_json_j.find("ModernDistributions");
if (modernDistributions != nlohmann_json_j.end())
{
nlohmann_json_t.ModernDistributions.emplace();
for (const auto& e : modernDistributions->items())
{
std::vector<ModernDistributionVersion> distros;
from_json(e.value(), distros);
nlohmann_json_t.ModernDistributions->emplace_back(e.key(), std::move(distros));
}
}
}
};
constexpr inline auto c_distroUrlRegistryValue = L"DistributionListUrl";

View File

@ -0,0 +1,143 @@
// Copyright (C) Microsoft Corporation. All rights reserved.
#include "precomp.h"
#include "GuestDeviceManager.h"
#include "DeviceHostProxy.h"
GuestDeviceManager::GuestDeviceManager(_In_ const std::wstring& machineId, _In_ const GUID& runtimeId) :
m_machineId(machineId), m_deviceHostSupport(wil::MakeOrThrow<DeviceHostProxy>(machineId, runtimeId))
{
}
_Requires_lock_not_held_(m_lock)
GUID GuestDeviceManager::AddGuestDevice(
_In_ const GUID& DeviceId, _In_ const GUID& ImplementationClsid, _In_ PCWSTR AccessName, _In_opt_ PCWSTR Options, _In_ PCWSTR Path, _In_ UINT32 Flags, _In_ HANDLE UserToken)
{
auto guestDeviceLock = m_lock.lock_exclusive();
return AddHdvShareWithOptions(DeviceId, ImplementationClsid, AccessName, Options, Path, Flags, UserToken);
}
_Requires_lock_held_(m_lock)
GUID GuestDeviceManager::AddHdvShareWithOptions(
_In_ const GUID& DeviceId, _In_ const GUID& ImplementationClsid, _In_ PCWSTR AccessName, _In_opt_ PCWSTR Options, _In_ PCWSTR Path, _In_ UINT32 Flags, _In_ HANDLE UserToken)
{
wil::com_ptr<IPlan9FileSystem> server;
// Options are appended to the name with a semi-colon separator.
// "name;key1=value1;key2=value2"
// The AddSharePath implementation is responsible for separating them out and interpreting them.
std::wstring nameWithOptions{AccessName};
if (ARGUMENT_PRESENT(Options))
{
nameWithOptions += L";";
nameWithOptions += Options;
}
{
auto revert = wil::impersonate_token(UserToken);
server = GetRemoteFileSystem(ImplementationClsid, c_defaultDeviceTag);
if (!server)
{
server = wil::CoCreateInstance<IPlan9FileSystem>(ImplementationClsid, (CLSCTX_LOCAL_SERVER | CLSCTX_ENABLE_CLOAKING | CLSCTX_ENABLE_AAA));
AddRemoteFileSystem(ImplementationClsid, c_defaultDeviceTag.c_str(), server);
}
THROW_IF_FAILED(server->AddSharePath(nameWithOptions.c_str(), Path, Flags));
}
// This requires more privileges than the user may have, so impersonation is disabled.
return AddNewDevice(DeviceId, server, AccessName);
}
GUID GuestDeviceManager::AddNewDevice(_In_ const GUID& deviceId, _In_ const wil::com_ptr<IPlan9FileSystem>& server, _In_ PCWSTR tag)
{
return m_deviceHostSupport->AddNewDevice(deviceId, server, tag);
}
void GuestDeviceManager::AddRemoteFileSystem(_In_ REFCLSID clsid, _In_ PCWSTR tag, _In_ const wil::com_ptr<IPlan9FileSystem>& server)
{
m_deviceHostSupport->AddRemoteFileSystem(clsid, tag, server);
}
void GuestDeviceManager::AddSharedMemoryDevice(_In_ const GUID& ImplementationClsid, _In_ PCWSTR Tag, _In_ PCWSTR Path, _In_ UINT32 SizeMb, _In_ HANDLE UserToken)
{
auto guestDeviceLock = m_lock.lock_exclusive();
auto objectLifetime = CreateSectionObjectRoot(Path, UserToken);
// For virtiofs hdv, the flags parameter has been overloaded. Flags are placed in the lower
// 16 bits, while the shared memory size in megabytes are placed in the upper 16 bits.
static constexpr auto VIRTIO_FS_FLAGS_SHMEM_SIZE_SHIFT = 16;
UINT32 flags = (SizeMb << VIRTIO_FS_FLAGS_SHMEM_SIZE_SHIFT);
WI_SetFlag(flags, VIRTIO_FS_FLAGS_TYPE_SECTIONS);
(void)AddHdvShareWithOptions(VIRTIO_FS_DEVICE_ID, ImplementationClsid, Tag, {}, objectLifetime.Path.c_str(), flags, UserToken);
m_objectDirectories.emplace_back(std::move(objectLifetime));
}
GuestDeviceManager::DirectoryObjectLifetime GuestDeviceManager::CreateSectionObjectRoot(_In_ std::wstring_view RelativeRootPath, _In_ HANDLE UserToken) const
{
auto revert = wil::impersonate_token(UserToken);
DWORD sessionId;
DWORD bytesWritten;
THROW_LAST_ERROR_IF(!GetTokenInformation(GetCurrentThreadToken(), TokenSessionId, &sessionId, sizeof(sessionId), &bytesWritten));
// /Sessions/1/BaseNamedObjects/WSL/<VM ID>/<Relative Path>
std::wstringstream sectionPathBuilder;
sectionPathBuilder << L"\\Sessions\\" << sessionId << L"\\BaseNamedObjects" << L"\\WSL\\" << m_machineId << L"\\" << RelativeRootPath;
auto sectionPath = sectionPathBuilder.str();
UNICODE_STRING ntPath{};
OBJECT_ATTRIBUTES attributes{};
attributes.Length = sizeof(OBJECT_ATTRIBUTES);
attributes.ObjectName = &ntPath;
std::vector<wil::unique_handle> directoryHierarchy;
auto remainingPath = std::wstring_view(sectionPath.data(), sectionPath.length());
while (remainingPath.length() > 0)
{
// Find the next path substring, ignoring the root path backslash.
auto nextDir = remainingPath;
const auto separatorPos = nextDir.find(L"\\", remainingPath[0] == L'\\' ? 1 : 0);
if (separatorPos != std::wstring_view::npos)
{
nextDir = nextDir.substr(0, separatorPos);
remainingPath = remainingPath.substr(separatorPos + 1, std::wstring_view::npos);
// Skip concurrent backslashes.
while (remainingPath.length() > 0 && remainingPath[0] == L'\\')
{
remainingPath = remainingPath.substr(1, std::wstring_view::npos);
}
}
else
{
remainingPath = remainingPath.substr(remainingPath.length(), std::wstring_view::npos);
}
attributes.RootDirectory = directoryHierarchy.size() > 0 ? directoryHierarchy.back().get() : nullptr;
ntPath.Buffer = const_cast<PWCH>(nextDir.data());
ntPath.Length = sizeof(WCHAR) * gsl::narrow_cast<USHORT>(nextDir.length());
ntPath.MaximumLength = ntPath.Length;
wil::unique_handle nextHandle;
NTSTATUS status = ZwCreateDirectoryObject(&nextHandle, DIRECTORY_ALL_ACCESS, &attributes);
if (status == STATUS_OBJECT_NAME_COLLISION)
{
status = NtOpenDirectoryObject(&nextHandle, MAXIMUM_ALLOWED, &attributes);
}
THROW_IF_NTSTATUS_FAILED(status);
directoryHierarchy.emplace_back(std::move(nextHandle));
}
return {std::move(sectionPath), std::move(directoryHierarchy)};
}
wil::com_ptr<IPlan9FileSystem> GuestDeviceManager::GetRemoteFileSystem(_In_ REFCLSID clsid, _In_ std::wstring_view tag)
{
return m_deviceHostSupport->GetRemoteFileSystem(clsid, tag);
}
void GuestDeviceManager::Shutdown()
try
{
m_deviceHostSupport->Shutdown();
}
CATCH_LOG()

View File

@ -0,0 +1,71 @@
// Copyright (C) Microsoft Corporation. All rights reserved.
#pragma once
#include "DeviceHostProxy.h"
// Flags for virtiofs vdev device creation.
#define VIRTIO_FS_FLAGS_TYPE_FILES 0x8000
#define VIRTIO_FS_FLAGS_TYPE_SECTIONS 0x4000
inline const std::wstring c_defaultDeviceTag = L"default";
// These device types are implemented by the external wsldevicehost vdev.
DEFINE_GUID(VIRTIO_FS_DEVICE_ID, 0x872270E1, 0xA899, 0x4AF6, 0xB4, 0x54, 0x71, 0x93, 0x63, 0x44, 0x35, 0xAD); // {872270E1-A899-4AF6-B454-7193634435AD}
DEFINE_GUID(VIRTIO_NET_DEVICE_ID, 0xF07010D0, 0x0EA9, 0x447F, 0x88, 0xEF, 0xBD, 0x95, 0x2A, 0x4D, 0x2F, 0x14); // {F07010D0-0EA9-447F-88EF-BD952A4D2F14}
DEFINE_GUID(VIRTIO_PMEM_DEVICE_ID, 0xEDBB24BB, 0x5E19, 0x40F4, 0x8A, 0x0F, 0x82, 0x24, 0x31, 0x30, 0x64, 0xFD); // {EDBB24BB-5E19-40F4-8A0F-8224313064FD}
//
// Provides synchronized access to guest device operations.
//
class GuestDeviceManager
{
public:
GuestDeviceManager(_In_ const std::wstring& machineId, _In_ const GUID& runtimeId);
_Requires_lock_not_held_(m_lock)
GUID AddGuestDevice(
_In_ const GUID& DeviceId,
_In_ const GUID& ImplementationClsid,
_In_ PCWSTR AccessName,
_In_opt_ PCWSTR Options,
_In_ PCWSTR Path,
_In_ UINT32 Flags,
_In_ HANDLE UserToken);
GUID AddNewDevice(_In_ const GUID& deviceId, _In_ const wil::com_ptr<IPlan9FileSystem>& server, _In_ PCWSTR tag);
void AddRemoteFileSystem(_In_ REFCLSID clsid, _In_ PCWSTR tag, _In_ const wil::com_ptr<IPlan9FileSystem>& server);
void AddSharedMemoryDevice(_In_ const GUID& ImplementationClsid, _In_ PCWSTR Tag, _In_ PCWSTR Path, _In_ UINT32 SizeMb, _In_ HANDLE UserToken);
wil::com_ptr<IPlan9FileSystem> GetRemoteFileSystem(_In_ REFCLSID clsid, _In_ std::wstring_view tag);
void Shutdown();
private:
_Requires_lock_held_(m_lock)
GUID AddHdvShareWithOptions(
_In_ const GUID& DeviceId,
_In_ const GUID& ImplementationClsid,
_In_ PCWSTR AccessName,
_In_opt_ PCWSTR Options,
_In_ PCWSTR Path,
_In_ UINT32 Flags,
_In_ HANDLE UserToken);
struct DirectoryObjectLifetime
{
std::wstring Path;
// Directory objects are temporary, even if they have children, so need to keep
// any created handles open in order for the directory to remain accessible.
std::vector<wil::unique_handle> HierarchyLifetimes;
};
DirectoryObjectLifetime CreateSectionObjectRoot(_In_ std::wstring_view RelativeRootPath, _In_ HANDLE UserToken) const;
wil::srwlock m_lock;
std::wstring m_machineId;
wil::com_ptr<DeviceHostProxy> m_deviceHostSupport;
_Guarded_by_(m_lock) std::vector<DirectoryObjectLifetime> m_objectDirectories;
};

View File

@ -19,7 +19,6 @@ Abstract:
// Defines.
#define LAUNCH_PROCESS_DEFAULT_BUFFER_SIZE 1024
#define LAUNCH_PROCESS_DEFAULT_TIMEOUT_MS 30000
LxssMessagePort::LxssMessagePort(_In_ HANDLE MessagePort) : m_messagePort(MessagePort), m_messageEvent(wil::EventOptions::None)
{
@ -52,7 +51,7 @@ std::shared_ptr<LxssPort> LxssMessagePort::CreateSessionLeader(_In_ HANDLE Clien
LX_INIT_CREATE_SESSION Message{{LxInitMessageCreateSession, sizeof(Message)}, MarshalId};
Send(&Message, sizeof(Message));
auto LocalMessagePort = m_serverPort->WaitForConnection(LAUNCH_PROCESS_DEFAULT_TIMEOUT_MS);
auto LocalMessagePort = m_serverPort->WaitForConnection(c_defaultMessageTimeout);
ReleaseConsole.release();
return LocalMessagePort;
}
@ -156,7 +155,7 @@ void LxssMessagePort::Receive(_Out_writes_bytes_(Length) PVOID Buffer, _In_ ULON
return;
}
std::vector<gsl::byte> LxssMessagePort::Receive()
std::vector<gsl::byte> LxssMessagePort::Receive(DWORD Timeout)
{
IO_STATUS_BLOCK IoStatus;
std::vector<gsl::byte> Message;
@ -170,7 +169,7 @@ std::vector<gsl::byte> LxssMessagePort::Receive()
if (Status == STATUS_PENDING)
{
WaitForMessage(&IoStatus);
WaitForMessage(&IoStatus, Timeout);
Status = IoStatus.Status;
SizeReceived = static_cast<ULONG>(IoStatus.Information);
}
@ -274,7 +273,7 @@ wil::unique_handle LxssMessagePort::UnmarshalVfsFile(_In_ LXBUS_IPC_HANDLE_ID Vf
void LxssMessagePort::WaitForMessage(_In_ PIO_STATUS_BLOCK IoStatus, _In_ DWORD Timeout) const
{
const DWORD WaitStatus = WaitForSingleObject(m_messageEvent.get(), LAUNCH_PROCESS_DEFAULT_TIMEOUT_MS);
const DWORD WaitStatus = WaitForSingleObject(m_messageEvent.get(), Timeout);
if (WaitStatus == WAIT_TIMEOUT)
{
IO_STATUS_BLOCK IoStatusCancel;

View File

@ -21,6 +21,8 @@ class LxssServerPort;
class LxssMessagePort : public LxssPort
{
public:
static inline DWORD c_defaultMessageTimeout = 30000;
LxssMessagePort(_In_ HANDLE MessagePort);
LxssMessagePort(_In_ LxssMessagePort&& Source);
LxssMessagePort(_In_ std::unique_ptr<LxssMessagePort>&& SourcePointer);
@ -46,7 +48,7 @@ public:
LXBUS_IPC_PROCESS_ID
MarshalProcess(_In_ HANDLE ProcessHandle, _In_ bool TerminateOnClose) const;
std::vector<gsl::byte> Receive();
std::vector<gsl::byte> Receive(DWORD Timeout = c_defaultMessageTimeout);
void ReleaseConsole(_In_ LXBUS_IPC_CONSOLE_ID ConsoleId) const;

View File

@ -6,7 +6,6 @@
#include "WslCoreHostDnsInfo.h"
#include "Stringify.h"
#include "WslCoreFirewallSupport.h"
#include "WslCoreVm.h"
#include "hcs.hpp"
using namespace wsl::core::networking;
@ -507,23 +506,12 @@ CATCH_LOG()
void NatNetworking::UpdateMtu()
{
unique_interface_table interfaceTable{};
THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable));
ULONG minMtu = ULONG_MAX;
for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++)
{
const auto& ipInterface = interfaceTable.get()->Table[index];
if (ipInterface.Connected)
{
minMtu = std::min(ipInterface.NlMtu, minMtu);
}
}
const auto minMtu = GetMinimumConnectedInterfaceMtu();
// Only send the update if the MTU changed.
if (minMtu != ULONG_MAX && minMtu != m_networkMtu)
if (minMtu && minMtu.value() != m_networkMtu)
{
m_networkMtu = minMtu;
m_networkMtu = minMtu.value();
hns::ModifyGuestEndpointSettingRequest<hns::NetworkInterface> notification{};
notification.ResourceType = hns::GuestEndpointResourceType::Interface;
@ -672,7 +660,7 @@ wsl::windows::common::hcs::unique_hcn_network NatNetworking::CreateNetwork(wsl::
wil::ResultFromException(WI_DIAGNOSTICS_INFO, [&] {
try
{
wsl::core::networking::ConfigureHyperVFirewall(config.FirewallConfig, c_vmOwner);
wsl::core::networking::ConfigureHyperVFirewall(config.FirewallConfig, wsl::windows::common::wslutil::c_vmOwner);
natNetwork = CreateNetworkInternal(config);
}
catch (...)

View File

@ -2,6 +2,7 @@
#include "precomp.h"
#include "VirtioNetworking.h"
#include "GuestDeviceManager.h"
#include "Stringify.h"
#include "stringshared.h"
@ -12,34 +13,26 @@ using wsl::core::VirtioNetworking;
static constexpr auto c_loopbackDeviceName = TEXT(LX_INIT_LOOPBACK_DEVICE_NAME);
VirtioNetworking::VirtioNetworking(GnsChannel&& gnsChannel, const Config& config) :
m_gnsChannel(std::move(gnsChannel)), m_config(config)
VirtioNetworking::VirtioNetworking(
GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr<GuestDeviceManager> guestDeviceManager, GUID classId, wil::shared_handle userToken) :
m_guestDeviceManager(std::move(guestDeviceManager)),
m_userToken(std::move(userToken)),
m_gnsChannel(std::move(gnsChannel)),
m_enableLocalhostRelay(enableLocalhostRelay),
m_virtioNetworkClsid(classId)
{
}
VirtioNetworking& VirtioNetworking::OnAddGuestDevice(const AddGuestDeviceRoutine& addGuestDeviceRoutine)
VirtioNetworking::~VirtioNetworking()
{
m_addGuestDeviceRoutine = addGuestDeviceRoutine;
return *this;
}
VirtioNetworking& VirtioNetworking::OnModifyOpenPorts(const ModifyOpenPortsCallback& modifyOpenPortsCallback)
{
m_modifyOpenPortsCallback = modifyOpenPortsCallback;
return *this;
}
VirtioNetworking& VirtioNetworking::OnGuestInterfaceStateChanged(const GuestInterfaceStateChangeCallback& guestInterfaceStateChangedCallback)
{
m_guestInterfaceStateChangeCallback = guestInterfaceStateChangedCallback;
return *this;
// Unregister the network notification callback to prevent it from using the GNS channel.
m_networkNotifyHandle.reset();
// Stop the GNS channel to unblock any stuck communications with the guest.
m_gnsChannel.Stop();
}
void VirtioNetworking::Initialize()
try
{
THROW_HR_IF(E_NOT_SET, !m_addGuestDeviceRoutine || !m_modifyOpenPortsCallback || !m_guestInterfaceStateChangeCallback);
m_networkSettings = GetHostEndpointSettings();
// TODO: Determine gateway MAC address
@ -83,11 +76,12 @@ try
device_options << L"nameservers=" << dns_servers;
}
// Add virtio net adapter to guest
m_adapterId = (*m_addGuestDeviceRoutine)(c_virtioNetworkClsid, c_virtioNetworkDeviceId, L"eth0", device_options.str().c_str());
auto lock = m_lock.lock_exclusive();
// Add virtio net adapter to guest
m_adapterId = m_guestDeviceManager->AddGuestDevice(
VIRTIO_NET_DEVICE_ID, m_virtioNetworkClsid, L"eth0", nullptr, device_options.str().c_str(), 0, m_userToken.get());
hns::HNSEndpoint endpointProperties;
endpointProperties.ID = m_adapterId;
endpointProperties.IPAddress = m_networkSettings->PreferredIpAddress.AddressString;
@ -121,19 +115,24 @@ try
UpdateDns(std::move(dnsSettings));
}
if (m_config.EnableLocalhostRelay)
if (m_enableLocalhostRelay)
{
SetupLoopbackDevice();
}
THROW_IF_WIN32_ERROR(NotifyNetworkConnectivityHintChange(&VirtioNetworking::OnNetworkConnectivityChange, this, true, &m_networkNotifyHandle));
}
CATCH_LOG()
void VirtioNetworking::SetupLoopbackDevice()
{
m_localhostAdapterId = (*m_addGuestDeviceRoutine)(
c_virtioNetworkClsid, c_virtioNetworkDeviceId, c_loopbackDeviceName, L"client_ip=127.0.0.1;client_mac=00:11:22:33:44:55");
m_localhostAdapterId = m_guestDeviceManager->AddGuestDevice(
VIRTIO_NET_DEVICE_ID,
m_virtioNetworkClsid,
c_loopbackDeviceName,
nullptr,
L"client_ip=127.0.0.1;client_mac=00:11:22:33:44:55",
0,
m_userToken.get());
hns::HNSEndpoint endpointProperties;
endpointProperties.ID = m_localhostAdapterId;
@ -162,7 +161,7 @@ void VirtioNetworking::StartPortTracker(wil::unique_socket&& socket)
m_gnsPortTrackerChannel.emplace(
std::move(socket),
[&](const SOCKADDR_INET& addr, int protocol, bool allocate) { return HandlePortNotification(addr, protocol, allocate); },
[&](_In_ const std::string& interfaceName, _In_ bool up) { (*m_guestInterfaceStateChangeCallback)(interfaceName, up); });
[](const std::string&, bool) {}); // TODO: reconsider if InterfaceStateCallback is needed.
}
HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int protocol, bool allocate) const noexcept
@ -181,7 +180,7 @@ HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int
}
}
if (m_config.EnableLocalhostRelay && (unspecified || loopback))
if (m_enableLocalhostRelay && (unspecified || loopback))
{
SOCKADDR_INET localAddr = addr;
if (!loopback)
@ -196,21 +195,65 @@ HRESULT VirtioNetworking::HandlePortNotification(const SOCKADDR_INET& addr, int
localAddr.Ipv6.sin6_port = addr.Ipv6.sin6_port;
}
}
result = (*m_modifyOpenPortsCallback)(c_virtioNetworkClsid, c_loopbackDeviceName, localAddr, protocol, allocate);
result = ModifyOpenPorts(c_loopbackDeviceName, localAddr, protocol, allocate);
LOG_HR_IF_MSG(E_FAIL, result != S_OK, "Failure adding localhost relay port %d", localAddr.Ipv4.sin_port);
}
if (!loopback)
{
const int localResult = (*m_modifyOpenPortsCallback)(c_virtioNetworkClsid, L"eth0", addr, protocol, allocate);
const int localResult = ModifyOpenPorts(L"eth0", addr, protocol, allocate);
LOG_HR_IF_MSG(E_FAIL, localResult != S_OK, "Failure adding relay port %d", addr.Ipv4.sin_port);
if (result == 0)
{
result = localResult;
}
}
return result;
}
int VirtioNetworking::ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const
{
if (protocol != IPPROTO_TCP && protocol != IPPROTO_UDP)
{
LOG_HR_MSG(HRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED), "Unsupported bind protocol %d", protocol);
return 0;
}
else if (addr.si_family == AF_INET6)
{
// The virtio net adapter does not yet support IPv6 packets, so any traffic would arrive via
// IPv4. If the caller wants IPv4 they will also likely listen on an IPv4 address, which will
// be handled as a separate callback to this same code.
return 0;
}
auto lock = m_lock.lock_exclusive();
const auto server = m_guestDeviceManager->GetRemoteFileSystem(m_virtioNetworkClsid, c_defaultDeviceTag);
if (server)
{
std::wstring portString = std::format(L"tag={};port_number={}", tag, addr.Ipv4.sin_port);
if (protocol == IPPROTO_UDP)
{
portString += L";udp";
}
if (!isOpen)
{
portString += L";allocate=false";
}
else
{
wchar_t addrStr[16]; // "000.000.000.000" + null terminator
RtlIpv4AddressToStringW(&addr.Ipv4.sin_addr, addrStr);
portString += std::format(L";listen_addr={}", addrStr);
}
LOG_IF_FAILED(server->AddShare(portString.c_str(), nullptr, 0));
}
return 0;
}
void NETIOAPI_API_ VirtioNetworking::OnNetworkConnectivityChange(PVOID context, NL_NETWORK_CONNECTIVITY_HINT hint)
{
static_cast<VirtioNetworking*>(context)->RefreshGuestConnection(hint);
@ -235,32 +278,25 @@ void VirtioNetworking::UpdateDns(hns::DNS&& dnsSettings)
void VirtioNetworking::UpdateMtu()
{
unique_interface_table interfaceTable{};
THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable));
ULONG minMtu = ULONG_MAX;
for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++)
{
const auto& ipInterface = interfaceTable.get()->Table[index];
if (ipInterface.Connected)
{
minMtu = std::min(ipInterface.NlMtu, minMtu);
}
}
const auto minMtu = GetMinimumConnectedInterfaceMtu();
// Only send the update if the MTU changed.
if (minMtu != ULONG_MAX && minMtu != m_networkMtu)
if (minMtu && minMtu.value() != m_networkMtu)
{
m_networkMtu = minMtu.value();
hns::ModifyGuestEndpointSettingRequest<hns::NetworkInterface> notification{};
notification.ResourceType = hns::GuestEndpointResourceType::Interface;
notification.RequestType = hns::ModifyRequestType::Update;
notification.Settings.NlMtu = m_networkMtu;
notification.Settings.Connected = true;
notification.Settings.NlMtu = m_networkMtu;
WSL_LOG("VirtioNetworking::UpdateMtu", TraceLoggingValue(m_networkMtu, "VirtioMtu"));
WSL_LOG(
"VirtioNetworking::UpdateMtu",
TraceLoggingValue(m_adapterId, "endpointId"),
TraceLoggingValue(m_networkMtu, "virtioMtu"));
// TODO: Why was this commented ?
// m_gnsChannel.SendHnsNotification(ToJsonW(notification).c_str(), m_endpointId);
m_gnsChannel.SendHnsNotification(ToJsonW(notification).c_str(), m_adapterId);
}
}

View File

@ -6,22 +6,15 @@
#include "GnsChannel.h"
#include "WslCoreHostDnsInfo.h"
#include "GnsPortTrackerChannel.h"
#include "GuestDeviceManager.h"
namespace wsl::core {
using AddGuestDeviceRoutine = std::function<GUID(const GUID& clsid, const GUID& deviceId, PCWSTR tag, PCWSTR options)>;
using ModifyOpenPortsCallback = std::function<int(const GUID& clsid, PCWSTR tag, const SOCKADDR_INET& addr, int protocol, bool isOpen)>;
using GuestInterfaceStateChangeCallback = std::function<void(const std::string& name, bool isUp)>;
class VirtioNetworking : public INetworkingEngine
{
public:
VirtioNetworking(GnsChannel&& gnsChannel, const Config& config);
~VirtioNetworking() = default;
VirtioNetworking& OnAddGuestDevice(const AddGuestDeviceRoutine& addGuestDeviceRoutine);
VirtioNetworking& OnModifyOpenPorts(const ModifyOpenPortsCallback& modifyOpenPortsCallback);
VirtioNetworking& OnGuestInterfaceStateChanged(const GuestInterfaceStateChangeCallback& guestInterfaceStateChangedCallback);
VirtioNetworking(GnsChannel&& gnsChannel, bool enableLocalhostRelay, std::shared_ptr<GuestDeviceManager> guestDeviceManager, GUID classId, wil::shared_handle userToken);
~VirtioNetworking();
// Note: This class cannot be moved because m_networkNotifyHandle captures a 'this' pointer.
VirtioNetworking(const VirtioNetworking&) = delete;
@ -42,6 +35,7 @@ private:
static std::optional<ULONGLONG> FindVirtioInterfaceLuid(const SOCKADDR_INET& virtioAddress, const NL_NETWORK_CONNECTIVITY_HINT& currentConnectivityHint);
HRESULT HandlePortNotification(const SOCKADDR_INET& addr, int protocol, bool allocate) const noexcept;
int ModifyOpenPorts(_In_ PCWSTR tag, _In_ const SOCKADDR_INET& addr, _In_ int protocol, _In_ bool isOpen) const;
void RefreshGuestConnection(NL_NETWORK_CONNECTIVITY_HINT hint) noexcept;
void SetupLoopbackDevice();
void UpdateDns(wsl::shared::hns::DNS&& dnsSettings);
@ -49,17 +43,15 @@ private:
mutable wil::srwlock m_lock;
std::optional<AddGuestDeviceRoutine> m_addGuestDeviceRoutine;
std::shared_ptr<GuestDeviceManager> m_guestDeviceManager;
wil::shared_handle m_userToken;
GnsChannel m_gnsChannel;
std::optional<GnsPortTrackerChannel> m_gnsPortTrackerChannel;
std::shared_ptr<networking::NetworkSettings> m_networkSettings;
const Config& m_config;
bool m_enableLocalhostRelay;
GUID m_localhostAdapterId;
GUID m_adapterId;
std::optional<NL_NETWORK_CONNECTIVITY_LEVEL_HINT> m_connectivityLevel;
std::optional<NL_NETWORK_CONNECTIVITY_COST_HINT> m_connectivityCost;
std::optional<ModifyOpenPortsCallback> m_modifyOpenPortsCallback;
std::optional<GuestInterfaceStateChangeCallback> m_guestInterfaceStateChangeCallback;
GUID m_virtioNetworkClsid;
std::optional<ULONGLONG> m_interfaceLuid;
ULONG m_networkMtu = 0;
@ -67,11 +59,6 @@ private:
// Note: this field must be destroyed first to stop the callbacks before any other field is destroyed.
networking::unique_notify_handle m_networkNotifyHandle;
// 16479D2E-F0C3-4DBA-BF7A-04FFF0892B07
static constexpr GUID c_virtioNetworkClsid = {0x16479D2E, 0xF0C3, 0x4DBA, {0xBF, 0x7A, 0x04, 0xFF, 0xF0, 0x89, 0x2B, 0x07}};
// F07010D0-0EA9-447F-88EF-BD952A4D2F14
static constexpr GUID c_virtioNetworkDeviceId = {0xF07010D0, 0x0EA9, 0x447F, {0x88, 0xEF, 0xBD, 0x95, 0x2A, 0x4D, 0x2F, 0x14}};
};
} // namespace wsl::core

View File

@ -275,14 +275,6 @@ int ExportDistribution(_In_ std::wstring_view commandLine)
}
else
{
// If exporting to a vhd, ensure the filename ends with the vhdx file extension.
if (WI_IsFlagSet(flags, LXSS_EXPORT_DISTRO_FLAGS_VHD) &&
!wsl::windows::common::string::IsPathComponentEqual(filePath.extension().native(), wsl::windows::common::wslutil::c_vhdxFileExtension))
{
wsl::windows::common::wslutil::PrintMessage(wsl::shared::Localization::MessageRequiresVhdxFileExtension());
return -1;
}
file.reset(CreateFileW(
filePath.c_str(), GENERIC_WRITE, (FILE_SHARE_READ | FILE_SHARE_DELETE), nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr));
@ -371,22 +363,10 @@ int ImportDistribution(_In_ std::wstring_view commandLine)
}
else
{
bool isVhd = wsl::windows::common::string::IsPathComponentEqual(
filePath.extension().native(), wsl::windows::common::wslutil::c_vhdxFileExtension);
if (WI_IsFlagSet(flags, LXSS_IMPORT_DISTRO_FLAGS_VHD))
if (WI_IsFlagClear(flags, LXSS_IMPORT_DISTRO_FLAGS_VHD))
{
// If importing from a vhd, ensure the filename ends with the vhdx file extension.
if (!isVhd)
{
wsl::windows::common::wslutil::PrintMessage(wsl::shared::Localization::MessageRequiresVhdxFileExtension());
return -1;
}
}
else
{
// Fail if we expect a tar, but the file name has the .vhdx extension.
if (isVhd)
// Fail if expecting a tar, but the file name has the .vhd or .vhdx extension.
if (wsl::windows::common::wslutil::IsVhdFile(filePath))
{
wsl::windows::common::wslutil::PrintMessage(wsl::shared::Localization::MessagePassVhdFlag());
return -1;
@ -1916,6 +1896,7 @@ int wsl::windows::common::WslClient::Main(_In_ LPCWSTR commandLine)
// Print error messages for failures.
if (FAILED(result))
{
try
{
std::wstring errorString{};
@ -1969,7 +1950,8 @@ int wsl::windows::common::WslClient::Main(_In_ LPCWSTR commandLine)
}
}
}
CATCH_LOG()
CATCH_LOG()
}
if (g_promptBeforeExit)
{

View File

@ -107,8 +107,8 @@ void wsl::core::Config::ParseConfigFile(_In_opt_ LPCWSTR ConfigFilePath, _In_opt
ConfigKey(ConfigSetting::MaxCrashDumpCount, MaxCrashDumpCount),
ConfigKey(ConfigSetting::DistributionInstallPath, DefaultDistributionLocation),
ConfigKey(ConfigSetting::InstanceIdleTimeout, InstanceIdleTimeout),
ConfigKey(ConfigSetting::LoadDefaultKernelModules, LoadDefaultKernelModules, &loadKernelModulesPresence),
ConfigKey(ConfigSetting::LoadKernelModules, userKernelModules, &loadKernelModulesPresence),
ConfigKey(ConfigSetting::LoadDefaultKernelModules, LoadDefaultKernelModules, &LoadKernelModulesPresence),
ConfigKey(ConfigSetting::LoadKernelModules, userKernelModules, &LoadKernelModulesPresence),
// Features that were previously experimental (the old header is maintained for compatibility).
ConfigKey({ConfigSetting::NetworkingMode, ConfigSetting::Experimental::NetworkingMode}, wsl::core::NetworkingModes, NetworkingMode, &NetworkingModePresence),
@ -194,15 +194,18 @@ void wsl::core::Config::ParseConfigFile(_In_opt_ LPCWSTR ConfigFilePath, _In_opt
DefaultDistributionLocation = wsl::windows::common::filesystem::GetLocalAppDataPath(UserToken) / "wsl";
}
if (!LoadDefaultKernelModules)
auto kernelModules =
LoadDefaultKernelModules ? std::vector<std::wstring>{L"tun", L"ip_tables", L"br_netfilter"} : std::vector<std::wstring>{};
if (!userKernelModules.empty())
{
KernelModulesList.clear();
for (const auto& e : wsl::shared::string::Split(userKernelModules, L','))
{
kernelModules.emplace_back(std::move(e));
}
}
for (auto& e : wsl::shared::string::Split(userKernelModules, L','))
{
KernelModulesList.emplace_back(std::move(e));
}
KernelModulesList = wsl::shared::string::Join(kernelModules, L',');
}
void wsl::core::Config::SaveNetworkingSettings(_In_opt_ HANDLE UserToken) const
@ -287,7 +290,7 @@ void wsl::core::Config::Initialize(_In_opt_ HANDLE UserToken)
{
// Determine the maximum number of processors that can be added to the VM.
// If the user did not supply a processor count, use the maximum.
const auto MaximumProcessorCount = wsl::windows::common::wslutil::GetLogicalProcessorCount();
MaximumProcessorCount = wsl::windows::common::wslutil::GetLogicalProcessorCount();
if (ProcessorCount <= 0)
{
ProcessorCount = MaximumProcessorCount;
@ -397,6 +400,7 @@ void wsl::core::Config::Initialize(_In_opt_ HANDLE UserToken)
// Load NAT configuration from the registry.
if (NetworkingMode == wsl::core::NetworkingMode::Nat)
{
try
{
const auto machineKey = wsl::windows::common::registry::OpenLxssMachineKey();
@ -407,10 +411,12 @@ void wsl::core::Config::Initialize(_In_opt_ HANDLE UserToken)
const auto userKey = wsl::windows::common::registry::OpenLxssUserKey();
NatIpAddress = wsl::windows::common::registry::ReadString(userKey.get(), nullptr, c_natIpAddress, L"");
}
CATCH_LOG()
CATCH_LOG()
}
// Due to an issue with Global Secure Access Client, do not use DNS tunneling if the service is present.
if (EnableDnsTunneling)
{
try
{
// Open a handle to the service control manager and check if the inbox service is registered.
@ -435,7 +441,8 @@ void wsl::core::Config::Initialize(_In_opt_ HANDLE UserToken)
}
}
}
CATCH_LOG()
CATCH_LOG()
}
// Ensure that settings are consistent (disable features that require other features that are not present).
if (EnableSafeMode)

View File

@ -14,26 +14,25 @@ Abstract:
#pragma once
#define T_SET(c, n) TraceLoggingValue(!(c).n.empty(), "config." #n "Set")
#define T_PRESENT(val, n) TraceLoggingValue(val == ConfigKeyPresence::Present, "config." #n "Set")
#define T_STRING(c, n) TraceLoggingValue(wsl::core::ToString((c).n), "config." #n "String")
#define T_VALUE(c, n) TraceLoggingValue((c).n, "config." #n)
#define T_ENUM(c, n) TraceLoggingValue(wsl::core::ToString((c).n), #n)
#define T_PRESENT(c, n) TraceLoggingValue((c).n == ConfigKeyPresence::Present, #n)
#define T_SET(c, n) TraceLoggingValue(!(c).n.empty(), #n "Set")
#define T_STRING(c, n) TraceLoggingValue((c).n.c_str(), #n)
#define T_VALUE(c, n) TraceLoggingValue((c).n, #n)
#define CONFIG_TELEMETRY(c) \
T_VALUE(c, BestEffortDnsParsing), T_VALUE(c, DhcpTimeout), T_VALUE(c, EnableAutoProxy), T_VALUE(c, EnableDebugConsole), \
T_VALUE(c, EnableDhcp), T_VALUE(c, EnableDnsProxy), T_VALUE(c, EnableDnsTunneling), T_VALUE(c, EnableGpuSupport), \
T_VALUE(c, EnableGuiApps), T_VALUE(c, EnableHardwarePerformanceCounters), T_VALUE(c, EnableHostAddressLoopback), \
T_VALUE(c, EnableHostFileSystemAccess), T_VALUE(c, EnableIpv6), T_SET(c, KernelModulesPath), \
T_VALUE(c, EnableDebugShell), T_VALUE(c, EnableDhcp), T_VALUE(c, EnableDnsProxy), T_VALUE(c, EnableDnsTunneling), \
T_VALUE(c, EnableGpuSupport), T_VALUE(c, EnableGuiApps), T_VALUE(c, EnableHardwarePerformanceCounters), \
T_VALUE(c, EnableHostAddressLoopback), T_VALUE(c, EnableHostFileSystemAccess), T_VALUE(c, EnableIpv6), \
T_VALUE(c, EnableLocalhostRelay), T_VALUE(c, EnableNestedVirtualization), T_VALUE(c, EnableSafeMode), \
T_VALUE(c, EnableSparseVhd), T_VALUE(c, EnableVirtio), T_VALUE(c, EnableVirtio9p), T_VALUE(c, EnableVirtioFs), \
T_STRING(c, FirewallConfigPresence), T_VALUE(c, KernelBootTimeout), T_SET(c, KernelCommandLine), \
T_VALUE(c, KernelDebugPort), T_SET(c, KernelPath), T_PRESENT((c).loadKernelModulesPresence, loadKernelModules), \
T_VALUE(c, LoadDefaultKernelModules), T_STRING(c, MemoryReclaim), T_VALUE(c, MemorySizeBytes), \
T_VALUE(c, MountDeviceTimeout), T_STRING(c, NetworkingMode), T_VALUE(c, ProcessorCount), T_SET(c, SwapFilePath), \
T_VALUE(c, SwapSizeBytes), T_SET(c, SystemDistroPath), T_VALUE(c, VhdSizeBytes), T_VALUE(c, VmIdleTimeout), T_SET(c, VmSwitch)
T_ENUM(c, FirewallConfigPresence), T_VALUE(c, KernelBootTimeout), T_SET(c, KernelCommandLine), \
T_VALUE(c, KernelDebugPort), T_SET(c, KernelModulesPath), T_STRING(c, KernelModulesList), T_SET(c, KernelPath), \
T_VALUE(c, LoadDefaultKernelModules), T_PRESENT(c, LoadKernelModulesPresence), T_VALUE(c, MaximumMemorySizeBytes), \
T_VALUE(c, MaximumProcessorCount), T_ENUM(c, MemoryReclaim), T_VALUE(c, MemorySizeBytes), T_VALUE(c, MountDeviceTimeout), \
T_ENUM(c, NetworkingMode), T_VALUE(c, ProcessorCount), T_SET(c, SwapFilePath), T_VALUE(c, SwapSizeBytes), \
T_SET(c, SystemDistroPath), T_VALUE(c, VhdSizeBytes), T_VALUE(c, VmIdleTimeout), T_SET(c, VmSwitch)
namespace wsl::core {
constexpr auto ToString(ConfigKeyPresence key)
@ -305,11 +304,10 @@ struct Config
void SaveNetworkingSettings(_In_opt_ HANDLE UserToken) const;
static unsigned long WriteConfigFile(_In_ LPCWSTR ConfigFilePath, _In_ ConfigKey KeyToWrite, _In_ bool RemoveKey = false);
// Values set in ParseConfigFile
std::filesystem::path KernelPath;
std::wstring KernelCommandLine;
std::wstring KernelModulesList;
std::filesystem::path KernelModulesPath;
std::vector<std::wstring> KernelModulesList = {L"tun", L"ip_tables", L"br_netfilter"};
UINT64 MemorySizeBytes = 0;
UINT64 MaximumMemorySizeBytes = 0;
int ProcessorCount = 0;
@ -320,7 +318,7 @@ struct Config
std::filesystem::path SwapFilePath;
bool EnableLocalhostRelay = true;
ConfigKeyPresence LocalhostRelayConfigPresence = ConfigKeyPresence::Absent;
ConfigKeyPresence loadKernelModulesPresence = ConfigKeyPresence::Absent;
ConfigKeyPresence LoadKernelModulesPresence = ConfigKeyPresence::Absent;
bool LoadDefaultKernelModules = true;
bool EnableNestedVirtualization = !shared::Arm64 && windows::common::helpers::IsWindows11OrAbove();
bool EnableVirtio9p = false;

View File

@ -71,9 +71,7 @@ void wsl::core::filesystem::CreateVhd(_In_ LPCWSTR target, _In_ ULONGLONG maximu
wil::unique_handle wsl::core::filesystem::OpenVhd(_In_ LPCWSTR Path, _In_ VIRTUAL_DISK_ACCESS_MASK Mask)
{
WI_ASSERT(
wsl::shared::string::IsEqual(std::filesystem::path{Path}.extension().c_str(), windows::common::wslutil::c_vhdFileExtension, true) ||
wsl::shared::string::IsEqual(std::filesystem::path{Path}.extension().c_str(), windows::common::wslutil::c_vhdxFileExtension, true));
WI_ASSERT(wsl::windows::common::wslutil::IsVhdFile(std::filesystem::path{Path}));
// N.B. Specifying unknown for device and vendor means the system will determine the type of VHD.
VIRTUAL_STORAGE_TYPE storageType{};

View File

@ -248,3 +248,25 @@ wsl::core::networking::EphemeralHcnEndpoint wsl::core::networking::CreateEphemer
return endpoint;
}
std::optional<ULONG> wsl::core::networking::GetMinimumConnectedInterfaceMtu() noexcept
{
std::optional<ULONG> minMtu{};
try
{
unique_interface_table interfaceTable{};
THROW_IF_WIN32_ERROR(::GetIpInterfaceTable(AF_UNSPEC, &interfaceTable));
for (ULONG index = 0; index < interfaceTable.get()->NumEntries; index++)
{
const auto& ipInterface = interfaceTable.get()->Table[index];
if (ipInterface.Connected)
{
minMtu = std::min(minMtu.value_or(ipInterface.NlMtu), ipInterface.NlMtu);
}
}
}
CATCH_LOG()
return minMtu;
}

View File

@ -456,6 +456,11 @@ std::vector<wsl::core::networking::CurrentInterfaceInformation> EnumerateConnect
bool IsMetered(ABI::Windows::Networking::Connectivity::NetworkCostType cost) noexcept;
/// <summary>
/// Gets the minimum MTU across all connected network interfaces.
/// </summary>
std::optional<ULONG> GetMinimumConnectedInterfaceMtu() noexcept;
/// <summary>
/// This instance acts as an IP_ADAPTER_ADDRESS pointer.
/// </summary>

View File

@ -39,15 +39,17 @@ void InitializeWildcardSocketAddress(_Out_ PSOCKADDR_HV Address)
}
} // namespace
wil::unique_socket wsl::windows::common::hvsocket::Accept(_In_ SOCKET ListenSocket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle)
wil::unique_socket wsl::windows::common::hvsocket::Accept(
_In_ SOCKET ListenSocket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle, _In_ const std::source_location& Location)
{
wil::unique_socket Socket = Create();
wsl::windows::common::socket::Accept(ListenSocket, Socket.get(), Timeout, ExitHandle);
wsl::windows::common::socket::Accept(ListenSocket, Socket.get(), Timeout, ExitHandle, Location);
return Socket;
}
wil::unique_socket wsl::windows::common::hvsocket::Connect(_In_ const GUID& VmId, _In_ unsigned long Port, _In_opt_ HANDLE ExitHandle)
wil::unique_socket wsl::windows::common::hvsocket::Connect(
_In_ const GUID& VmId, _In_ unsigned long Port, _In_opt_ HANDLE ExitHandle, _In_ const std::source_location& Location)
{
OVERLAPPED Overlapped{};
const wil::unique_event OverlappedEvent(wil::EventOptions::ManualReset);
@ -71,7 +73,7 @@ wil::unique_socket wsl::windows::common::hvsocket::Connect(_In_ const GUID& VmId
if (Result != 0)
{
socket::GetResult(Socket.get(), Overlapped, INFINITE, ExitHandle);
socket::GetResult(Socket.get(), Overlapped, INFINITE, ExitHandle, Location);
}
ULONG Timeout = CONNECT_TIMEOUT;
@ -86,7 +88,7 @@ wil::unique_socket wsl::windows::common::hvsocket::Connect(_In_ const GUID& VmId
const BOOL Success = ConnectFn(Socket.get(), reinterpret_cast<sockaddr*>(&Addr), sizeof(Addr), nullptr, 0, nullptr, &Overlapped);
if (Success == FALSE)
{
socket::GetResult(Socket.get(), Overlapped, INFINITE, ExitHandle);
socket::GetResult(Socket.get(), Overlapped, INFINITE, ExitHandle, Location);
}
return Socket;

View File

@ -19,9 +19,17 @@ Abstract:
namespace wsl::windows::common::hvsocket {
wil::unique_socket Accept(_In_ SOCKET ListenSocket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle = nullptr);
wil::unique_socket Accept(
_In_ SOCKET ListenSocket,
_In_ int Timeout,
_In_opt_ HANDLE ExitHandle = nullptr,
const std::source_location& Location = std::source_location::current());
wil::unique_socket Connect(_In_ const GUID& VmId, _In_ unsigned long Port, _In_opt_ HANDLE ExitHandle = nullptr);
wil::unique_socket Connect(
_In_ const GUID& VmId,
_In_ unsigned long Port,
_In_opt_ HANDLE ExitHandle = nullptr,
const std::source_location& Location = std::source_location::current());
wil::unique_socket Create();

View File

@ -17,7 +17,8 @@ Abstract:
#include "socket.hpp"
#pragma hdrstop
void wsl::windows::common::socket::Accept(_In_ SOCKET ListenSocket, _In_ SOCKET Socket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle)
void wsl::windows::common::socket::Accept(
_In_ SOCKET ListenSocket, _In_ SOCKET Socket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle, _In_ const std::source_location& Location)
{
CHAR AcceptBuffer[2 * sizeof(SOCKADDR_STORAGE)]{};
DWORD BytesReturned;
@ -29,17 +30,20 @@ void wsl::windows::common::socket::Accept(_In_ SOCKET ListenSocket, _In_ SOCKET
if (!Success)
{
GetResult(ListenSocket, Overlapped, Timeout, ExitHandle);
GetResult(ListenSocket, Overlapped, Timeout, ExitHandle, Location);
}
// Set the accept context to mark the socket as connected.
THROW_LAST_ERROR_IF(
setsockopt(Socket, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, reinterpret_cast<char*>(&ListenSocket), sizeof(ListenSocket)) == SOCKET_ERROR);
THROW_LAST_ERROR_IF_MSG(
setsockopt(Socket, SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT, reinterpret_cast<char*>(&ListenSocket), sizeof(ListenSocket)) == SOCKET_ERROR,
"From: %hs",
std::format("{}", Location).c_str());
return;
}
std::pair<DWORD, DWORD> wsl::windows::common::socket::GetResult(_In_ SOCKET Socket, _In_ OVERLAPPED& Overlapped, _In_ DWORD Timeout, _In_ HANDLE ExitHandle)
std::pair<DWORD, DWORD> wsl::windows::common::socket::GetResult(
_In_ SOCKET Socket, _In_ OVERLAPPED& Overlapped, _In_ DWORD Timeout, _In_ HANDLE ExitHandle, _In_ const std::source_location& Location)
{
const int error = WSAGetLastError();
THROW_HR_IF(HRESULT_FROM_WIN32(error), error != WSA_IO_PENDING);
@ -64,7 +68,7 @@ std::pair<DWORD, DWORD> wsl::windows::common::socket::GetResult(_In_ SOCKET Sock
return {0, 0};
}
THROW_HR_IF(HCS_E_CONNECTION_TIMEOUT, (waitStatus != WAIT_OBJECT_0));
THROW_HR_IF_MSG(HCS_E_CONNECTION_TIMEOUT, (waitStatus != WAIT_OBJECT_0), "From: %hs", std::format("{}", Location).c_str());
cancelFunction.release();
const bool result = WSAGetOverlappedResult(Socket, &Overlapped, &bytesProcessed, FALSE, &flagsReturned);
@ -83,16 +87,17 @@ std::pair<DWORD, DWORD> wsl::windows::common::socket::GetResult(_In_ SOCKET Sock
return {bytesProcessed, flagsReturned};
}
int wsl::windows::common::socket::Receive(_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle, _In_ DWORD Flags, _In_ DWORD Timeout)
int wsl::windows::common::socket::Receive(
_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle, _In_ DWORD Flags, _In_ DWORD Timeout, _In_ const std::source_location& Location)
{
const int BytesRead = ReceiveNoThrow(Socket, Buffer, ExitHandle, Flags, Timeout);
const int BytesRead = ReceiveNoThrow(Socket, Buffer, ExitHandle, Flags, Timeout, Location);
THROW_LAST_ERROR_IF(BytesRead == SOCKET_ERROR);
return BytesRead;
}
int wsl::windows::common::socket::ReceiveNoThrow(
_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle, _In_ DWORD Flags, _In_ DWORD Timeout)
_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle, _In_ DWORD Flags, _In_ DWORD Timeout, _In_ const std::source_location& Location)
{
OVERLAPPED Overlapped{};
const wil::unique_event OverlappedEvent(wil::EventOptions::ManualReset);
@ -100,10 +105,11 @@ int wsl::windows::common::socket::ReceiveNoThrow(
Overlapped.hEvent = OverlappedEvent.get();
DWORD BytesReturned{};
if (WSARecv(Socket, &VectorBuffer, 1, &BytesReturned, &Flags, &Overlapped, nullptr) != 0)
{
try
{
BytesReturned = SOCKET_ERROR;
auto [innerBytes, Flags] = GetResult(Socket, Overlapped, Timeout, ExitHandle);
auto [innerBytes, Flags] = GetResult(Socket, Overlapped, Timeout, ExitHandle, Location);
BytesReturned = innerBytes;
}
catch (...)
@ -112,37 +118,65 @@ int wsl::windows::common::socket::ReceiveNoThrow(
// Receive will call GetLastError to look for the error code
SetLastError(wil::ResultFromCaughtException());
}
}
return BytesReturned;
}
std::vector<gsl::byte> wsl::windows::common::socket::Receive(_In_ SOCKET Socket, _In_opt_ HANDLE ExitHandle, _In_ DWORD Timeout)
std::vector<gsl::byte> wsl::windows::common::socket::Receive(
_In_ SOCKET Socket, _In_opt_ HANDLE ExitHandle, _In_ DWORD Timeout, _In_ const std::source_location& Location)
{
Receive(Socket, {}, ExitHandle, MSG_PEEK);
Receive(Socket, {}, ExitHandle, MSG_PEEK, Timeout, Location);
ULONG Size = 0;
THROW_LAST_ERROR_IF(ioctlsocket(Socket, FIONREAD, &Size) == SOCKET_ERROR);
std::vector<gsl::byte> Buffer(Size);
WI_VERIFY(Receive(Socket, gsl::make_span(Buffer), ExitHandle, Timeout) == static_cast<int>(Size));
WI_VERIFY(Receive(Socket, gsl::make_span(Buffer), ExitHandle, MSG_WAITALL, Timeout, Location) == static_cast<int>(Size));
return Buffer;
}
int wsl::windows::common::socket::Send(_In_ SOCKET Socket, _In_ gsl::span<const gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle)
int wsl::windows::common::socket::Send(
_In_ SOCKET Socket, _In_ gsl::span<const gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle, _In_ const std::source_location& Location)
{
OVERLAPPED Overlapped{};
const wil::unique_event OverlappedEvent(wil::EventOptions::ManualReset);
WSABUF VectorBuffer = {gsl::narrow_cast<ULONG>(Buffer.size()), const_cast<CHAR*>(reinterpret_cast<const CHAR*>(Buffer.data()))};
OVERLAPPED Overlapped{};
Overlapped.hEvent = OverlappedEvent.get();
DWORD BytesWritten{};
if (WSASend(Socket, &VectorBuffer, 1, &BytesWritten, 0, &Overlapped, nullptr) != 0)
DWORD Offset = 0;
while (Offset < Buffer.size())
{
DWORD Flags;
std::tie(BytesWritten, Flags) = GetResult(Socket, Overlapped, INFINITE, ExitHandle);
OverlappedEvent.ResetEvent();
WSABUF VectorBuffer = {
gsl::narrow_cast<ULONG>(Buffer.size() - Offset), const_cast<CHAR*>(reinterpret_cast<const CHAR*>(Buffer.data() + Offset))};
DWORD BytesWritten{};
if (WSASend(Socket, &VectorBuffer, 1, &BytesWritten, 0, &Overlapped, nullptr) != 0)
{
// If WSASend returns non-zero, expect WSA_IO_PENDING.
if (auto error = WSAGetLastError(); error != WSA_IO_PENDING)
{
THROW_WIN32_MSG(error, "WSASend failed. From: %hs", std::format("{}", Location).c_str());
}
DWORD Flags;
std::tie(BytesWritten, Flags) = GetResult(Socket, Overlapped, INFINITE, ExitHandle, Location);
if (BytesWritten == 0)
{
THROW_WIN32_MSG(ERROR_CONNECTION_ABORTED, "Socket closed during WSASend(). From: %hs", std::format("{}", Location).c_str());
}
}
Offset += BytesWritten;
if (Offset < Buffer.size())
{
WSL_LOG("PartialSocketWrite", TraceLoggingValue(Buffer.size(), "MessagSize"), TraceLoggingValue(Offset, "Offset"));
}
}
WI_ASSERT(BytesWritten == gsl::narrow_cast<DWORD>(Buffer.size()));
WI_ASSERT(Offset == gsl::narrow_cast<DWORD>(Buffer.size()));
return BytesWritten;
return Offset;
}

View File

@ -18,16 +18,42 @@ Abstract:
namespace wsl::windows::common::socket {
void Accept(_In_ SOCKET ListenSocket, _In_ SOCKET Socket, _In_ int Timeout, _In_opt_ HANDLE ExitHandle);
void Accept(
_In_ SOCKET ListenSocket,
_In_ SOCKET Socket,
_In_ int Timeout,
_In_opt_ HANDLE ExitHandle,
_In_ const std::source_location& Location = std::source_location::current());
std::pair<DWORD, DWORD> GetResult(_In_ SOCKET Socket, _In_ OVERLAPPED& Overlapped, _In_ DWORD Timeout, _In_ HANDLE ExitHandle);
std::pair<DWORD, DWORD> GetResult(
_In_ SOCKET Socket, _In_ OVERLAPPED& Overlapped, _In_ DWORD Timeout, _In_ HANDLE ExitHandle, _In_ const std::source_location& Location);
int Receive(_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle = nullptr, _In_ DWORD Flags = MSG_WAITALL, _In_ DWORD Timeout = INFINITE);
int Receive(
_In_ SOCKET Socket,
_In_ gsl::span<gsl::byte> Buffer,
_In_opt_ HANDLE ExitHandle = nullptr,
_In_ DWORD Flags = MSG_WAITALL,
_In_ DWORD Timeout = INFINITE,
_In_ const std::source_location& Location = std::source_location::current());
std::vector<gsl::byte> Receive(_In_ SOCKET Socket, _In_opt_ HANDLE ExitHandle = nullptr, _In_ DWORD Timeout = INFINITE);
std::vector<gsl::byte> Receive(
_In_ SOCKET Socket,
_In_opt_ HANDLE ExitHandle = nullptr,
_In_ DWORD Timeout = INFINITE,
_In_ const std::source_location& Location = std::source_location::current());
int ReceiveNoThrow(_In_ SOCKET Socket, _In_ gsl::span<gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle = nullptr, _In_ DWORD Flags = MSG_WAITALL, _In_ DWORD Timeout = INFINITE);
int ReceiveNoThrow(
_In_ SOCKET Socket,
_In_ gsl::span<gsl::byte> Buffer,
_In_opt_ HANDLE ExitHandle = nullptr,
_In_ DWORD Flags = MSG_WAITALL,
_In_ DWORD Timeout = INFINITE,
_In_ const std::source_location& Location = std::source_location::current());
int Send(_In_ SOCKET Socket, _In_ gsl::span<const gsl::byte> Buffer, _In_opt_ HANDLE ExitHandle = nullptr);
int Send(
_In_ SOCKET Socket,
_In_ gsl::span<const gsl::byte> Buffer,
_In_opt_ HANDLE ExitHandle = nullptr,
_In_ const std::source_location& Location = std::source_location::current());
} // namespace wsl::windows::common::socket

Some files were not shown because too many files have changed in this diff Show More