glance 使用http作为location的样式

在/etc/glance/glance-api.conf中修改:
default_store = http
命令行创建镜像:
glance image-create --disk-format qcow2 --container-format bare --location https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img --name cirros_img

调用地址:

curl -i -X POST -H 'x-image-meta-container_format: ovf' -H 'x-image-meta-location: https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img' -H 'User-Agent: python-glanceclient' -H 'x-image-meta-is_public: False' -H 'X-Auth-Token: <token>' -H 'Content-Type: application/octet-stream' -H 'x-image-meta-disk_format: qcow2' -H 'x-image-meta-name: cirros' http://192.168.1.17:9292/v1/images

返回:

{"image": {"status": "active", "deleted": false, "container_format": "ovf", "min_ram": 0, "updated_at": "2013-11-22T05:06:41", "owner": "daf8ae99103e436f92c2807aa3addfbf", "min_disk": 0, "is_public": false, "deleted_at": null, "id": "6e5e1a65-4546-46cd-8fdc-c800f2bb079a", "size": 9761280, "name": "cirros", "checksum": null, "created_at": "2013-11-22T05:06:37", "disk_format": "qcow2", "properties": {}, "protected": false}}


实验用openstack:HAVANA


镜像:https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img

(cirros的镜像,10M左右)
user:cirros
password:cubswin:)

其他镜像:
http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img
user:root
pass:changeme1122
    
    
镜像相关可以参考:
http://www.chenshake.com/openstack-mirror-and-password/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值