openstack-manuals/doc/admin-guide-cloud/section_adding-images.xml
Diane Fleming 64b6c9261e Folder rename, file rename, flattening of directories
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
2013-09-08 15:15:50 -07:00

591 lines
25 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="adding-images">
<title>Adding images with glance image-create</title>
<para>To add a virtual machine image to glance, use the
<command>glance image-create</command> command.</para>
<para>To modify image properties, use the <command>glance
image-update</command> command.</para>
<para>The <command>image-create</command> command requires that you
specify a name for your image with the
<parameter>--name</parameter> parameter, the disk format with
the <parameter>--disk-format</parameter> parameter, and the
container format with <parameter>--container-format</parameter>
parameter. Pass in the file through standard input or by using the
file command. For example:</para>
<screen><prompt>$</prompt> <userinput>glance image-create --name myimage --disk-format=raw --container-format=bare &lt; <replaceable>/path/to/file.img</replaceable></userinput></screen>
<para>or</para>
<screen><prompt>$</prompt> <userinput>glance image-create --name myimage --disk-format=raw --container-format=bare --file <replaceable>/path/to/file.img</replaceable></userinput></screen>
<xi:include href="../common/section_glance_image-formats.xml"/>
<section xml:id="image-metadata">
<title>Image Metadata</title>
<para>You can associate metadata with an image using the
<parameter>--property
<replaceable>key</replaceable>=<replaceable>value</replaceable></parameter>
argument to <command>glance image-create</command> or
<command>glance image-update</command>. For example:</para>
<screen><prompt>$</prompt> <userinput>glance image-update <replaceable>img-uuid</replaceable> --property architecture=arm --property hypervisor_type=qemu</userinput></screen>
<para>If you set the following properties on an image, and the
ImagePropertiesFilter scheduler filter is enabled, which is the
default, the scheduler only considers compute hosts that satisfy
these properties.</para>
<para><parameter>architecture</parameter>: The CPU architecture
that must be supported by the hypervisor, such as,
<literal>x86_64</literal>, <literal>arm</literal>,
<literal>ppc64</literal>. Run <command>uname -m</command> to
get the architecture of a machine. We strongly recommend using
the architecture data vocabulary defined by the <link
xlink:href="http://libosinfo.org">libosinfo project</link> for
this purpose. Recognized values for the field architecture
are:</para>
<table rules="all">
<caption>Image metadata properties: architecture</caption>
<col width="30%"/>
<col width="70%"/>
<thead>
<tr>
<td>Architecture</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><literal>alpha</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/DEC_Alpha">DEC
64-bit RISC</link></td>
</tr>
<tr>
<td><literal>armv7l</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/ARM_architecture"
>ARM Cortex-A7 MPCore</link></td>
</tr>
<tr>
<td><literal>cris</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/ETRAX_CRIS"
>Ethernet, Token Ring, AXis - Code Reduced Instruction
Set</link></td>
</tr>
<tr>
<td><literal>i686</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/X86"
>Intel sixth-generation x86</link> (P6 micro
architecture)</td>
</tr>
<tr>
<td><literal>ia64</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/Itanium"
>Itanium</link></td>
</tr>
<tr>
<td><literal>lm32</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/Milkymist"
>Lattice Micro32</link></td>
</tr>
<tr>
<td><literal>m68k</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/Motorola_68000_family"
>Motorola 68000</link></td>
</tr>
<tr>
<td><literal>microblaze</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MicroBlaze"
>Xilinx 32-bit FPGA (Big Endian)</link></td>
</tr>
<tr>
<td><literal>microblazeel</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MicroBlaze"
>Xilinx 32-bit FPGA (Little Endian)</link></td>
</tr>
<tr>
<td><literal>mips</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 32-bit RISC (Big Endian)</link></td>
</tr>
<tr>
<td><literal>mipsel</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 32-bit RISC (Little Endian)</link></td>
</tr>
<tr>
<td><literal>mips64</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 64-bit RISC (Big Endian)</link></td>
</tr>
<tr>
<td><literal>mips64el</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 64-bit RISC (Little Endian)</link></td>
</tr>
<tr>
<td><literal>openrisc</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/OpenRISC#QEMU_support"
>OpenCores RISC</link></td>
</tr>
<tr>
<td><literal>parisc</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/PA-RISC"
>HP Precision Architecture RISC</link></td>
</tr>
<tr>
<td><literal>parisc64</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/PA-RISC"
>HP Precision Architecture 64-bit RISC</link></td>
</tr>
<tr>
<td><literal>ppc</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC 32-bit</link></td>
</tr>
<tr>
<td><literal>ppc64</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC 64-bit</link></td>
</tr>
<tr>
<td><literal>ppcemb</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC (Embedded 32-bit)</link></td>
</tr>
<tr>
<td><literal>s390</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/S390">IBM
Enterprise Systems Architecture/390</link></td>
</tr>
<tr>
<td><literal>s390x</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/S390x"
>S/390 64-bit</link></td>
</tr>
<tr>
<td><literal>sh4</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/SuperH"
>SuperH SH-4 (Little Endian)</link></td>
</tr>
<tr>
<td><literal>sh4eb</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/SuperH"
>SuperH SH-4 (Big Endian)</link></td>
</tr>
<tr>
<td><literal>sparc</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/Sparc"
>Scalable Processor Architecture, 32-bit</link></td>
</tr>
<tr>
<td><literal>sparc64</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/Sparc"
>Scalable Processor Architecture, 64-bit</link></td>
</tr>
<tr>
<td><literal>unicore32</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/Unicore"
>Microprocessor Research and Development Center RISC
Unicore32</link></td>
</tr>
<tr>
<td><literal>x86_64</literal></td>
<td><link xlink:href="http://en.wikipedia.org/wiki/X86"
>64-bit extension of IA-32</link></td>
</tr>
<tr>
<td><literal>xtensa</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/Xtensa#Processor_Cores"
>Tensilica Xtensa configurable microprocessor
core</link></td>
</tr>
<tr>
<td><literal>xtensaeb</literal></td>
<td><link
xlink:href="http://en.wikipedia.org/wiki/Xtensa#Processor_Cores"
>Tensilica Xtensa configurable microprocessor core (Big
Endian)</link></td>
</tr>
</tbody>
</table>
<para>
<variablelist xml:id="image-metadata-properties">
<varlistentry>
<term>hypervisor_type</term>
<listitem>
<para>The hypervisor type. Valid values are
<literal>xen</literal>, <literal>qemu</literal>,
<literal>kvm</literal>, <literal>lxc</literal>,
<literal>uml</literal>, <literal>vmware</literal>,
<literal>hyperv</literal>, and
<literal>powervm</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vm_mode</term>
<listitem>
<para>The virtual machine mode. This represents the
host/guest application binary interface (ABI ) used for
the virtual machine. Valid values are:</para>
<variablelist>
<varlistentry>
<term><literal>hvm</literal></term>
<listitem>
<para>Fully virtualized. Used by QEMU and
KVM.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>xen</literal></term>
<listitem>
<para>Xen 3.0 paravirtualized.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>uml</literal></term>
<listitem>
<para>User Mode Linux paravirtualized.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>exe</literal></term>
<listitem>
<para>Executables in containers. Used by LXC.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The following metadata properties are specific to
the XenAPI driver:</para>
<variablelist>
<varlistentry>
<term>auto_disk_config</term>
<listitem>
<para>A boolean option. If true, the root partition
on the disk is automatically resized before
the instance boots. This value is only taken into
account by the Compute service when using a
Xen-based hypervisor with the XenAPI driver. The
Compute service tries to resize a single partition
in ext3 or ext4 format is on the image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>os_type</term>
<listitem>
<para>The operating system installed on the image,
such as, <literal>linux</literal>,
<literal>windows</literal>. The XenAPI driver
logic depends on the value of the
<parameter>os_type</parameter> parameter for the
image. For example, for images where
<parameter>os_type</parameter><literal>=windows</literal>,
the XenAPI driver creates a FAT32-based swap
partition instead of a Linux swap partition, and
it limits the injected host name to less than 16
characters.</para>
</listitem>
</varlistentry>
</variablelist>
<para>The following metadata properties are specific to
the VMware API driver:</para>
<variablelist>
<varlistentry>
<term>vmware_adaptertype</term>
<listitem>
<para>The virtual SCSI or IDE controller used by the
hypervisor. Valid values are
<literal>lsiLogic</literal>,
<literal>busLogic</literal>, and
<literal>ide</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vmware_ostype</term>
<listitem>
<para>A VMware GuestID that describes the operating
system that is installed in the image. This value
is passed to the hypervisor when you create a
virtual machine. See <link
xlink:href="http://www.thinkvirt.com/?q=node/181"
>thinkvirt.com</link> for a list of valid
values. If you do not specify this parameter, it
defaults to <literal>otherGuest</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
<variablelist>
<varlistentry>
<term>vmware_image_version</term>
<listitem>
<para>Currently unused. Set it to
<literal>1</literal>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>To help end users use images, you might add common
metadata to images. By community agreement, you can add
the following metadata keys to images:</para>
<variablelist>
<varlistentry>
<term>instance_uuid</term>
<listitem>
<para>For snapshot images, the UUID of the server
used to create this image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>kernel_id</term>
<listitem>
<para>The ID of image stored in Glance that should
be used as the kernel when booting an AMI-style
image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ramdisk_id</term>
<listitem>
<para>The ID of image stored in Glance that should
be used as the ramdisk when booting an AMI-style
image.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>os_version</term>
<listitem>
<para>The operating system version as specified by
the distributor.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>os_distro</term>
<listitem>
<para>The value of this property is the common name
of the operating system distribution in
all-lowercase. For this purpose, we use the same
data vocabulary as the <link
xlink:href="http://libosinfo.org">libosinfo
project</link>. The following values are the
recognized values for this parameter. In the
interest of interoperability, please use only a
recognized value for this field. The deprecated
values are listed to assist you in searching for
the recognized value. Valid values are: <variablelist>
<varlistentry>
<term><literal>arch</literal></term>
<listitem>
<para>This is: Arch Linux</para>
<para>Do not use:
<literal>archlinux</literal>, or
<literal>org.archlinux</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>centos</literal></term>
<listitem>
<para>This is: Community Enterprise
Operating System</para>
<para>Do not use:
<literal>org.centos</literal>
<literal>CentOS</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>debian</literal></term>
<listitem>
<para>This is: Debian</para>
<para>Do not use:
<literal>Debian</literal>, or
<literal>org.debian</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>fedora</literal></term>
<listitem>
<para>This is: Fedora</para>
<para>Do not use:
<literal>Fedora</literal>,
<literal>org.fedora</literal>, or
<literal>org.fedoraproject</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>freebsd</literal></term>
<listitem>
<para>This is: FreeBSD</para>
<para>Do not use:
<literal>org.freebsd</literal>,
<literal>freeBSD</literal>, or
<literal>FreeBSD</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>gentoo</literal></term>
<listitem>
<para>This is: Gentoo Linux</para>
<para>Do not use:
<literal>Gentoo</literal>, or
<literal>org.gentoo</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mandrake</literal></term>
<listitem>
<para>This is: Mandrakelinux (MandrakeSoft)</para>
<para>Do not use:
<literal>mandrakelinux</literal>, or
<literal>MandrakeLinux</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mandriva</literal></term>
<listitem>
<para>This is: Mandriva Linux</para>
<para>Do not use:
<literal>mandrivalinux</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mes</literal></term>
<listitem>
<para>This is: Mandriva Enterprise Server</para>
<para>Do not use:
<literal>mandrivaent</literal>, or
<literal>mandrivaES</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>msdos</literal></term>
<listitem>
<para>This is: Microsoft Disc Operating
System</para>
<para>Do not use: <literal>ms-dos</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>netbsd</literal></term>
<listitem>
<para>This is: NetBSD</para>
<para>Do not use:
<literal>NetBSD</literal>, or
<literal>org.netbsd</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>netware</literal></term>
<listitem>
<para>This is: Novell NetWare</para>
<para>Do not use:
<literal>novell</literal>, or
<literal>NetWare</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>openbsd</literal></term>
<listitem>
<para>This is: OpenBSD</para>
<para>Do not use:
<literal>OpenBSD</literal>, or
<literal>org.openbsd</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>opensolaris</literal></term>
<listitem>
<para>Do not use:
<literal>OpenSolaris</literal>,or
<literal>org.opensolaris</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>opensuse</literal></term>
<listitem>
<para>This is: openSUSE</para>
<para>Do not use: <literal>suse</literal>,
<literal>SuSE</literal>, or
<literal>org.opensuse</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>rhel</literal></term>
<listitem>
<para>This is: Red Hat Enterprise Linux</para>
<para>Do not use:
<literal>redhat</literal>,
<literal>RedHat</literal>, or
<literal>com.redhat</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>sled</literal></term>
<listitem>
<para>This is: SUSE Linux Enterprise
Desktop</para>
<para>Do not use:
<literal>com.suse</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ubuntu</literal></term>
<listitem>
<para>This is: Ubuntu</para>
<para>Do not use:
<literal>Ubuntu</literal>,
<literal>com.ubuntu</literal>,
<literal>org.ubuntu</literal>, or
<literal>canonical</literal>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>windows</literal></term>
<listitem>
<para>This is: Microsoft Windows</para>
<para>Do not use:
<literal>com.microsoft.server</literal>,
or <literal>windoze</literal>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
</para>
</section>
</section>