侧边栏壁纸

glance 使用 cinder 作为后端存储

  • admin 2023年07月13日 467阅读 0评论
  • 要使 Glance 使用 Cinder 作为后端存储需要进行以下操作:

    配置 Glance

    打开 Glance 配置文件 /etc/glance/glance-api.conf 并进行以下修改:

    [glance_store]
    default_store = cinder

    保存并关闭文件。

    创建 Cinder 卷并上传镜像
    首先,创建一个 Cinder 卷,命名为 cirros-cinder:

    openstack volume create --size 5 cirros-cinder

    然后,下载 cirros-0.3.4-x86_64-disk.img 文件并上传为 Glance 镜像,使用 cirros-image 作为镜像名称:

    wget https://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
    openstack image create --file cirros-0.3.4-x86_64-disk.img --container-format bare --disk-format qcow2 cirros-image

    启动使用 Cinder 卷的虚拟机

    通过 Cinder 卷启动一个使用 cirros-image 镜像的虚拟机:

    openstack server create --flavor <flavor> --volume cirros-cinder --image cirros-image cirros-instance

    0
    打赏

    —— 评论区 ——

    昵称
    邮箱
    网址
    取消
    人生倒计时
    最新评论
    舔狗日记