Chapter 4: Glance - Basic Commands


Commands :

1. Images

To upload a image :

cloud images can be downloaded from this openstack link.

Create the new image :

Syntax:

glance image-create --name <img name> --container-format <format> --disk-format <format> --file <filename> --visibility <public or private> --progress

Download the cirros image ( wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86\_64-disk.img )

Cloud Images can be downloaded from the below URLs.

Example:

glance image-create --name "cirros" --container-format bare --disk-format qcow2 --file cirros-0.3.5-x86_64-disk.img --progress

disk-format : To do

container-format : To do

List the images :

glance image-list

Execution Logs :

1. Images

% glance image-create --name "cirros"  --container-format bare --disk-format qcow2  --file cirros-0.3.5
-x86_64-disk.img --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | f8ab98ff5e73ebab884d80c9dc9c7290     |
| container_format | bare                                 |
| created_at       | 2017-07-03T05:38:52                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | qcow2                                |
| id               | a2333bfd-69d3-427f-a5e0-e68b7e011fff |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | 71d0c674df454aeaacd24c227998bb80     |
| protected        | False                                |
| size             | 13267968                             |
| status           | active                               |
| updated_at       | 2017-07-03T05:38:55                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

% glance image-list
+--------------------------------------+-----------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                        | Disk Format | Container Format | Size      | Status |
+--------------------------------------+-----------------------------+-------------+------------------+-----------+--------+
| a2333bfd-69d3-427f-a5e0-e68b7e011fff | cirros                      | qcow2       | bare             | 13267968  | active |
| a9b0d3e2-e8dd-4a3c-97a7-b95820a68935 | Ubuntu 12.04                | qcow2       | bare             | 338690048 | active |
| aa8006bf-3234-4db7-aa96-76dfe67f3034 | Ubuntu 14.04                | qcow2       | bare             | 464584704 | active |
+----------------

results matching ""

    No results matching ""