加入社区

订阅:www.yunweipai.com/feed

QQ群:
1群:201777608 - 运维综合
2群:526871767 - 运维综合
3群:1689067 - Linux Shell脚本

微博:weibo.com/tektea

微信:yunweipai(或扫描以下二维码)

合作伙伴

小猪动图 - GIF动图素材库_GIF在线工具

在Linux和Windows下查看CPU是否支持虚拟化的方法

当我们要在一台已经安装了操作系统的服务器上部署虚拟化环境,为了确保后面虚拟化安装部署的成功,如何确认当前服务器的CPU是否支持虚拟化呢?

针对Linux和Windows,下面各自介绍一个查看的方法:

1. Windows平台:

搜索下载小工具:securable

securable

用户需要查看的也就是截图中的Hardware Virtualization选项。前面3种情况很简单:
NO:CPU不支持
Yes:CPU支持,赶快去将BIOS里的VT开关设为Enabled吧
Locked ON:CPU支持,且BIOS已经打开该功能
Locked OFF:BIOS当前禁用了虚拟化技术,但是不确定CPU本身是否支持。遇上这种情况,先去找找BIOS里面是否有Virtualization Technology并设置为Enabled,然后重新测试,若结果没变,那也还是没用。

2. Linux平台:

在终端执行cat /proc/cpuinfo命令,找到flags部分,如果其中输出有VMX或SVM,即表明支持虚拟化技术。

》如果是Intel CPU:
cat /proc/cpuinfo | grep vmx

》如果是AMD CPU
cat /proc/cpuinfo | grep svm ##(for AMD CPU)

补充说明:Linux显示的flags部分解释如下

fpu – Onboard FPU
vme – Virtual Mode Extensions
de – Debugging Extensions
pse – Page Size Extensions
tsc – Time Stamp Counter
msr – Model-Specific Registers
pae – Physical Address Extensions
mce – Machine Check Architecture
cx8 – CMPXCHG8 instruction
apic – Onboard APIC
sep – SYSENTER/SYSEXIT
mtrr – Memory Type Range Registers
pge – Page Global Enable
mca – Machine Check Architecture
cmov – CMOV instructions (plus FCMOVcc, FCOMI with FPU)
pat – Page Attribute Table
pse36 – 36-bit PSEs
pn – Processor serial number
clflush – CLFLUSH instruction
dts – Debug Store
acpi – ACPI via MSR
mmx – Multimedia Extensions
fxsr – FXSAVE/FXRSTOR, CR4.OSFXSR
sse – SSE
sse2 – SSE2
ss – CPU self snoop
ht – Hyper-Threading
tm – Automatic clock control
ia64 – IA-64 processor
pbe – Pending Break Enable
syscall – SYSCALL/SYSRET
mp – MP Capable
nx – Execute Disable
mmxext – AMD MMX extensions
fxsr_opt – FXSAVE/FXRSTOR optimizations
pdpe1gb – GB pages
rdtscp – RDTSCP
lm – Long Mode (x86-64)
3dnowext – AMD 3DNow! extensions
3dnow – 3DNow!
k8 – Opteron, Athlon64
k7 – Athlon
constant_tsc – TSC ticks at a constant rate
up – smp kernel running on up
pebs – Precise-Event Based Sampling
bts – Branch Trace Store
nonstop_tsc – TSC does not stop in C states
pni – SSE-3
pclmulqdq – PCLMULQDQ instruction
dtes64 – 64-bit Debug Store
monitor – Monitor/Mwait support
ds_cpl – CPL Qual. Debug Store
vmx – Hardware virtualization //intel的虚拟化技术VT技术
smx – Safer mode
est – Enhanced SpeedStep
tm2 – Thermal Monitor 2
ssse3 – Supplemental SSE-3
cid – Context ID
fma – Fused multiply-add
cx16 – CMPXCHG16B
xptr – Send Task Priority Messages
pdcm – Performance Capabilities
dca – Direct Cache Access
sse4_1 – SSE-4.1
sse4_2 – SSE-4.2
x2apic – x2APIC
aes – AES instructions
xsave – XSAVE/XRSTOR/XSETBV/XGETBV
avx – Advanced Vector Extensions
hypervisor – Running on a hypervisor
lahf_lm – LAHF/SAHF in long mode
cmp_legacy – If yes HyperThreading not valid
svm – Secure virtual machine //AMD的虚拟化技术AMD-V
extapic – Extended APIC space
cr8legacy – CR8 in 32-bit mode
abm – Advanced bit manipulation
sse4a – SSE-4A
ibs – Instruction Based Sampling
sse5 – SSE-5
skinit – SKINIT/STGI instructions
wdt – Watchdog timer

转载请注明:运维派 » 在Linux和Windows下查看CPU是否支持虚拟化的方法

0
4.3k
2