RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
openstackswift做glance后端存储

在controller里操作

成都创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站制作、成都做网站、卫辉网络推广、微信平台小程序开发、卫辉网络营销、卫辉企业策划、卫辉品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联公司为所有大学生创业者提供卫辉建站搭建服务,24小时服务热线:18980820575,官方网址:www.cdcxhl.com

vim /etc/glance/glance-api.conf

[glance_store]

default_store = swift          默认为file 改为swift

stores = file, http                默认不用动

swift_store_auth_version = 2        默认版本为2

stores=glance.store.swift.Store,glance.store.filesystem.Store      此项一定要加上,不然无法上传

swift_store_auth_address = http://controller:5000/v2.0    controller的keystone认证

swift_store_user = service:swift    使用swift用户

swift_store_key = swift        密码

swift_store_container = glance        将要被创建的容器

swift_store_create_container_on_put = True        上传开

swift_store_large_object_size = 5120        最大5G限制,但与glance结合后限制无效

swift_store_large_object_chunk_size = 200        最大200个容器

swift_enable_snet = False

systemctl restart openstack-glance-api

编辑变量,用租户账号密码

vim /root/opensr

export OS_USERNAME=BPM
export OS_PASSWORD=pwd4bpm
export OS_TENANT_NAME=BPM
export OS_AUTH_URL=http://controller:5000/v2.0
export OS_REGION_NAME=RegionOne
export OS_VOLUME_API_VERSION=2

export OS_IMAGE_API_VERSION=1

source /root/opensr

export 验证环境变量

测试。

比如/home下有个做好的img或qcwo2镜像

glance p_w_picpath-create --name "Windows-7-Ultimate-2014.11.19" --file Windows-7-Ultimate-2014.11.19.img --disk-format qcow2 --container-format bare --is-public True --progress

[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 777c159ca66db6dc2ae56c683607651d     |
| container_format | bare                                 |
| created_at       | 2015-10-20T06:29:30.899474           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 82676cbe-414f-4c7a-a45b-c4c70aecfde3 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | Windows-7-Ultimate-2014.11.19        |
| owner            | d5ed6aee0eae4609a3baa3c4d08e0e64     |
| protected        | False                                |
| size             | 32212254720                          |
| status           | active                               |
| updated_at       | 2015-10-20T06:36:54.885922           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

glance p_w_picpath-list 查看镜像

接下来启虚机,做快照。测试。


文章题目:openstackswift做glance后端存储
网站URL:http://sczitong.cn/article/pejeee.html