Adding images with glance image-createTo add a virtual machine image to glance, use the
glance image-create command.To modify image properties, use the glance
image-update command.The image-create command requires that you
specify a name for your image with the
--name parameter, the disk format with
the --disk-format parameter, and the
container format with --container-format
parameter. Pass in the file through standard input or by using the
file command. For example:$glance image-create --name myimage --disk-format=raw --container-format=bare < /path/to/file.imgor$glance image-create --name myimage --disk-format=raw --container-format=bare --file /path/to/file.imgImage MetadataYou can associate metadata with an image using the
--property
key=value
argument to glance image-create or
glance image-update. For example:$glance image-update img-uuid --property architecture=arm --property hypervisor_type=qemuIf 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.architecture: The CPU architecture
that must be supported by the hypervisor, such as,
x86_64, arm,
ppc64. Run uname -m to
get the architecture of a machine. We strongly recommend using
the architecture data vocabulary defined by the libosinfo project for
this purpose. Recognized values for the field architecture
are:
Image metadata properties: architecture
Architecture
Description
alpha
DEC
64-bit RISC
armv7l
ARM Cortex-A7 MPCore
cris
Ethernet, Token Ring, AXis - Code Reduced Instruction
Set
i686
Intel sixth-generation x86 (P6 micro
architecture)
ia64
Itanium
lm32
Lattice Micro32
m68k
Motorola 68000
microblaze
Xilinx 32-bit FPGA (Big Endian)
microblazeel
Xilinx 32-bit FPGA (Little Endian)
mips
MIPS 32-bit RISC (Big Endian)
mipsel
MIPS 32-bit RISC (Little Endian)
mips64
MIPS 64-bit RISC (Big Endian)
mips64el
MIPS 64-bit RISC (Little Endian)
openrisc
OpenCores RISC
parisc
HP Precision Architecture RISC
parisc64
HP Precision Architecture 64-bit RISC
ppc
PowerPC 32-bit
ppc64
PowerPC 64-bit
ppcemb
PowerPC (Embedded 32-bit)
s390
IBM
Enterprise Systems Architecture/390
s390x
S/390 64-bit
sh4
SuperH SH-4 (Little Endian)
sh4eb
SuperH SH-4 (Big Endian)
sparc
Scalable Processor Architecture, 32-bit
sparc64
Scalable Processor Architecture, 64-bit
unicore32
Microprocessor Research and Development Center RISC
Unicore32
hypervisor_typeThe hypervisor type. Valid values are
xen, qemu,
kvm, lxc,
uml, vmware,
hyperv, and
powervm.vm_modeThe virtual machine mode. This represents the
host/guest application binary interface (ABI ) used for
the virtual machine. Valid values are:hvmFully virtualized. Used by QEMU and
KVM.xenXen 3.0 paravirtualized.umlUser Mode Linux paravirtualized.exeExecutables in containers. Used by LXC.The following metadata properties are specific to
the XenAPI driver:auto_disk_configA 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.os_typeThe operating system installed on the image,
such as, linux,
windows. The XenAPI driver
logic depends on the value of the
os_type parameter for the
image. For example, for images where
os_type=windows,
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.The following metadata properties are specific to
the VMware API driver:vmware_adaptertypeThe virtual SCSI or IDE controller used by the
hypervisor. Valid values are
lsiLogic,
busLogic, and
ide.vmware_ostypeA 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 thinkvirt.com for a list of valid
values. If you do not specify this parameter, it
defaults to otherGuest.vmware_image_versionCurrently unused. Set it to
1.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:instance_uuidFor snapshot images, the UUID of the server
used to create this image.kernel_idThe ID of image stored in Glance that should
be used as the kernel when booting an AMI-style
image.ramdisk_idThe ID of image stored in Glance that should
be used as the ramdisk when booting an AMI-style
image.os_versionThe operating system version as specified by
the distributor.os_distroThe 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 libosinfo
project. 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: archThis is: Arch LinuxDo not use:
archlinux, or
org.archlinuxcentosThis is: Community Enterprise
Operating SystemDo not use:
org.centosCentOSdebianThis is: DebianDo not use:
Debian, or
org.debianfedoraThis is: FedoraDo not use:
Fedora,
org.fedora, or
org.fedoraprojectfreebsdThis is: FreeBSDDo not use:
org.freebsd,
freeBSD, or
FreeBSDgentooThis is: Gentoo LinuxDo not use:
Gentoo, or
org.gentoomandrakeThis is: Mandrakelinux (MandrakeSoft)Do not use:
mandrakelinux, or
MandrakeLinuxmandrivaThis is: Mandriva LinuxDo not use:
mandrivalinuxmesThis is: Mandriva Enterprise ServerDo not use:
mandrivaent, or
mandrivaESmsdosThis is: Microsoft Disc Operating
SystemDo not use: ms-dosnetbsdThis is: NetBSDDo not use:
NetBSD, or
org.netbsdnetwareThis is: Novell NetWareDo not use:
novell, or
NetWareopenbsdThis is: OpenBSDDo not use:
OpenBSD, or
org.openbsdopensolarisDo not use:
OpenSolaris,or
org.opensolarisopensuseThis is: openSUSEDo not use: suse,
SuSE, or
org.opensuserhelThis is: Red Hat Enterprise LinuxDo not use:
redhat,
RedHat, or
com.redhatsledThis is: SUSE Linux Enterprise
DesktopDo not use:
com.suseubuntuThis is: UbuntuDo not use:
Ubuntu,
com.ubuntu,
org.ubuntu, or
canonicalwindowsThis is: Microsoft WindowsDo not use:
com.microsoft.server,
or windoze