openstack-manuals/doc/install-guide/section_glance-verify.xml
Christian Berendt a2d662d600 Unified the syntax of the XML root element (install-guide)
The XML root element of Docbook XML files should match the following
format:

<ELEMENT 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="THE_XML_ID_OF_THE_ELEMENT">

Change-Id: I1e0804e2c5021bd78b77483f3156c5b069453555
2014-07-09 22:19:31 +02:00

92 lines
5.0 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="glance-verify">
<title>Verify operation</title>
<para>This section describes how to verify operation of the Image
Service using
<link xlink:href="http://launchpad.net/cirros">CirrOS</link>, a small
Linux image that helps you test your OpenStack deployment.</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>Create and change into a temporary local directory:</para>
<screen><prompt>$</prompt> <userinput>mkdir /tmp/images</userinput>
<prompt>$</prompt> <userinput>cd /tmp/images</userinput></screen>
</step>
<step>
<para>Download the image to the local directory:</para>
<screen><prompt>$</prompt> <userinput>wget http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img</userinput></screen>
</step>
<step>
<para>Source the <literal>admin</literal> credentials to gain access to
admin-only CLI commands:</para>
<screen><prompt>$</prompt> <userinput>source admin-openrc.sh</userinput></screen>
</step>
<step>
<para>Upload the image to the Image Service:</para>
<screen><prompt>$</prompt> <userinput>glance image-create --name "cirros-0.3.2-x86_64" --file cirros-0.3.2-x86_64-disk.img \
--disk-format qcow2 --container-format bare --is-public True --progress</userinput>
<computeroutput>+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 64d7c1cd2b6f60c92c14662941cb7913 |
| container_format | bare |
| created_at | 2014-04-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.2-x86_64 |
| owner | efa984b0a914450e9a47788ad330699d |
| protected | False |
| size | 13167616 |
| status | active |
| updated_at | 2014-01-08T18:59:18 |
+------------------+--------------------------------------+</computeroutput></screen>
<para>For information about the parameters for the
<command>glance image-create</command> command, see <link
xlink:href="http://docs.openstack.org/cli-reference/content/glanceclient_commands.html#glanceclient_subcommand_image-create"
>Image Service command-line client</link> in the
<citetitle>OpenStack Command-Line Interface
Reference</citetitle>.</para>
<para>For information about disk and container formats for
images, see <link
xlink:href="http://docs.openstack.org/image-guide/content/image-formats.html"
>Disk and container formats for images</link> in the
<citetitle>OpenStack Virtual Machine Image Guide</citetitle>.</para>
<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 upload of the image and validate
attributes:</para>
<screen><prompt>$</prompt> <userinput>glance image-list</userinput>
<computeroutput>+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
| acafc7c0-40aa-4026-9673-b879898e1fc2 | cirros-0.3.2-x86_64 | qcow2 | bare | 13167616 | active |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+</computeroutput></screen>
</step>
<step>
<para>Remove the temporary local directory:</para>
<screen><prompt>$</prompt> <userinput>rm -r /tmp/images</userinput></screen>
</step>
</procedure>
</section>