Проверьте работу сервиса управления образами, используя CirrOS, маленький образ Linux, который поможет протестировать установку OpenStack.
For more information about how to download and build images, see OpenStack Virtual Machine Image Guide. For information about how to manage images, see the OpenStack End User Guide.
Примечание
Выполните эти команды на управляющем узле.
Подставьте учетную запись admin
для получения доступа к инструкциям командной строки, доступным только администраторам:
$ . admin-openrc
Скачайте начальный образ
$ wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
Примечание
Установите``wget`` если он не включён в ваш дистрибутив
Загрузите образ в сервис управления образами используя QCOW2 формат диска, bare формат контейнера, и общую видимость, так все проекты смогут получить доступ к нему:
$ openstack image create "cirros" \
--file cirros-0.3.5-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--public
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | 133eae9fb1c98f45894a4e60d8736619 |
| container_format | bare |
| created_at | 2015-03-26T16:52:10Z |
| disk_format | qcow2 |
| file | /v2/images/cc5c6982-4910-471e-b864-1098015901b5/file |
| id | cc5c6982-4910-471e-b864-1098015901b5 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros |
| owner | ae7a98326b9c455588edd2656d723b9d |
| protected | False |
| schema | /v2/schemas/image |
| size | 13200896 |
| status | active |
| tags | |
| updated_at | 2015-03-26T16:52:10Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
For information about the openstack image create parameters,
see Create or update an image (glance)
in the OpenStack User Guide
.
For information about disk and container formats for images, see
Disk and container formats for images
in the OpenStack Virtual Machine Image Guide
.
Примечание
OpenStack generates IDs dynamically, so you will see different values in the example command output.
Подтвердите загрузку образа и проверьте атрибуты:
$ openstack image list
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| 38047887-61a7-41ea-9b49-27987d5e8bb9 | cirros | active |
+--------------------------------------+--------+--------+
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.