Skip to content

Wsl/Service/RegisterDistro/CreateVm/HCS/E_INVALIDARG error during import on high-spec server (512GB RAM, Dual-Socket CPU)/在高配置物理服务器(双路 CPU,512GB 内存)上使用 wsl --import 导入发行版时,系统报错:Wsl/Service/RegisterDistro/CreateVm/HCS/E_INVALIDARG #40605

@Robert-Descartes

Description

@Robert-Descartes

Windows Version

10.0.19045.7291

WSL Version

2.7.3.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.114.1-microsoft-standard-WSL2

Distro Version

Ubuntu-24.04

Other Software

No response

Repro Steps

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions