如何修复 lxd 'Failed container creation: No storage pool found. Please create a new storage pool.'
问题:
你想使用 lxc launch […] 启动一些 lxd 容器,但你收到以下错误消息:
lxd_no_storage_example.txt
Failed container creation: No storage pool found. Please create a new storage pool.解决方案
你需要在使用的初始化 lxd:
lxd_init.sh
lxd init当它询问你后端时
lxd_init_storage_prompt.txt
Name of the storage backend to use (btrfs, dir, lvm) [default=btrfs]:选择默认选项(btrfs)意味着你必须使用专用块设备(或专用预分配文件映像)进行存储。虽然如果你同时运行多个容器这更高效,但我建议为默认存储池选择 dir 后端,因为该选项最容易配置,并且不会占用硬盘上那么多空间。
请参见 lxd 中的存储管理了解更多详情,包括存储池的不同选项,以防你需要更高级的设置。
Check out similar posts by category:
Linux, LXC, Virtualization
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow