openstack swift做glance后端存储
在controller里操作 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.0controller的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_IMAGE_API_VERSION=1 source /root/opensr export 验证环境变量 测试。 比如/home下有个做好的img或qcwo2镜像 glance image-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% 接下来启虚机,做快照。测试。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |