前提:
需要将所有控制节点glance中show_multiple_locations设置为true。
/etc/glance/glance-api.conf
show_multiple_locations = true
修改后需要重启glance-api服务
systemctl restart openstack-glance-api
1 创建一个空的镜像记录
glance image-create --visibility public --disk-format raw --container-format bare --name test-image.raw
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | bare |
| created_at | 2019-12-19T11:38:52Z |
| disk_format | raw |
| id | 1572527c-3282-49cc-a63b-6a67b0898aab |
| locations | [] |
| min_disk | 0