1 、條件
CPU類型:在一個資源池中,必須爲同廠商的CPU 類型(Intel CPU或者AMD CPU)
操作系統:同一版本的XenServer ,補丁包相同。
時間:兩個XenServer系統時間要相同,建議使用NTP服務器
許可證:加入資源池之前,需要有測試版或者正式版許可證服務器
其他條件:加入池的這臺XenServer,本身無虛擬機以及沒掛載任何存儲。(除了本地存儲)
注:不能在一個池內混用 Intel 和 AMD 的 CPU。另外需要 CPU 能夠支持 Intel FlexMigration 或 AMD EnhanceMigration 功能。這個功能是提供 VM 虛機 CPU Feature Mask 的功能,可以屏蔽一些 CPU 的特性指令集。
2、環境
Host | 型號 | CPU |
XS1 | LENOVO WQ R680 G7 | Intel(R) Xeon(R) CPU E7- 4850 |
XS2 | LENOVO WQ R680 G7 | Intel(R) Xeon(R) CPU E7- 4850 |
XS3 | HP ProLiant DL580 | Intel(R) Xeon(R) CPU E7- 4820 |
系統 | 版本 |
Citrix XenServer | 6.0.201 |
(1)、查看CPU類型 使用命令:xe host-cpu-info查看三臺XS的型號
[root@Server1 ~]# xe host-cpu-info
cpu_count : 20
vendor: GenuineIntel
speed: 1995.040
modelname: Intel(R) Xeon(R) CPU E7- 4850 @ 2.00GHz
family: 6
model: 47
stepping: 2
flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht constant_tsc nonstop_tsc aperfmperf pni vmx est ssse3 sse4_1 sse4_2 x2apic popcnt hypervisor ida arat tpr_shadow vnmi flexpriority ept vpid
features: 00bee3fd-bfebfbff-00000001-2c000800
features_after_reboot: 00bee3fd-bfebfbff-00000001-2c000800
physical_features: 00bee3fd-bfebfbff-00000001-2c000800
maskable: full
[root@Server2 ~]# xe host-cpu-info
cpu_count : 20
vendor: GenuineIntel
speed: 1995.082
modelname: Intel(R) Xeon(R) CPU E7- 4850 @ 2.00GHz
family: 6
model: 47
stepping: 2
flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht constant_tsc nonstop_tsc aperfmperf pni vmx est ssse3 sse4_1 sse4_2 x2apic popcnt hypervisor ida arat tpr_shadow vnmi flexpriority ept vpid
features: 00bee3fd-bfebfbff-00000001-2c000800
features_after_reboot: 00bee3fd-bfebfbff-00000001-2c000800
physical_features: 00bee3fd-bfebfbff-00000001-2c000800
maskable: full
[root@Server3 ~]# xe host-cpu-info
cpu_count : 16
vendor: GenuineIntel
speed: 1997.904
modelname: Intel(R) Xeon(R) CPU E7- 4820 @ 2.00GHz
family: 6
model: 47
stepping: 2
flags: fpu de tsc msr pae mce cx8 apic sep mtrr mca cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc nonstop_tsc aperfmperf pni pclmulqdq vmx est ssse3 sse4_1 sse4_2 x2apic popcnt aes hypervisor ida arat tpr_shadow vnmi flexpriority ept vpid
features: 02bee3ff-bfebfbff-00000001-2c100800
features_after_reboot: 02bee3ff-bfebfbff-00000001-2c100800
physical_features: 02bee3ff-bfebfbff-00000001-2c100800
maskable: full
(2)、從①中獲取CPU的features值
Server1 features:00bee3fd-bfebfbff-00000001-2c000800
Server2 features:00bee3fd-bfebfbff-00000001-2c000800
Server3 features:02bee3ff-bfebfbff-00000001-2c100800
參數說明:features 當前 CPU 使用的 feature
features_after_reboot 修改後重啓使用的 feature
physical_features CPU 物理上支持的 feature
maskable:Full 表示該 CPU 硬件支持修改 FeatureMask
通過兩臺不同的CPU的features值,兩者“相與”,可以計算出COMMON MASK
我們可以通過一個簡單的方法,不用手動去算。從官網下載compare-cpu的文件。是一個二進制文件,下載好通過SSH 或者FTP傳到XenServer上。我放在root目錄下面
地址:http://www.citrix.com/static/ready/downloads/XenServer_6.0.x_Server_Hardware_Self-Test_Kit.zip
a、把①獲取的的cpu信息,在XenServer分別保存成兩個文件E4820.txt和E4850.txt
b、修改compare-cpu用戶權限 方法:進入compare-cpu所在的目錄,賦權:chmod -R 777 compare-cpu
在compare-cpu所在的目錄下輸入:./compare-cpu E4850.txt E4820.txt -v
得出common mask爲:00BEE3FD-BFEBFBFF-00000001-2C000800
在三臺XenServer上執行一下命令:
xe host-set-cpu-features features=00BEE3FD-BFEBFBFF-00000001-2C000800 UUID=HOST_UUID 後面可以UUID也可以不跟。
最後需要重啓三臺XenServer,然後加入資源池即可!
重啓後Server3(HP ProLiant DL580)查看features值如圖