Solved vm-bhyve could not run with VT-x enabled

Hello, My system is FreeBSD 14.0-RELEASE-p6, I got
Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz (2000.29-MHz K8-class CPU)
and VT-x: HLT,PAUSE VT-x, enabled by modified the bios.

It was enabled before upgrading the bios to latest. The lasted bios does not have the option and vt is disable by default. Somehow I managed to flash a mod bios to re-enable the VT-x. I also use symcmos tool to modify the register of bios setting from 000 to 001 which enabled the VT.

My dmesg shows VT-x: HLT,PAUSE
I can run virtualbox with no problem.

However when I try to run vm-bhyve,
Code:
sh:
service vm start
I got
Code:
sh:
/usr/local/sbin/vm: ERROR: kernel vmm not initialised (no VT-x / AMD SVM cpu support?)

I put vm_disable_host_checks="YES" in rc.conf
vm starts however whenever I run vm command it give me error like this
Code:
sh:
/usr/local/sbin/vm: ERROR: unable to load vmm.ko!
I tired sudo kldunload vmm.
I manged to this step
Code:
sh:
sudo vm install void void-live-x86_64-20240314-base.iso
Starting void
  * found guest in /vm/void
  * booting...
Code:
sh:
sudo vm list
NAME  DATASTORE  LOADER  CPU  MEMORY  VNC  AUTO  STATE
void  default    uefi     2   1G      -    No   Stopped
vm is not running. I guest there is something wrong with the VT-x I could not run vm-BHYVE. I follow this https://vermaden.wordpress.com/2023/08/18/freebsd-bhyve-virtualization/
and this https://srobb.net/vm-bhyve.html and my vm is not running I could not connect to it using vnc viewer

Any ideas? Thanks
 
I think my cpu does not support POPCNT
I don't think it has either, but I couldn't find any information about it on Intel's website. The information should be shown in dmesg(8) and/or /var/log/messages:
Code:
Apr 13 19:19:33 chibacity kernel: CPU: Intel(R) Xeon(R) CPU E5-2667 0 @ 2.90GHz (2893.15-MHz K8-class CPU)
Apr 13 19:19:33 chibacity kernel:   Origin="GenuineIntel"  Id=0x206d7  Family=0x6  Model=0x2d  Stepping=7
Apr 13 19:19:33 chibacity kernel:   Features=0xbfebfbff<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,HTT,TM,PBE>
Apr 13 19:19:33 chibacity kernel:   Features2=0x1fbee3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
Apr 13 19:19:33 chibacity kernel:   AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
Apr 13 19:19:33 chibacity kernel:   AMD Features2=0x1<LAHF>
Apr 13 19:19:33 chibacity kernel:   XSAVE Features=0x1<XSAVEOPT>
Apr 13 19:19:33 chibacity kernel:   VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
Apr 13 19:19:33 chibacity kernel:   TSC: P-state invariant, performance statistics
So check your logs and see which features your CPU has.
 
I don't think it has either, but I couldn't find any information about it on Intel's website. The information should be shown in dmesg(8) and/or /var/log/messages:
Code:
Apr 13 19:19:33 chibacity kernel: CPU: Intel(R) Xeon(R) CPU E5-2667 0 @ 2.90GHz (2893.15-MHz K8-class CPU)
Apr 13 19:19:33 chibacity kernel:   Origin="GenuineIntel"  Id=0x206d7  Family=0x6  Model=0x2d  Stepping=7
Apr 13 19:19:33 chibacity kernel:   Features=0xbfebfbff<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,HTT,TM,PBE>
Apr 13 19:19:33 chibacity kernel:   Features2=0x1fbee3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
Apr 13 19:19:33 chibacity kernel:   AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
Apr 13 19:19:33 chibacity kernel:   AMD Features2=0x1<LAHF>
Apr 13 19:19:33 chibacity kernel:   XSAVE Features=0x1<XSAVEOPT>
Apr 13 19:19:33 chibacity kernel:   VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
Apr 13 19:19:33 chibacity kernel:   TSC: P-state invariant, performance statistics
So check your logs and see which features your CPU has.

It seems you're indeed out of luck. POPCNT (POPCNT and LZCNT) starts at the Nehalem microarchitecture: "codename for Intel's 45 nm microarchitecture released in November 2008". List of Intel Core 2 processors (see Core 2 Duo T7200) shows your T7200 is from Release Date August 2006 ("(standard-voltage, 65 nm)"); thus before the start of the Nehalem microarchitecture.
Thank you so much.
 
Back
Top