You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行LXC launch命令报错:Failed instance creation问题求助

LXC启动实例报错"No root device could be found"的解决办法

我执行以下LXC命令尝试创建实例:

ros@ros-Virtualbox:/$ sudo lxc launch -p row ubuntu:20.04 turtlebot
Creating turtlebot

Error: Failed instance creation: Failed creating instance record: Failed initialising instance: Failed getting root disk: No root device could be found

已确认LXC已安装,尝试过使用ubuntu而非ubuntu:20.04,但问题依旧,需要解决办法。


排查解决步骤:

  • 检查自定义配置文件row的存储设置
    你指定了-p row自定义配置文件,大概率是该配置的存储项出错。执行命令查看配置详情:

    sudo lxc profile show row
    

    重点看devices区块,正常的根磁盘配置应包含存储池指定,示例如下:

    devices:
      root:
        path: /
        pool: default
        type: disk
    

    如果缺少pool项,或者pool名称对应的存储池不存在,就会触发根设备找不到的错误。

  • 确认存储池存在且可用
    执行命令查看当前LXC存储池列表:

    sudo lxc storage list
    

    若没有可用存储池,创建一个默认的目录型存储池:

    sudo lxc storage create default dir
    

    若已有存储池,确保配置文件row里的pool名称和实际存在的存储池名称一致。

  • 用默认配置测试实例创建
    暂时跳过自定义配置,用默认配置启动测试实例:

    sudo lxc launch ubuntu:20.04 turtlebot-test
    

    如果这个命令能成功,说明问题确实出在row配置文件上,回到第一步修正即可。

  • 检查虚拟机内的存储驱动兼容性
    因为是在VirtualBox虚拟机中运行LXC,要确保存储驱动兼容。查看当前LXC使用的存储后端:

    sudo lxc info | grep "Storage backend"
    

    推荐使用dir或zfs(系统支持的话),避免使用在虚拟机环境中兼容性差的驱动。

内容的提问来源于stack exchange,提问作者Alex

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.08 12:10:21