无法启动分发。错误代码: 16,失败步骤: 2 错误代码: Wsl/Service/CreateInstance/E_FAIL
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [版本 10.0.26100.7462]
### WSL Version
WSL 版本: 2.6.3.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
Linux version 6.6.87.2-microsoft-standard-WSL2 (root@439a258ad544) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025
### Distro Version
Ubuntu 24.04
### Other Software
_No response_
### Repro Steps
我在尝试实现[Open-AutoGLM](https://github.com/zai-org/Open-AutoGLM/)中的“如果用户选择选项 B(本地部署模型)”,使用wsl部署,执行的命令如下,能成功部署,再对服务进行ctrl+C 中断和不关闭服务的两种情况下,我使用了“wsl --shutdown” 或者是在linux中“ shutdown”之后再执行`wsl -d Ubuntu`均会出现
```
(base) PS E:\> wsl -d Ubuntu
无法启动分发。错误代码: 16,失败步骤: 2
错误代码: Wsl/Service/CreateInstance/E_FAIL
```
具体的安装linux 中项目安装
```pwsh
wsl --unregister Ubuntu
cd E:
wsl --import Ubuntu E:\WSL\Ubuntu2404 E:\ubuntu-24.04.3-wsl-amd64.gz --version 2
wsl -d Ubuntu
```
``` bash
mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm ~/miniconda3/miniconda.sh
```
``` bash
source ~/miniconda3/bin/activate
conda init bash
```
```bash
conda create -n autoGLM python=3.11 -y
conda activate autoGLM
cd /mnt/d/GLM/Open-AutoGLM
pip install torch==2.9.0 torchvision==0.24.0 torchaudio==2.9.0 --index-url https://download.pytorch.org/whl/cu128
pip3 install -r requirements.txt
pip3 install -e .
pip install -U transformers
```
```bash
apt update
apt install -y build-essential
apt install net-tools
netstat -tulpn
```
```bash
python3 -m vllm.entrypoints.openai.api_server \
--served-model-name autoglm-phone-9b \
--allowed-local-media-path / \
--mm-encoder-tp-mode data \
--mm_processor_cache_type shm \
--mm_processor_kwargs "{\"max_pixels\":5000000}" \
--max-model-len 25480 \
--chat-template-content-format string \
--limit-mm-per-prompt "{\"image\":10}" \
--model zai-org/AutoGLM-Phone-9B \
--host 0.0.0.0 \
--port 5050
```
### Expected Behavior
我能正确的启动wsl,而不是每次都要重新安装机器学习环境。
### Actual Behavior
[WslLogs-2026-01-10_02-34-42.zip](https://github.com/user-attachments/files/24533701/WslLogs-2026-01-10_02-34-42.zip)
### Diagnostic Logs
_No response_
Contributor guide
Research direction
Start by reviewing WslLogs-2026-01-10_02-34-42.zip and the reproduction commands using `wsl --shutdown` followed by `wsl -d Ubuntu`. Compare the behavior after importing the Ubuntu 24.04 distribution and running the Open-AutoGLM service. Done means the existing WSL installation starts normally without reinstalling its machine-learning environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100