Checking cpuinfo information on an ESXi host
search cancel

Checking cpuinfo information on an ESXi host

book

Article ID: 302462

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article describes how to check if the NX/XD (No eXecute/eXecute Disable) flag is set on an ESXi host.


Symptoms:



Environment

VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Embedded
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.1
VMware ESXi 4.1.x Embedded
VMware vSphere ESXi 5.5
VMware ESXi 4.0.x Embedded
VMware ESXi 4.0.x Installable
VMware vSphere ESXi 5.0

Resolution

On an ESX host, you can check cpuinfo by looking at the flags line in the /proc/cpuinfo file. However, this file does not exist on ESXi hosts.

You can also determine this information using the command vim-cmd hostsvc/hosthardware.
The output is similar to:
~ # vmware -v
VMware ESX Server 3i 3.5.0 build-158869
~ # vim-cmd hostsvc/hosthardware
(vim.host.HardwareInfo) {
dynamicType = <unset>,
systemInfo = (vim.host.SystemInfo) {
dynamicType = <unset>,
vendor = "Dell Inc.",
model = "PowerEdge 2950",
uuid = "44454c4c-4800-104e-8035-b1c04f58324a",
},
cpuInfo = (vim.host.CpuInfo) {
dynamicType = <unset>,
numCpuPackages = 2,
numCpuCores = 4,
numCpuThreads = 4,
hz = 2327523877,
},
cpuPkg = (vim.host.CpuPackage) [
(vim.host.CpuPackage) {
dynamicType = <unset>,
index = 0,
vendor = "intel",
hz = 2327523877,
busHz = 332503411,
description = "Intel(R) Xeon(R) CPU 5140 @ 2.33GHz",
threadId = (short) [
0,
1
],
cpuFeature = (vim.host.CpuIdInfo) [
(vim.host.CpuIdInfo) {
dynamicType = <unset>,
level = 0,
vendor = <unset>,
eax = "0000:0000:0000:0000:0000:0000:0000:1010",
ebx = "0111:0101:0110:1110:0110:0101:0100:0111",
ecx = "0110:1100:0110:0101:0111:0100:0110:1110",
edx = "0100:1001:0110:0101:0110:1110:0110:1001",
},
(vim.host.CpuIdInfo) {
dynamicType = <unset>,
level = 1,
vendor = <unset>,
eax = "0000:0000:0000:0000:0000:0110:1111:0110",
ebx = "0000:0000:0000:0010:0000:1000:0000:0000",
ecx = "0000:0000:0000:0100:1110:0011:1011:1101",
edx = "1011:1111:1110:1011:1111:1011:1111:1111",
},
: : : : : : : : : :
(vim.host.CpuIdInfo) {
dynamicType = <unset>,
level = -2147483647,
vendor = <unset>,
eax = "0000:0000:0000:0000:0000:0000:0000:0000",
ebx = "0000:0000:0000:0000:0000:0000:0000:0000",
ecx = "0000:0000:0000:0000:0000:0000:0000:0001",
edx = "0010:1000:0001:0000:0000:1000:0000:0000",
The NX/XD status can be determined by looking at bit 20 of 0x8000 0001:EDX, as described in x86 Feature Bits and Implementation Differences in VMware VMotion and CPU Compatibility.
Note: The level of 0x80000001 actually appears in signed base-ten integer format, so it shows up as -2147483647. The NX bit is highlighted in red in the above example.


Additional Information

VMware's CPUID ISO can be run in a virtual machine on an ESX or ESXi host, this will give the CPU information of the underlying hardware, including the NX/XD bit. It can be downloaded from http://download3.vmware.com/software/vi/VMware-CPU-Compatibility-e.x.p-160658.zip.

Note: The following are situations where the CPUID ISO may not be accurate when checking for VT or NX being enabled:
  1. If EVC is enabled or manual CPU masks have been applied to the Virtual Machine, then the Virtual Machine will not be able to see beyond these.
  2. If there are CPU features that ESX/ESXi does not use, it may not present them to VMX processes.
There are other conceivable situations where it will not be 100% accurate. To get all features you would need to boot the host from the ISO directly.
ESXi ホストで cpuinfo 情報を確認する
在 ESXi 主机上检查 cpuinfo 信息