Merge "Ensures reference for image formats and metadata remains intact"

This commit is contained in:
Jenkins 2013-10-29 02:11:25 +00:00 committed by Gerrit Code Review
commit 09eee88bbd
6 changed files with 827 additions and 716 deletions

View File

@ -1,594 +0,0 @@
<?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>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.
To specify that an image's disk cannot be resized
add <literal>auto_disk_config=disabled</literal> as
an image property with <command>glance image-update</command>
.</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>

View File

@ -40,6 +40,16 @@
</abstract>
<revhistory>
<!-- ... continue addding more revisions here as you change this document using the markup shown below... -->
<revision>
<date>2013-10-25</date>
<revdescription>
<itemizedlist>
<listitem>
<para>Adds information about image formats, properties.</para>
</listitem>
</itemizedlist>
</revdescription>
</revision>
<revision>
<date>2013-10-17</date>
<revdescription>

View File

@ -9,139 +9,132 @@
and modify virtual machine images that are compatible with OpenStack.</para>
<para>To keep things brief, we'll sometimes use the term "image" instead of "virtual machine
image".</para>
<simplesect>
<title>What is a virtual machine image?</title>
<para>What is a virtual machine image?</para>
<para>A virtual machine image is a single file which contains a virtual disk that has a
bootable operating system installed on it.</para>
<para>Virtual machine images come in different formats, some
of which are described below. In a later chapter, we'll
describe how to convert between formats.</para>
</simplesect>
<simplesect>
<title>Raw</title>
<para>The "raw" image format is the simplest one, and is
natively supported by both KVM and Xen hypervisors. You
can think of a raw image as being the bit-equivalent of a
block device file, created as if somebody had copied, say,
<para>Virtual machine images come in different formats, some of which are described below. In a
later chapter, we'll describe how to convert between formats.</para>
<variablelist>
<varlistentry>
<term>Raw</term>
<listitem><para>The "raw" image format is the simplest one, and is
natively supported by both KVM and Xen hypervisors. You
can think of a raw image as being the bit-equivalent of a
block device file, created as if somebody had copied, say,
<filename>/dev/sda</filename> to a file using the
<command>dd</command> command. <note>
<para>We don't recommend creating raw images by dd'ing
block device files, we discuss how to create raw
images later.</para>
</note></para>
</simplesect>
<simplesect>
<title>qcow2</title>
<para>The <link xlink:href="http://en.wikibooks.org/wiki/QEMU/Images">qcow2</link> (QEMU
copy-on-write version 2) format is commonly used with the KVM hypervisor. It has some
additional features over the raw format, such as:<itemizedlist>
<listitem>
<para>Using sparse representation, so the image size is smaller</para>
</listitem>
<listitem>
<para>Support for snapshots</para>
</listitem>
</itemizedlist></para>
<para>Because qcow2 is sparse, it's often faster to convert a raw image to qcow2 and upload
it then to upload the raw file.</para>
<para>
<note>
<para>Because raw images don't support snapshots, OpenStack Compute will
automatically convert raw image files to qcow2 as needed.</para>
</note>
</para>
</simplesect>
<simplesect>
<title>AMI/AKI/ARI</title>
<para>The <link
<para>We don't recommend creating raw images by dd'ing
block device files, we discuss how to create raw
images later.</para>
</note></para></listitem>
</varlistentry>
<varlistentry>
<term>qcow2</term>
<listitem><para>The <link xlink:href="http://en.wikibooks.org/wiki/QEMU/Images">qcow2</link> (QEMU
copy-on-write version 2) format is commonly used with the KVM hypervisor. It has some
additional features over the raw format, such as:<itemizedlist>
<listitem>
<para>Using sparse representation, so the image size is smaller</para>
</listitem>
<listitem>
<para>Support for snapshots</para>
</listitem>
</itemizedlist></para>
<para>Because qcow2 is sparse, it's often faster to convert a raw image to qcow2 and upload
it then to upload the raw file.</para>
<para>
<note>
<para>Because raw images don't support snapshots, OpenStack Compute will
automatically convert raw image files to qcow2 as needed.</para>
</note>
</para></listitem>
</varlistentry>
<varlistentry>
<term>AMI/AKI/ARI</term>
<listitem><para>The <link
xlink:href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html"
>AMI/AKI/ARI </link>format was the initial image
format supported by Amazon EC2. The image consists of
three files:<variablelist>
<varlistentry>
<term>AMI (Amazon Machine Image)</term>
format supported by Amazon EC2. The image consists of
three files:<itemizedlist>
<listitem><para>AMI (Amazon Machine Image):</para>
<para>This is a virtual machine image in raw
format, as described above.</para>
</listitem>
<listitem>
<para>This is a virtual machine image in raw
format, as described above.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>AKI (Amazon Kernel Image)</term>
<listitem>
<para>A kernel file that the hypervisor will
load initially to boot the image. For a
Linux machine, this would be a
<para>AKI (Amazon Kernel Image)</para>
<para>A kernel file that the hypervisor will
load initially to boot the image. For a
Linux machine, this would be a
<emphasis>vmlinuz</emphasis> file.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>ARI (Amazon Ramdisk Image)</term>
<listitem>
<para>An optional ramdisk file mounted at boot
time. For a Linux machine, this would be
an <emphasis>initrd</emphasis>
file.</para>
</listitem>
</varlistentry>
</variablelist></para>
</simplesect>
<simplesect>
<title>UEC tarball</title>
<para>A UEC (Ubuntu Enterprise Cloud) tarball is a gzipped tarfile that contains an AMI
file, AKI file, and ARI file.<note>
<para>Ubuntu Enterprise Cloud refers to a discontinued Eucalyptus-based Ubuntu cloud
solution that has been replaced by the OpenStack-based Ubuntu Cloud
Infrastructure.</para>
</note></para>
</simplesect>
<simplesect>
<title>VMDK</title>
<para>VMWare's ESXi hypervisor uses the <link
</para>
</listitem>
<listitem>
<para>ARI (Amazon Ramdisk Image)</para>
<para>An optional ramdisk file mounted at boot
time. For a Linux machine, this would be
an <emphasis>initrd</emphasis>
file.</para>
</listitem>
</itemizedlist></para></listitem>
</varlistentry>
<varlistentry>
<term>UEC tarball</term>
<listitem><para>A UEC (Ubuntu Enterprise Cloud) tarball is a gzipped tarfile that contains an AMI
file, AKI file, and ARI file.<note>
<para>Ubuntu Enterprise Cloud refers to a discontinued Eucalyptus-based Ubuntu cloud
solution that has been replaced by the OpenStack-based Ubuntu Cloud
Infrastructure.</para>
</note></para></listitem>
</varlistentry>
<varlistentry>
<term>VMDK</term>
<listitem><para>VMWare's ESXi hypervisor uses the <link
xlink:href="http://www.vmware.com/technical-resources/interfaces/vmdk.html"
>VMDK</link> (Virtual Machine Disk) format for images.</para>
</simplesect>
<simplesect>
<title>VDI</title>
<para>VirtualBox uses the <link
>VMDK</link> (Virtual Machine Disk) format for images.</para></listitem>
</varlistentry>
<varlistentry>
<term>VDI</term>
<listitem><para>VirtualBox uses the <link
xlink:href="https://forums.virtualbox.org/viewtopic.php?t=8046">VDI</link> (Virtual
Disk Image) format for image files. None of the OpenStack Compute hypervisors support
VDI directly, so you will need to convert these files to a different format to use them
with OpenStack.</para>
</simplesect>
<simplesect>
<title>VHD</title>
<para>Microsoft Hyper-V uses the VHD (Virtual Hard Disk) format for images..</para>
</simplesect>
<simplesect>
<title>VHDX</title>
<para>The version of Hyper-V that ships with Microsoft Server 2012 uses the newer <link
Disk Image) format for image files. None of the OpenStack Compute hypervisors support
VDI directly, so you will need to convert these files to a different format to use them
with OpenStack.</para></listitem>
</varlistentry>
<varlistentry>
<term>VHD</term>
<listitem><para>Microsoft Hyper-V uses the VHD (Virtual Hard Disk) format for images.</para></listitem>
</varlistentry>
<varlistentry>
<term>VHDX</term>
<listitem><para>The version of Hyper-V that ships with Microsoft Server 2012 uses the newer <link
xlink:href="http://technet.microsoft.com/en-us/library/hh831446.aspx">VHDX</link>
format, which has some additional features over VHD such as support for larger disk
sizes and protection against data corruption during power failures.</para>
</simplesect>
<simplesect>
<title>OVF</title>
<para><link xlink:href="http://www.dmtf.org/standards/ovf">OVF</link> (Open Virtualization
Format) is a packaging format for virtual machines, defined by the Distributed
Management Task Force (DMTF) standards group. An OVF package contains one or more image
files, a .ovf XML metadata file that contains information about the virtual machine, and
possibly other files as well.</para>
<para>An OVF package can be distributed in different ways. For example, it could be
distributed as a set of discrete files, or as a tar archive file with an .ova (open
virtual appliance/application) extension.</para>
<para>OpenStack Compute does not currently have support for OVF packages, so you will need
to extract the image file(s) from an OVF package if you wish to use it with
OpenStack.</para>
</simplesect>
<simplesect>
<title>ISO</title>
<para>The <link
format, which has some additional features over VHD such as support for larger disk
sizes and protection against data corruption during power failures.</para></listitem>
</varlistentry>
<varlistentry>
<term>OVF</term>
<listitem><para><link xlink:href="http://www.dmtf.org/standards/ovf">OVF</link> (Open Virtualization
Format) is a packaging format for virtual machines, defined by the Distributed
Management Task Force (DMTF) standards group. An OVF package contains one or more image
files, a .ovf XML metadata file that contains information about the virtual machine, and
possibly other files as well.</para>
<para>An OVF package can be distributed in different ways. For example, it could be
distributed as a set of discrete files, or as a tar archive file with an .ova (open
virtual appliance/application) extension.</para>
<para>OpenStack Compute does not currently have support for OVF packages, so you will need
to extract the image file(s) from an OVF package if you wish to use it with
OpenStack.</para></listitem>
</varlistentry>
<varlistentry>
<term>ISO</term>
<listitem><para>The <link
xlink:href="http://www.ecma-international.org/publications/standards/Ecma-119.htm"
>ISO</link> format is a disk image formatted with the read-only ISO 9660 (also known
as ECMA-119) filesystem commonly used for CDs and DVDs. While we don't normally think of
ISO a virtual machine image format, since ISOs contain bootable filesystems with an
installed operating system, you can treat them the same you treat other virtual machine
image files.</para>
</simplesect>
as ECMA-119) filesystem commonly used for CDs and DVDs. While we don't normally think of
ISO a virtual machine image format, since ISOs contain bootable filesystems with an
installed operating system, you can treat them the same you treat other virtual machine
image files.</para></listitem>
</varlistentry></variablelist>
<xi:include href="section_glance_image-formats.xml"/>
<xi:include href="section_glance-image-metadata.xml"/>
</chapter>

View File

@ -0,0 +1,699 @@
<?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>You can associate metadata with an image using the <literal>--property
<replaceable>key</replaceable>=<replaceable>value</replaceable></literal>
argument to <command>glance image-create</command>or <command>glance
image-update</command>. For
example:<screen><prompt>$</prompt> <userinput>glance image-update <replaceable>img-uuid</replaceable> --property architecture=arm --property hypervisor_type=qemu</userinput></screen>
If the following properties are set on an image, and the ImagePropertiesFilter scheduler
filter is enabled (which it is by default), then the scheduler will only consider
compute hosts that satisfy these properties:
<variablelist xml:id="image-metadata-properties">
<varlistentry>
<term>architecture</term>
<listitem>
<para>The CPU architecture that must be supported by the hypervisor, e.g.
<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 this field are:
<variablelist xml:id="image-architecture" spacing="compact">
<varlistentry>
<term><literal>alpha</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/DEC_Alpha"
>DEC 64-bit RISC</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>armv7l</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/ARM_architecture"
>ARM Cortex-A7 MPCore</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>cris</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/ETRAX_CRIS"
>Ethernet, Token Ring, AXis - Code Reduced Instruction Set</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>i686</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/X86"
>Intel sixth-generation x86</link>
(P6 microarchitecture)
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ia64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Itanium"
>Itanium</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>lm32</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Milkymist"
>Lattice Micro32</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>m68k</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Motorola_68000_family"
>Motorola 68000</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>microblaze</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MicroBlaze"
>Xilinx 32-bit FPGA (Big Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>microblazeel</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MicroBlaze"
>Xilinx 32-bit FPGA (Little Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mips</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 32-bit RISC (Big Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mipsel</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 32-bit RISC (Little Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mips64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 64-bit RISC (Big Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>mips64el</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/MIPS_architecture"
>MIPS 64-bit RISC (Little Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>openrisc</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/OpenRISC#QEMU_support"
>OpenCores RISC</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>parisc</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/PA-RISC"
>HP Precision Architecture RISC</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>parisc64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/PA-RISC"
>HP Precision Architecture 64-bit RISC</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ppc</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC 32-bit</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ppc64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC 64-bit</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>ppcemb</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/PowerPC"
>PowerPC (Embedded 32-bit)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>s390</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/S390"
>IBM Enterprise Systems Architecture/390</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>s390x</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/S390x"
>S/390 64-bit</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>sh4</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/SuperH"
>SuperH SH-4 (Little Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>sh4eb</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/SuperH"
>SuperH SH-4 (Big Endian)</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>sparc</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Sparc"
>Scalable Processor Architecture, 32-bit</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>sparc64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Sparc"
>Scalable Processor Architecture, 64-bit</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>unicore32</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Unicore"
>Microprocessor Research and Development Center
RISC Unicore32</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>x86_64</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/X86"
>64-bit extension of IA-32</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>xtensa</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Xtensa#Processor_Cores"
>Tensilica Xtensa configurable microprocessor core</link>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><literal>xtensaeb</literal></term>
<listitem>
<para>
<link xlink:href="http://en.wikipedia.org/wiki/Xtensa#Processor_Cores"
>Tensilica Xtensa configurable microprocessor core
(Big Endian)</link>
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>hypervisor_type</term>
<listitem>
<para>The hypervisor type. Allowed values include: <literal>xen</literal>,
<literal>qemu</literal>, <literal>kvm</literal>,
<literal>lxc</literal>, <literal>uml</literal>,
<literal>vmware</literal>, <literal>hyperv</literal>,
<literal>powervm</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>vm_mode</term>
<listitem>
<para>The virtual machine mode. This represents the host/guest ABI
(application binary interface) used for the virtual machine. Allowed
values are:<variablelist>
<varlistentry>
<term><literal>hvm</literal></term>
<listitem>
<para>Fully virtualized. This is the mode 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. This is the mode used by
LXC.</para>
</listitem>
</varlistentry>
</variablelist></para>
</listitem>
</varlistentry>
</variablelist>The following metadata properties are specific to the XenAPI driver:<variablelist>
<varlistentry>
<term>auto_disk_config</term>
<listitem>
<para>A boolean option. If true, the root partition on the disk will be
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 will only attempt
to resize if there is a single partition on the image, and only if the
partition is in ext3 or ext4 format.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>os_type</term>
<listitem>
<para>The operating system installed on the image, e.g.
<literal>linux</literal>, <literal>windows</literal>. The XenAPI
driver contains logic that will take different actions depending on the
value of the os_type parameter of the image. For example, for images
where <literal>os_type=windows</literal>, it will create a FAT32-based
swap partition instead of a Linux swap partition, and it will limit the
injected hostname to less than 16 characters.</para>
</listitem>
</varlistentry>
</variablelist></para>
<para>The following metadata properties are specific to the VMware API driver:
<variablelist>
<varlistentry>
<term>vmware_adaptertype</term>
<listitem>
<para>Indicates the virtual SCSI or IDE controller used by the hypervisor.
Allowed values: <literal>lsiLogic</literal>,
<literal>busLogic</literal>, <literal>ide</literal></para>
</listitem>
</varlistentry>
<varlistentry>
<term>vmware_ostype</term>
<listitem>
<para>A VMware GuestID which describes the operating system installed in the
image. This will be passed to the hypervisor when creating a virtual
machine. See <link xlink:href="http://www.thinkvirt.com/?q=node/181"
>thinkvirt.com</link> for a list of valid values. If this is not
specified, it will default 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>
<para>
In order to assist end-users in utilizing images, you may wish to put additional
common metadata on Glance images. By community agreement, the following metadata
keys may be used across Glance installations for the purposes described below.
<variablelist>
<varlistentry>
<term>instance_uuid</term>
<listitem>
<para>
For snapshot images, this is 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>. Following are the recognized values for
this property. 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. Allowed 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>
</para>
</section>

View File

@ -7,6 +7,9 @@ redirect 301 /openstack-object-storage/ /trunk/openstack-object-storage/
# Redirect for the 1.1 version of the Compute API going to v2
redirect 301 /api/openstack-compute/1.1/ /api/openstack-compute/2/
# Redirect image metadata and format reference
redirect 301 trunk/openstack-compute/admin/content/adding-images.html image-guide/content/image-formats.html
# Redirect config reference precisely
redirect 301 /trunk/openstack-compute/admin/content/compute-options-reference.html /trunk/config-reference/content/list-of-compute-config-options.html