OpenStack: Using the glance command to upload a system image

From Define Wiki
Jump to navigation Jump to search
[root@server2-a ~(keystone_admin)]$ glance image-create --name small --is-public True --disk-format qcow2 --container-format bare --copy-from http://classroom.example.com/pub/materials/small.img
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | None                                 |
| container_format | bare                                 |
| created_at       | 2015-04-28T13:00:01                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | 40f4efd4-8239-481b-a3f4-aafb5455ec20 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | small                                |
| owner            | 4413e2678de04e1a81ee4d9149a8d916     |
| protected        | False                                |
| size             | 106493440                            |
| status           | queued                               |
| updated_at       | 2015-04-28T13:00:01                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
[root@server2-a ~(keystone_admin)]$ glance image-list
+--------------------------------------+-------+-------------+------------------+-----------+--------+
| ID                                   | Name  | Disk Format | Container Format | Size      | Status |
+--------------------------------------+-------+-------------+------------------+-----------+--------+
| 40f4efd4-8239-481b-a3f4-aafb5455ec20 | small | qcow2       | bare             | 106493440 | active |
+--------------------------------------+-------+-------------+------------------+-----------+--------+
[root@server2-a ~(keystone_admin)]$
[root@server2-a ~(keystone_admin)]$ glance image-show small
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 937e74d62f0712663fcec490efac5a93     |
| container_format | bare                                 |
| created_at       | 2015-04-28T13:00:01                  |
| deleted          | False                                |
| disk_format      | qcow2                                |
| id               | 40f4efd4-8239-481b-a3f4-aafb5455ec20 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | small                                |
| owner            | 4413e2678de04e1a81ee4d9149a8d916     |
| protected        | False                                |
| size             | 106493440                            |
| status           | active                               |
| updated_at       | 2015-04-28T13:00:02                  |
+------------------+--------------------------------------+