我想将用New-VHD -Path "H:\comfyui\ComfyUI.vhdx" -SizeBytes 1000GB -Dynamic
vhdx 磁盘制作的原始文件挂载到 WSL2(ubuntu-22.04)中,我尝试过:
如何在 lubuntu 中挂载 .vhdx 映像
(示例 2 也引发了该错误。)但我收到此错误:
/mnt/h/comfyui$ sudo guestmount --add ComfyUI.vhdx -i --rw /mnt/ComfyUI
libguestfs: error: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again. For further information, read:
http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.
所以这不管用。我也试过直接用以下命令挂载它:wsl --mount "H:\comfyui\ComfyUI.vhdx" --type ext4
,但同样不行。我也不知道如何在 Windows 上格式化为 ext4,所以我不知道我以为它会起作用。也不-type raw
管用。我还向 chatgpt 寻求帮助,在反复尝试之后,wsl --mount
我不确定这是否重要,但我有一个 Docker 桌面,可以挂载它的东西:Docker off:
sda 8:0 0 388.4M 1 disk
sdb 8:16 0 8G 0 disk [SWAP]
sdc 8:32 0 1T 0 disk /mnt/wslg/distro
Docker 上:
loop0 7:0 0 531.9M 1 loop /mnt/wsl/docker-desktop/cli-tools
loop1 7:1 0 625M 1 loop
sda 8:0 0 388.4M 1 disk
sdb 8:16 0 8G 0 disk [SWAP]
sdc 8:32 0 1T 0 disk /mnt/wslg/distro
/
sdd 8:48 0 1T 0 disk /mnt/wsl/docker-desktop/docker-desktop-user-distro
sde 8:64 0 1T 0 disk
如果我需要添加任何日志,请告诉我!提前谢谢!
重复使用(并进行了一些更新)我对这个主题的大部分超级用户回答...
如果可能的话,最好重新启动 Windows,以确保一切处于正确的“状态”。
您已经创建了
H:\comfyui\ComfyUI.vhdx
- 太棒了。你需要获得它的所有权。在管理员 CMD 或 PowerShell 中,运行:
感谢这位超级用户的回答
启动你的 Ubuntu 发行版并运行:
记下存在的设备。
在 WSL 中安装驱动器(您可以从 Ubuntu 内部执行此操作):
再次列出块设备以找到新块设备的名称:
就我而言,新的
sde
是新安装的设备。格式化驱动器 - 将其替换
<device>
为新设备的名称。请记住,这是一个破坏性且不可恢复的操作,因此请确保操作正确:从 WSL 卸载该设备。请注意,该设备尚未/当前尚未在 Ubuntu 中安装:
在 WSL 和 Ubuntu 中重新挂载为命名驱动器:
该驱动器应已成功安装并可供使用: