9a3651c899
backport: havana Change-Id: I4306c110198e32d2db1c1a528d89aae972a13d01
149 lines
8.6 KiB
XML
149 lines
8.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xml:id="glance-verify" 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">
|
|
<title>Verify the Image Service installation</title>
|
|
<para>To test the Image Service installation, download at least
|
|
one virtual machine image that is known to work with
|
|
OpenStack. For example, CirrOS is a small test image that is
|
|
often used for testing OpenStack deployments (<link
|
|
xlink:href="http://download.cirros-cloud.net/">CirrOS
|
|
downloads</link>). This walk through uses the 64-bit
|
|
CirrOS QCOW2 image.</para>
|
|
<para>For more information about how to download and build images,
|
|
see <link
|
|
xlink:href="http://docs.openstack.org/image-guide/content/index.html"
|
|
><citetitle>OpenStack Virtual Machine Image
|
|
Guide</citetitle></link>. For information about how to
|
|
manage images, see the <link
|
|
xlink:href="http://docs.openstack.org/user-guide/content/index.html"
|
|
><citetitle>OpenStack User
|
|
Guide</citetitle></link>.</para>
|
|
<procedure>
|
|
<step>
|
|
<para>Download the image into a dedicated directory using
|
|
<command>wget</command> or
|
|
<command>curl</command>:</para>
|
|
<screen><prompt>$</prompt> <userinput>mkdir images</userinput>
|
|
<prompt>$</prompt> <userinput>cd images/</userinput>
|
|
<prompt>$</prompt> <userinput>wget http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img</userinput></screen>
|
|
</step>
|
|
<step>
|
|
<para>Upload the image to the Image Service:</para>
|
|
<para><screen><prompt>#</prompt> <userinput>glance image-create --name=<replaceable>imageLabel</replaceable> --disk-format=<replaceable>fileFormat</replaceable> \
|
|
--container-format=<replaceable>containerFormat</replaceable> --is-public=<replaceable>accessValue</replaceable> < <replaceable>imageFile</replaceable></userinput></screen></para>
|
|
<para>Where:</para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><literal><replaceable>imageLabel</replaceable></literal></term>
|
|
<listitem>
|
|
<para>Arbitrary label. The name by which users
|
|
refer to the image.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal><replaceable>fileFormat</replaceable></literal></term>
|
|
<listitem>
|
|
<para>Specifies the format of the image file.
|
|
Valid formats include
|
|
<literal>qcow2</literal>,
|
|
<literal>raw</literal>,
|
|
<literal>vhd</literal>,
|
|
<literal>vmdk</literal>,
|
|
<literal>vdi</literal>,
|
|
<literal>iso</literal>,
|
|
<literal>aki</literal>,
|
|
<literal>ari</literal>, and
|
|
<literal>ami</literal>.</para>
|
|
<para>You can verify the format using the
|
|
<command>file</command> command:
|
|
<screen><prompt>$</prompt> <userinput>file cirros-0.3.1-x86_64-disk.img</userinput>
|
|
<computeroutput>cirros-0.3.1-x86_64-disk.img: QEMU QCOW Image (v2), 41126400 bytes</computeroutput></screen></para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal><replaceable>containerFormat</replaceable></literal></term>
|
|
<listitem>
|
|
<para>Specifies the container format. Valid
|
|
formats include: <literal>bare</literal>,
|
|
<literal>ovf</literal>,
|
|
<literal>aki</literal>,
|
|
<literal>ari</literal> and
|
|
<literal>ami</literal>.</para>
|
|
<para>Specify <literal>bare</literal> to
|
|
indicate that the image file is not in a
|
|
file format that contains metadata about
|
|
the virtual machine. Although this field
|
|
is currently required, it is not actually
|
|
used by any of the OpenStack services and
|
|
has no effect on system behavior. Because
|
|
the value is not used anywhere, it is safe
|
|
to always specify <literal>bare</literal>
|
|
as the container format.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal><replaceable>accessValue</replaceable></literal></term>
|
|
<listitem>
|
|
<para>Specifies image access: <itemizedlist>
|
|
<listitem>
|
|
<para>true - All users can view and
|
|
use the image.</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>false - Only administrators
|
|
can view and use the image.</para>
|
|
</listitem>
|
|
</itemizedlist></para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal><replaceable>imageFile</replaceable></literal></term>
|
|
<listitem>
|
|
<para>Specifies the name of your downloaded
|
|
image file.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
<para>For example:</para>
|
|
<screen><prompt>#</prompt> <userinput>glance image-create --name="CirrOS 0.3.1" --disk-format=qcow2 \
|
|
--container-format=bare --is-public=true < cirros-0.3.1-x86_64-disk.img</userinput></screen>
|
|
<screen><computeroutput>+------------------+--------------------------------------+
|
|
| Property | Value |
|
|
+------------------+--------------------------------------+
|
|
| checksum | d972013792949d0d3ba628fbe8685bce |
|
|
| container_format | bare |
|
|
| created_at | 2013-10-08T18:59:18 |
|
|
| deleted | False |
|
|
| deleted_at | None |
|
|
| disk_format | qcow2 |
|
|
| id | acafc7c0-40aa-4026-9673-b879898e1fc2 |
|
|
| is_public | True |
|
|
| min_disk | 0 |
|
|
| min_ram | 0 |
|
|
| name | CirrOS 0.3.1 |
|
|
| owner | efa984b0a914450e9a47788ad330699d |
|
|
| protected | False |
|
|
| size | 13147648 |
|
|
| status | active |
|
|
| updated_at | 2013-05-08T18:59:18 |
|
|
+------------------+--------------------------------------+</computeroutput></screen>
|
|
<note>
|
|
<para>Because the returned image ID is generated
|
|
dynamically, your deployment generates a different
|
|
ID than the one shown in this example.</para>
|
|
</note>
|
|
</step>
|
|
<step>
|
|
<para>Confirm that the image was uploaded and display its
|
|
attributes:</para>
|
|
<screen><prompt>#</prompt> <userinput>glance image-list</userinput></screen>
|
|
<screen><computeroutput>+--------------------------------------+-----------------+-------------+------------------+----------+--------+
|
|
| ID | Name | Disk Format | Container Format | Size | Status |
|
|
+--------------------------------------+-----------------+-------------+------------------+----------+--------+
|
|
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | qcow2 | bare | 13147648 | active |
|
|
+--------------------------------------+-----------------+-------------+------------------+----------+--------+</computeroutput></screen>
|
|
</step>
|
|
</procedure>
|
|
</section>
|