Make --install-from-img take no file; derive it from the ISO path

--install-from-img now works like --install-from-iso: the installation
media is the ISO path (WIN11_VM_INSTALL_ISO or the downloader's) with
.install.img in place of .iso, which is where
build-windows-install-disk.sh writes it by default. Drop the FILE argument
and WIN11_VM_INSTALL_IMG.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-18 14:24:09 +08:00
1 parent 69dcfe1d9f
commit b26286c820
2 files changed
+24 -28

No files matched your search

+5 -4
View File
@@ -8,7 +8,7 @@
- 慢的原因是**安装介质走了模拟的 USB 光驱**(`usb-storage` 挂 ISO):读安装文件平均只有约 4 MB/s。
- 把安装介质改成**FAT32 分区里的 NVMe 磁盘镜像**(`install.wim` 拆成 `.swm`)后,读速达到 54 到 92 MB/s
(前 7 个采样平均约 74 MB/s),安装在约 80 秒内到 40%,复制阶段约 2 分钟结束。
- 方案已接进 `run-windows11.py`:`--install-from-img FILE`,镜像由 `vm-images/build-windows-install-disk.sh` 生成。
- 方案已接进 `run-windows11.py`:`--install-from-img`,镜像由 `vm-images/build-windows-install-disk.sh` 生成。
## 环境
@@ -100,11 +100,12 @@ vm-images/build-windows-install-disk.sh [--force] ISO [OUTPUT.img]
### 启动方式
`run-windows11.py` 的 `--install-from-img FILE`(或环境变量 `WIN11_VM_INSTALL_IMG`)用这个镜像做安装介质,隐含 `--install-from-iso`,
此时不再需要找 ISO:
`run-windows11.py` 的 `--install-from-img` 用这个镜像做安装介质,隐含 `--install-from-iso`。镜像路径是 ISO 路径
(`WIN11_VM_INSTALL_ISO` 或自动查找到的 ISO)把 `.iso` 换成 `.install.img`,也就是 `build-windows-install-disk.sh ISO` 默认生成的位置,
此时不再读取 ISO:
```bash
./run-windows11.py --install-from-img vm-images/install-iso/Windows11_Client_arm64_en-us_26300_9457.install.img
./run-windows11.py --install-from-img
```
`install_media` 不再作为 `usb-storage` 光驱,而是: