[image-guide] Use openstack client instead of glance

python-glanceclient is deprecated in favor of OpenStack client.

Change-Id: Iba1cd0df2a43ecfe14205fedb78119926db7285b
Closes-Bug: 1570709
This commit is contained in:
KATO Tomoyuki 2016-04-17 17:42:07 +09:00
parent 17c472c3b1
commit b8676b4dad
3 changed files with 31 additions and 48 deletions

View File

@ -58,12 +58,12 @@ Run the following command to convert a vmdk image file to a qcow2 image file.
Otherwise, you will get a blue screen when launching the image Otherwise, you will get a blue screen when launching the image
due to lack of the virtio driver. due to lack of the virtio driver.
Another option is to set the image properties as below when you Another option is to set the image properties as below when you
update the image in glance to avoid this issue, but it will update the image in the Image service to avoid this issue,
reduce performance significantly. but it will reduce performance significantly.
.. code-block:: console .. code-block:: console
$ glance image-update --property hw_disk_bus='ide' image_id $ openstack image set --property hw_disk_bus='ide' image_name_or_id
VBoxManage: VDI (VirtualBox) to raw VBoxManage: VDI (VirtualBox) to raw
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -19,13 +19,13 @@ hosts that satisfy that property.
You can add metadata to Image service images by using the You can add metadata to Image service images by using the
``--property key=value`` parameter with the ``--property key=value`` parameter with the
:command:`glance image-create` or :command:`glance image-update` :command:`openstack image create` or :command:`openstack image set`
command. More than one property can be specified. For example: command. More than one property can be specified. For example:
.. code-block:: console .. code-block:: console
$ glance image-update img-uuid --property architecture=arm \ $ openstack image set --property architecture=arm \
--property hypervisor_type=qemu --property hypervisor_type=qemu image_name_or_id
Common image properties are also specified in the Common image properties are also specified in the
``/etc/glance/schema-image.json`` file. ``/etc/glance/schema-image.json`` file.
@ -34,49 +34,33 @@ For a complete list of valid property keys and values, refer to the
<http://docs.openstack.org/cli-reference/glance.html#image-service-property-keys>`_. <http://docs.openstack.org/cli-reference/glance.html#image-service-property-keys>`_.
All associated properties for an image can be displayed using the All associated properties for an image can be displayed using the
:command:`glance image-show` command. For example: :command:`openstack image show` command. For example:
.. code-block:: console .. code-block:: console
$ glance image-show myCirrosImage $ openstack image show cirros
+---------------------------------------+--------------------------------------+ +------------------+------------------------------------------------------+
| Property | Value | | Field | Value |
+---------------------------------------+--------------------------------------+ +------------------+------------------------------------------------------+
| Property 'base_image_ref' | 397e713c-b95b-4186-ad46-6126863ea0a9 | | checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| Property 'image_location' | snapshot | | container_format | bare |
| Property 'image_state' | available | | created_at | 2016-04-15T13:57:38Z |
| Property 'image_type' | snapshot | | disk_format | qcow2 |
| Property 'instance_type_ephemeral_gb' | 0 | | file | /v2/images/55f0907f-70a5-4376-a346-432e4ec509ed/file |
| Property 'instance_type_flavorid' | 2 | | id | 55f0907f-70a5-4376-a346-432e4ec509ed |
| Property 'instance_type_id' | 5 | | min_disk | 0 |
| Property 'instance_type_memory_mb' | 2048 | | min_ram | 0 |
| Property 'instance_type_name' | m1.small | | name | cirros |
| Property 'instance_type_root_gb' | 20 | | owner | f9574e69042645d6b5539035cb8c00bf |
| Property 'instance_type_rxtx_factor' | 1 | | protected | False |
| Property 'instance_type_swap' | 0 | | schema | /v2/schemas/image |
| Property 'instance_type_vcpu_weight' | None | | size | 13287936 |
| Property 'instance_type_vcpus' | 1 | | status | active |
| Property 'instance_uuid' | 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 | | tags | |
| Property 'kernel_id' | df430cc2-3406-4061-b635-a51c16e488ac | | updated_at | 2016-04-15T13:57:57Z |
| Property 'owner_id' | 66265572db174a7aa66eba661f58eb9e | | virtual_size | None |
| Property 'ramdisk_id' | 3cf852bd-2332-48f4-9ae4-7d926d50945e | | visibility | public |
| Property 'user_id' | 376744b5910b4b4da7d8e6cb483b06a8 | +------------------+------------------------------------------------------+
| checksum | 8e4838effa1969ad591655d6485c7ba8 |
| container_format | ami |
| created_at | 2013-07-22T19:45:58 |
| deleted | False |
| disk_format | ami |
| id | 7e5142af-1253-4634-bcc6-89482c5f2e8a |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | myCirrosImage |
| owner | 66265572db174a7aa66eba661f58eb9e |
| protected | False |
| size | 14221312 |
| status | active |
| updated_at | 2013-07-22T19:46:42 |
+---------------------------------------+--------------------------------------+
.. note:: .. note::

View File

@ -90,5 +90,4 @@ Your image is ready to upload to the Image service:
.. code-block:: console .. code-block:: console
$ glance image-create --name WS2012 --disk-format qcow2 \ $ openstack image create --disk-format qcow2 --file ws2012.qcow2 WS2012
--container-format bare --file ws2012.qcow2