您好,登錄后才能下訂單哦!
在controller里操作
vim /etc/glance/glance-api.conf
[glance_store]
default_store = swift 默認(rèn)為file 改為swift
stores = file, http 默認(rèn)不用動(dòng)
swift_store_auth_version = 2 默認(rèn)版本為2
stores=glance.store.swift.Store,glance.store.filesystem.Store 此項(xiàng)一定要加上,不然無法上傳
swift_store_auth_address = http://controller:5000/v2.0 controller的keystone認(rèn)證
swift_store_user = service:swift 使用swift用戶
swift_store_key = swift 密碼
swift_store_container = glance 將要被創(chuàng)建的容器
swift_store_create_container_on_put = True 上傳開
swift_store_large_object_size = 5120 最大5G限制,但與glance結(jié)合后限制無效
swift_store_large_object_chunk_size = 200 最大200個(gè)容器
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 驗(yàn)證環(huán)境變量
測試。
比如/home下有個(gè)做好的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 查看鏡像
接下來啟虛機(jī),做快照。測試。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。