64b6c9261e
Current folder name New folder name Book title ---------------------------------------------------------- basic-install DELETE cli-guide DELETE common common NEW admin-guide-cloud Cloud Administrators Guide docbkx-example DELETE openstack-block-storage-admin DELETE openstack-compute-admin DELETE openstack-config config-reference OpenStack Configuration Reference openstack-ha high-availability-guide OpenStack High Availabilty Guide openstack-image image-guide OpenStack Virtual Machine Image Guide openstack-install install-guide OpenStack Installation Guide openstack-network-connectivity-admin admin-guide-network OpenStack Networking Administration Guide openstack-object-storage-admin DELETE openstack-security security-guide OpenStack Security Guide openstack-training training-guide OpenStack Training Guide openstack-user user-guide OpenStack End User Guide openstack-user-admin user-guide-admin OpenStack Admin User Guide glossary NEW OpenStack Glossary bug: #1220407 Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7 author: diane fleming
121 lines
7.4 KiB
XML
121 lines
7.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xml:id="images-verifying-install"
|
|
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>Verifying the Image Service Installation</title>
|
|
<para>To test the Image Service installation, download some virtual machine
|
|
images that are known to work with OpenStack. CirrOS is a small test image
|
|
that is often used for testing OpenStack deployments. You can find the most
|
|
recent CirrOS image on their <link
|
|
xlink:href="http://download.cirros-cloud.net/">download page</link>. As of
|
|
this writing the most recent image is version 0.3.1. A 64-bit version in
|
|
QCOW2 format (compatible with KVM or QEMU hypervisors) can be downloaded
|
|
from there.</para>
|
|
<para>The 64-bit CirrOS QCOW2 image is the image we'll use for this
|
|
walkthrough. More detailed information about how to obtain and create
|
|
images can be found in the <link
|
|
xlink:href="http://docs.openstack.org">OpenStack Compute Administration
|
|
Guide</link> in the "Image Management" chapter.</para>
|
|
|
|
<para>The download is done in a dedicated directory:</para>
|
|
<screen><prompt>$</prompt> <userinput>mkdir images</userinput>
|
|
<prompt>$</prompt> <userinput>cd images/</userinput>
|
|
<prompt>$</prompt> <userinput>wget http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img</userinput></screen>
|
|
<para>You can now use the <command>glance image-create</command> command to
|
|
upload the image to the Image Service, passing the image file through
|
|
standard input:</para>
|
|
<note><para>The following commands show <literal>--os-username</literal>,
|
|
<literal>--os-password</literal>,
|
|
<literal>--os-tenant-name</literal>,
|
|
<literal>--os-auth-url</literal> parameters. You could also use
|
|
the <literal>OS_*</literal> environment variables by setting them in
|
|
an example <filename>openrc</filename> file:</para>
|
|
<programlisting><xi:include parse="text" href="samples/openrc.txt"/></programlisting>
|
|
<para>Then you would source these environment variables by running <userinput>source openrc</userinput>.</para></note>
|
|
<screen><prompt>$</prompt> <userinput>glance --os-username=admin --os-password=secrete --os-tenant-name=demo --os-auth-url=http://192.168.206.130:5000/v2.0 \
|
|
image-create \
|
|
--name="CirrOS 0.3.1" \
|
|
--disk-format=qcow2 \
|
|
--container-format bare < cirros-0.3.1-x86_64-disk.img</userinput>
|
|
<computeroutput>+------------------+--------------------------------------+
|
|
| Property | Value |
|
|
+------------------+--------------------------------------+
|
|
| checksum | d972013792949d0d3ba628fbe8685bce |
|
|
| container_format | bare |
|
|
| created_at | 2013-05-08T18:59:18 |
|
|
| deleted | False |
|
|
| deleted_at | None |
|
|
| disk_format | qcow2 |
|
|
| id | acafc7c0-40aa-4026-9673-b879898e1fc2 |
|
|
| is_public | False |
|
|
| 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>The returned image ID is generated dynamically, and therefore
|
|
will be different on your deployment than in this example.</para>
|
|
</note>
|
|
|
|
<para>The rationale for the arguments is:
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><literal>name="CirrOS 0.3.1"</literal></term>
|
|
<listitem>
|
|
<para>The <literal>name</literal> field is an arbitrary label. In this example
|
|
the name encodes the distribution and version:
|
|
<literal>CirrOS 0.3.1</literal>.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal>disk-format=qcow2</literal></term>
|
|
<listitem>
|
|
<para>The <literal>disk-format</literal> field specifies the format of the image
|
|
file. In this case, the image file format is QCOW2, which can be verified
|
|
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>
|
|
<para>Other valid formats are <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>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><literal>container-format=bare</literal></term>
|
|
<listitem>
|
|
<para>The <literal>container-format</literal> field is required by the
|
|
<command>glance image-create</command> command but isn't actually used by any of
|
|
the OpenStack services, so the value specified here has no effect on system
|
|
behavior. We specify <literal>bare</literal> to indicate that the image file
|
|
is not in a file format that contains metadata about the virtual
|
|
machine.</para>
|
|
<para>Because the value is not used anywhere, it safe to always specify
|
|
<literal>bare</literal> as the container format, although the command
|
|
will accept other formats: <literal>ovf</literal>, <literal>aki</literal>,
|
|
<literal>ari</literal> and <literal>ami</literal>.</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
<para>Now a <userinput>glance image-list</userinput> should show the image attributes:</para>
|
|
<screen><prompt>$</prompt> <userinput>glance --os-username=admin --os-password=secrete --os-tenant-name=demo --os-auth-url=http://192.168.206.130:5000/v2.0 \
|
|
image-list</userinput>
|
|
<computeroutput>+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
|
|
| ID | Name | Disk Format | Container Format | Size | Status |
|
|
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
|
|
| acafc7c0-40aa-4026-9673-b879898e1fc2 | CirrOS 0.3.1 | qcow2 | bare | 13147648 | active |
|
|
+--------------------------------------+---------------------------------+-------------+------------------+----------+--------+</computeroutput></screen>
|
|
|
|
</section>
|