如何修复 Incus 错误:Failed detecting root disk device: No root device could be found
问题
当你尝试使用 Incus 启动容器时,你看到如下错误消息
incus_error.txt
Launching my-opensuse
Error: Failed instance creation: Failed creating instance record: Failed initializing instance: Invalid devices: Failed detecting root disk device: No root device could be found解决方案
你使用 incus admin init 初始化了 Incus,它使用 btrfs 作为默认存储后端。虽然这对生产应用是合理的选择,但正确设置可能有点棘手,因为你需要手动配置 BTRFS 回环设备。
相反,我建议使用 dir 存储后端用于测试和轻度生产目的。
要使用 dir 存储后端重新初始化 Incus,运行以下命令:
reinit_incus_dir.sh
incus storage delete default
incus admin init --auto --storage-backend dir现在,重试运行 inucs launch ...,它应该按预期工作。
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow