d7c3f88004
Change-Id: I78e99862dbf16829342d4e618f09e5d75b6debdf
81 lines
5.7 KiB
XML
81 lines
5.7 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 <parameter>--property
|
|
<replaceable>key</replaceable>=<replaceable>value</replaceable></parameter> parameter 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/chapter_cli-glance-property.html"><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>
|
|
|
|
<note>
|
|
<title>Volume-from-Image properties</title>
|
|
<para>When creating Block Storage volumes from images, also consider your
|
|
configured image properties. If you alter the core image properties, you
|
|
should also update your Block Storage configuration. Amend
|
|
<option>glance_core_properties</option> in the
|
|
<filename>/etc/cinder/cinder.conf</filename> file on all controller
|
|
nodes to match the core properties you have set in the Image
|
|
service.</para>
|
|
</note>
|
|
</section>
|