...
Code Block | ||
---|---|---|
| ||
glance image-create --name <image_name> --file <image_location> --disk-format raw --container-format bare --is-public True --progress
openstack image create --file <image_location> --disk-format raw --container-format bare [--public|--private] <image_name> |
For example, the following command would upload an ubuntu image:
Code Block | ||
---|---|---|
| ||
glance image-create --name "Ubuntu Server 16.04 (Xenial) amd64" --file xenial-server-cloudimg-amd64-disk1.img.raw --disk-format raw --container-format bare --is-public True --progress
openstack image create --file xenial-server-cloudimg-amd64-disk1.img.raw --disk-format raw --container-format bare --public "Ubuntu Server 16.04 (Xenial) amd64" |
The "–is-public True" flag is used to indicate that all tenants should have access to this image, and the upload would then require admin credentials. In the case of an image upload which should only be accessible to the tenant uploading it, that flag can be omitted.
...