Ubuntu Server 22.04:CPU 不支持虚拟化,但 BIOS 中启用了 VT-x

Ubuntu Server 22.04:CPU 不支持虚拟化,但 BIOS 中启用了 VT-x

我正在尝试在 Ubuntu Server 22.04 主机上运行带有 Windows 10 的无头 Virtualbox 虚拟机。我过去(大约 2 年前)曾在这台机器上使用过 Virtualbox,并且成功了。但是,当我执行时,vboxmanage startvm myvirtmachine --type headless我收到以下错误消息:

Waiting for VM "myvirtmachine" to power on...
VBoxManage: error: VT-x is not available (VERR_VMX_NO_VMX)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole

Intel Virtualization Technology在 BIOS 中已启用,但我加载了默认设置并再次明确启用它(找不到任何secure boot设置来禁用它)。即使在那之后,当我egrep -c '(vmx|svm)' /proc/cpuinfo在终端中运行时,我得到了0结果(我读到如果返回大于零,则意味着你的 CPU 确实支持虚拟化)。我知道我的 CPU 支持虚拟化,因为我过去在这台机器上使用过 virtualbox。我在网上读到的一件事是 Docker(它确实已安装并正在运行)使用 Hyper-V,这会与 VT-x 混淆,但这对应于 Windows 主机系统,而我的情况并非如此。我安装了它kvm,运行时kvm-ok我得到:

INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used

如何解决这个问题,我应该在哪里寻找线索?这可能是内核问题吗?

编辑:我讨论的硬件是一台旧的联想 b570 笔记本电脑,配备 4GB RAB 和 2 核英特尔奔腾 CPU。以下是输出lscpu

Architecture:           x86_64
  CPU op-mode(s):       32-bit, 64-bit
  Address sizes:        36 bits physical, 48 bits virtual
  Byte Order:           Little Endian
CPU(s):                 2
  On-line CPU(s) list:  0,1
Vendor ID:              GenuineIntel
  Model name:           Intel(R) Pentium(R) CPU B950 @ 2.10GHz
    CPU family:         6
    Model:              42
    Thread(s) per core: 1
    Core(s) per socket: 2
    Socket(s):          1
    Stepping:           7
    CPU max MHz:        2100.0000
    CPU min MHz:        800.0000
    BogoMIPS:           4190.33
    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 ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology nonstop_tsc cpuid aperfm perf pni pclmulqdq dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer xsave lahf_lm epb pti ssbd ibrs ibpb stibp xsaveopt dtherm arat pln pts md_clear flush_l1d
Caches (sum of all):    
  L1d:                  64 KiB (2 instances)
  L1i:                  64 KiB (2 instances)
  L2:                   512 KiB (2 instances)
  L3:                   2 MiB (1 instance)
NUMA:                   
  NUMA node(s):         1
  NUMA node0 CPU(s):    0,1
Vulnerabilities:        
  Itlb multihit:        KVM: Mitigation: VMX unsupported
  L1tf:                 Mitigation; PTE Inversion
  Mds:                  Mitigation; Clear CPU buffers; SMT disabled
  Meltdown:             Mitigation; PTI
  Mmio stale data:      Not affected
  Retbleed:             Not affected
  Spec store bypass:    Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:           Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:           Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling
  Srbds:                Not affected
  Tsx async abort:      Not affected

相关内容