在Ubuntu 20.04.6中使用LXD部署Windows 11虚拟机时,distrobuilder重打包ISO后提示文件不存在求助
Hi Mohamed, let's troubleshoot this issue step by step. From the logs you shared, the repacking process seems to complete most of its work (writing 5820 MB of extents) but fails to deliver the final Win11.lxd.iso file. Here are some common fixes and checks to try:
Check working directory permissions
Make sure you're running the command from a directory where the root user has write access. Restricted folders (like a regular user's home directory without root privileges) might block distrobuilder from saving the output file. Runpwdto confirm your current directory, then check permissions withls -ld .. If needed, switch to a open directory like/tmpand retry the command.Prevent premature cache cleanup
The log shows distrobuilder removes the cache directory after repacking. Sometimes a race condition or minor finalization error can cause the output ISO to get deleted along with the cache. Try using a custom cache directory to retain files longer:distrobuilder repack-windows --cache-dir /tmp/my-distrobuilder-cache Downloads/Win11.iso Win11.lxd.isoAfter running, check both your current directory and the custom cache folder for the ISO.
Enable verbose logging for hidden errors
The truncated log might miss subtle issues during driver integration or ISO finalization. Run the command with verbose mode to capture full details:distrobuilder repack-windows -v Downloads/Win11.iso Win11.lxd.isoLook for lines mentioning "error" or "failed"—these will likely point to why the final file isn't being created.
Validate the source Windows ISO
A corrupted or incomplete ISO can cause silent failures at the end of repacking. Verify its checksum against Microsoft's official published hash to confirm it's intact.Update distrobuilder to the latest version
Older versions might have bugs that cause this issue. If you installed via snap:sudo snap refresh distrobuilderIf installed via apt:
sudo apt update && sudo apt upgrade distrobuilder
Let me know if you find the missing ISO or spot any new error messages after trying these steps—it'll help narrow things down further!
备注:内容来源于stack exchange,提问作者Mohamed Mbarki

