wsl --import-in-place 有什么作用?

wsl --import-in-place 有什么作用?

表面上看,wsl --import-in-place <Distribution Name> <FileName>记录在这里

将指定的 .vhdx 文件导入为新分发。虚拟硬盘必须格式化为 ext4 文件系统类型。

wsl --import <Distribution Name> <InstallLocation> <FileName> --vhd已经可以做到这一点 — — 我看到的唯一区别是--import需要一个<InstallLocation>

和 有什么wsl --import-in-place不同--import

答案1

当你导入发行版时,WSL 会将驱动器复制到InstallLocation/ext4.vhdx。如果此文件已存在,这可能会导致冲突。

为了避免冲突,使用import-in-place创建一个新的发行版,该发行版不会与任何现有发行版在磁盘上发生冲突。

相关内容