Windows Version
10.0.19045.7291
WSL Version
2.7.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
6.6.114.1-microsoft-standard-WSL2
Distro Version
Ubuntu-24.04
Other Software
No response
Repro Steps
- On a Windows 10 machine with ≥512GB RAM and Hyper-V enabled:
/ 在拥有 ≥512GB 内存且启用 Hyper-V 的 Windows 10 机器上:
wsl --import Ubuntu-24.04 D:\wsl D:\ubuntu.tar --version 2
wsl --import Ubuntu-24.04 D:\wsl D:\ubuntu.tar --version 1
### Expected Behavior
installation success for both cases
### Actual Behavior
for wsl2:
Wsl/Service/RegisterDistro/CreateVm/HCS/E_INVALIDARG
for wsl1, installation success
### Diagnostic Logs
VirtualMachinePlatform: Enabled
Microsoft-Hyper-V-All: Enabled
HypervisorPlatform: Disabled
When importing a WSL2 distribution on a Windows 10 Pro machine with 524GB of RAM and 2 CPUs, the import operation fails with:
> Wsl/Service/RegisterDistro/CreateVm/HCS/E_INVALIDARG
The error does not occur if `.wslconfig` is explicitly configured
with a reasonable memory limit.
在拥有 524GB 内存和 2 个 CPU 的 Windows 10 Pro 机器上导入 WSL2 发行版时,导入操作失败,错误信息为上述 `E_INVALIDARG`。当显式地在 `.wslconfig` 中配置合理的内存限制后,错误消失。
**.wslconfig**
```ini
[wsl2]
memory=64GB
processors=64
swap=8GB
localhostForwarding=true
Windows Version
10.0.19045.7291
WSL Version
2.7.3.0
Are you using WSL 1 or WSL 2?
Kernel Version
6.6.114.1-microsoft-standard-WSL2
Distro Version
Ubuntu-24.04
Other Software
No response
Repro Steps
/ 在拥有 ≥512GB 内存且启用 Hyper-V 的 Windows 10 机器上:
VirtualMachinePlatform: Enabled
Microsoft-Hyper-V-All: Enabled
HypervisorPlatform: Disabled