我试图在旧的Supermicro主板上安装一个虚拟化服务器(主要用于实验),使用qemu / kvm(在Debian / jessie上运行,内核为3.16.0-4-amd64 )
该主板配备了Intel Xeon CPU,据我所知它应该支持虚拟化:
$ egrep '^flags.*(vmx|svm)' /proc/cpuinfo flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc pebs bts nopl pni dtes64 monitor ds_cpl vmx est cid cx16 xtpr pdcm lahf_lm tpr_shadow $
不pipe是否存在vmx标志,KVM都拒绝初始化:
$ dmesg | grep kvm [ 8.721594] kvm: disabled by bios $
kvm-intel模块无法加载,并且qemu退回到仿真模式(这真的很慢…)
所以我重新启动了主机,进入了BIOS,并在高级CPU设置中打开了虚拟化(它确实被closures了)。
不幸的是,这并没有改变ι,KVM仍然抱怨在BIOS中被禁用。
这里是关于我的硬件(CPU /主板)的一些细节:
root:~# dmidecode -t2 # dmidecode 2.12 SMBIOS 2.4 present. Handle 0x0002, DMI type 2, 8 bytes Base Board Information Manufacturer: Supermicro Product Name: X7DB8 Version: PCB Version Serial Number: 0123456789 root:~# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 2 Socket(s): 2 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 15 Model: 6 Model name: Intel(R) Xeon(TM) CPU 3.00GHz Stepping: 4 CPU MHz: 3000.146 BogoMIPS: 6000.62 Virtualization: VT-x L1d cache: 16K L2 cache: 2048K NUMA node0 CPU(s): 0-7 root:~# cpuid -1 CPU: vendor_id = "GenuineIntel" version information (1/eax): processor type = primary processor (0) family = Intel Pentium 4/Pentium D/Pentium Extreme Edition/Celeron/Xeon/Xeon MP/Itanium2, AMD Athlon 64/Athlon XP-M/Opteron/Sempron/Turion (15) model = 0x6 (6) stepping id = 0x4 (4) extended family = 0x0 (0) extended model = 0x0 (0) (simple synth) = Intel Pentium 4 Processor 6x1 (Cedar Mill C1) / Pentium Extreme Edition Processor 955 (Presler C1) / Pentium D Processor 9xx (Presler C1) / Xeon Processor 5000 (Dempsey C1) / Celeron D Processor 3xx (Cedar Mill C1), 65nm miscellaneous (1/ebx): process local APIC physical ID = 0x1 (1) cpu count = 0x4 (4) CLFLUSH line size = 0x8 (8) brand index = 0x0 (0) brand id = 0x00 (0): unknown feature information (1/edx): x87 FPU on chip = true virtual-8086 mode enhancement = true debugging extensions = true page size extensions = true time stamp counter = true RDMSR and WRMSR support = true physical address extensions = true machine check exception = true CMPXCHG8B inst. = true APIC on chip = true SYSENTER and SYSEXIT = true memory type range registers = true PTE global bit = true machine check architecture = true conditional move/compare instruction = true page attribute table = true page size extension = true processor serial number = false CLFLUSH instruction = true debug store = true thermal monitor and clock ctrl = true MMX Technology = true FXSAVE/FXRSTOR = true SSE extensions = true SSE2 extensions = true self snoop = true hyper-threading / multi-core supported = true therm. monitor = true IA64 = false pending break event = true feature information (1/ecx): PNI/SSE3: Prescott New Instructions = true PCLMULDQ instruction = false 64-bit debug store = true MONITOR/MWAIT = true CPL-qualified debug store = true VMX: virtual machine extensions = true SMX: safer mode extensions = false Enhanced Intel SpeedStep Technology = true thermal monitor 2 = false SSSE3 extensions = false context ID: adaptive or shared L1 data = true FMA instruction = false CMPXCHG16B instruction = true xTPR disable = true perfmon and debug = true process context identifiers = false direct cache access = false SSE4.1 extensions = false SSE4.2 extensions = false extended xAPIC support = false MOVBE instruction = false POPCNT instruction = false time stamp counter deadline = false AES instruction = false XSAVE/XSTOR states = false OS-enabled XSAVE/XSTOR = false AVX: advanced vector extensions = false F16C half-precision convert instruction = false RDRAND instruction = false hypervisor guest status = false [...] #
所以我的问题是:有人知道如何在CPU /主板上启用虚拟化,或者我只是运气不好?
除了在BIOS中打开VT,还需要执行一个完整的电源循环 – 完全closures主机,甚至拔出电源线并按住电源button几秒钟,然后再重新启动。
顺便说一句,你可能已经错过了BIOS,但你也希望启用NX,而不仅仅是VT。