openstack-manuals/doc/image-guide/section_glance-image-metadata.xml
Summer Long 9f208d1b08 Moved property listing into CLI
Moved listings for property keys and values into the CLI.
Removed listing from Image, and replaced with reference.
Edited Image Guide section, and added Compute config and
image-show example.

Partial-Bug: #1304114

Change-Id: I84bd59bab2eda16adbe80641fcb95c55959f5d9d
2014-04-10 11:33:04 +10:00

70 lines
5.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<section xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xlink="http://www.w3.org/1999/xlink"
version="5.0"
xml:id="image-metadata">
<title>Image metadata</title>
<?dbhtml stop-chunking?>
<para>Image metadata can help end users determine the nature of an image, and is used by
associated OpenStack components and drivers which interface with the Image Service.</para>
<para>Metadata can also determine the scheduling of hosts. If the <option>property</option> option
is set on an image, and Compute is configured so that the
<systemitem>ImagePropertiesFilter</systemitem> scheduler filter is enabled (default), then the
scheduler only considers compute hosts that satisfy that property.</para>
<note><para>Compute's <systemitem>ImagePropertiesFilter</systemitem> value is specified in the
<option>scheduler_default_filter</option> value in the
<filename>/etc/nova/nova.conf</filename> file.</para></note>
<para>You can add metadata to Image Service images by using the <option>--property
<replaceable>key</replaceable>=<replaceable>value</replaceable></option> option with the
<command>glance image-create</command> or <command>glance image-update</command> command. More
than one property can be specified. For example:</para>
<screen><prompt>$</prompt> <userinput>glance image-update <replaceable>img-uuid</replaceable> --property architecture=arm --property hypervisor_type=qemu</userinput></screen>
<para>Common image properties are also specified in the
<filename>/etc/glance/schema-image.json</filename> file. For a complete list of valid property
keys and values, refer to the <link
xlink:href="http://docs.openstack.org/cli-reference/content/"><citetitle>OpenStack
Command-Line Reference</citetitle></link>.</para>
<para>All associated properties for an image can be displayed using the <command>glance
image-show</command> command. For example:</para>
<screen><prompt>$</prompt> <userinput>glance image-show myCirrosImage</userinput>
<computeroutput>+---------------------------------------+--------------------------------------+
| Property | Value |
+---------------------------------------+--------------------------------------+
| Property 'base_image_ref' | 397e713c-b95b-4186-ad46-6126863ea0a9 |
| Property 'image_location' | snapshot |
| Property 'image_state' | available |
| Property 'image_type' | snapshot |
| Property 'instance_type_ephemeral_gb' | 0 |
| Property 'instance_type_flavorid' | 2 |
| Property 'instance_type_id' | 5 |
| Property 'instance_type_memory_mb' | 2048 |
| Property 'instance_type_name' | m1.small |
| Property 'instance_type_root_gb' | 20 |
| Property 'instance_type_rxtx_factor' | 1 |
| Property 'instance_type_swap' | 0 |
| Property 'instance_type_vcpu_weight' | None |
| Property 'instance_type_vcpus' | 1 |
| Property 'instance_uuid' | 84c6e57d-a6b1-44b6-81eb-fcb36afd31b5 |
| Property 'kernel_id' | df430cc2-3406-4061-b635-a51c16e488ac |
| Property 'owner_id' | 66265572db174a7aa66eba661f58eb9e |
| Property 'ramdisk_id' | 3cf852bd-2332-48f4-9ae4-7d926d50945e |
| 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 |
+---------------------------------------+--------------------------------------+</computeroutput></screen>
</section>