标签:
目前通过ComputeCapabilitiesFilter 是可以做到cpu 指令集的filter,ComputeCapabilitiesFilter 是通过flavor的extra_spe来传递的。
传递的形式为:capabilities:cpu_info:features=ssse3
通过image来限定有2种:
ImagePropertiesFilter
根据instance‘s image上定义的属性来过滤,熟悉包括
architecture, hypervisor type, hypervisor version (for Xen hypervisor type only), and virtual machine mode。
其中,他们的值可以为:
arch:
ALL = [
ALPHA,
ARMV6,
ARMV7,
ARMV7B,
AARCH64,
CRIS,
I686,
IA64,
LM32,
M68K,
MICROBLAZE,
MICROBLAZEEL,
MIPS,
MIPSEL,
MIPS64,
MIPS64EL,
OPENRISC,
PARISC,
PARISC64,
PPC,
PPCLE,
PPC64,
PPC64LE,
PPCEMB,
S390,
S390X,
SH4,
SH4EB,
SPARC,
SPARC64,
UNICORE32,
X86_64,
XTENSA,
XTENSAEB,
]
HVType:
ALL = (
BAREMETAL,
BHYVE,
DOCKER,
FAKE,
HYPERV,
IRONIC,
KQEMU,
KVM,
LXC,
LXD,
OPENVZ,
PARALLELS,
PHYP,
QEMU,
TEST,
UML,
VBOX,
VIRTUOZZO,
VMWARE,
XEN,
ZVM,
)
VMMode:
ALL = [HVM, XEN, UML, EXE]
如果image->properties中没有这些属性,则通过过滤;如果有这些属性,而host->capabilities->supportedinstances没有,返回False。
比如,
$ glance image-update img-uuid --property architecture=arm --property hypervisor_type=qemu
2 AggregateImagePropertiesIsolation:
匹配属性定义在 image的元数据中,用于对这些 aggregate 组进行匹配
比如下面这个 aggregate 分组 myWinAgg 将 windows 系统作为元数据 os=windows
$ nova aggregate-details MyWinAgg
+----+----------+-------------------+------------+---------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+----------+-------------------+------------+---------------+
| 1 | MyWinAgg | None | ‘sf-devel‘ | ‘os=windows‘ |
+----+----------+-------------------+------------+---------------+
在这个理子中,因为下面 win-2012的镜像中有 windows 的属性, 通过他启动的虚拟机实例会再 sf-devel 分组上启动.
$ glance image-show Win-2012
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| Property ‘os‘ | windows |
| checksum | f8a2eeee2dc65b3d9b6e63678955bd83 |
| container_format | ami |
| created_at | 2013-11-14T13:24:25 |
标签:
原文地址:http://www.cnblogs.com/allcloud/p/5464101.html