表面上,wsl --import-in-place <Distribution Name> <FileName>
记录在这里:
将指定的 .vhdx 文件导入为新发行版。虚拟硬盘必须格式化为 ext4 文件系统类型。
wsl --import <Distribution Name> <InstallLocation> <FileName> --vhd
已经可以做到这一点 - 我看到的唯一区别是--import
需要<InstallLocation>
.
做什么wsl --import-in-place
(与 不同--import
)?
当您导入发行版时,WSL 会将驱动器复制到
InstallLocation/ext4.vhdx
. 如果该文件已存在,这可能会导致冲突。为了避免冲突,使用
import-in-place
创建一个新的发行版,该发行版不会与磁盘上任何现有发行版发生冲突。