Solved Virtualization: VT-x not detected

Hello, i am trying VirtualBox under an old pc with core2 duo processor(check link for Intel Virtualization Technology (VT-x)), it supports VT-x technology wich is used to accelerate virtualization tasks:
sysctl hw.model hw.machine hw.ncpu
hw.model: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz
hw.machine: amd64
hw.ncpu: 2
I can see the option enabled in BIOS:
vtx.jpg

Its enabled but when i check it in FreeBSD i get:
grep VT-x /var/run/dmesg.boot
VT-x: (disabled in BIOS) HLT,PAUSE
VT-x: (disabled in BIOS) HLT,PAUSE
And if i try to start a VM i get:
vboxmanage startvm "testVM" --type headless
Waiting for VM "testVM" to power on...
VBoxManage: error: VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ConsoleWrap, interface IConsole
VirtualBox module is loaded:
kldstat |grep vboxdrv
3 3 0xffffffff82794000 8fbc8 vboxdrv.ko
It doesnt make sense to me, do i have to take any extra step to get it working? Have i missunderstood any virtualization concept about VT-x?
 
Can you share the dmesg of the freshly boot system ? It seems both BIOS and CPU do support vt-x. Sometimes there were some additional security features in BIOS that could mess this up. What BIOS version (and FreeBSD for that matter) are you on?
 
The technical documents certainly indicate that your CPU has VT-x support.
The fact that you are not seeing a VT-x message on boot is a worry.
While you are pursuing other suggestions, I would also check the official Dell web site to see if there's a BIOS upgrade available for the motherboard of your particular model.
 

Intel® Core™2 Duo Processor P8400.

I had an Ergo Vista 631 <https://bsd-hardware.info/?probe=ce8d45af17&d=FreeBSD#cpu:intel-6-23-10-core-2-duo-p8700> with a Core™2 Duo Processor P8700 that similarly had a Yes for VT-x. My memory of this is fuzzy, however if I recall correctly, there was a technical explanation for the computer not meeting the requirements for VirtualBox (and the explanation was not BIOS). Unfortunately I can't find the explanation here, or in VirtualBox forums.

… Sometimes there were some additional security features in BIOS that could mess this up. …

+1

… trying VirtualBox …

Which version, exactly? <https://www.freshports.org/emulators/virtualbox-ose/#history> has 6.1.32_3 in quarterly, inferior to latest.

VERR_VMX_MSR_ALL_VMX_DISABLED

For a user of a Windows host, this was found with 6.1.32 but not 6.1.30. <https://forums.virtualbox.org/viewtopic.php?p=514029#p514029> and <https://www.virtualbox.org/wiki/Changelog-6.1#v34> make me suspect that the version is irrelevant in your case, but still …



… you might like to try packages from latest.

Some of your posts mention ZFS. Create, boot then activate a new boot environment then, if you like, switch to latest and pkg upgrade --yes.



virtualbox - VT-x is disabled in the BIOS for both all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED) - Stack Overflow – some of the answers are irrelevant (or don't make sense), but you might find something there.
 
Can you share the dmesg of the freshly boot system ? It seems both BIOS and CPU do support vt-x. Sometimes there were some additional security features in BIOS that could mess this up. What BIOS version (and FreeBSD for that matter) are you on?
I have searched for security BIOS parameters but havent found anything interesting.
My BIOS version is A11 Dell published A15 in 2011, i will try to update it but it will be hard because you need Windows/DOS system to update it.
My FreeBSD version:
MightyMax $ ~> uname -a
FreeBSD MightyMax.alfaexploit.com 13.0-RELEASE-p11 FreeBSD 13.0-RELEASE-p11 #0: Tue Apr 5 18:54:35 UTC 2022 root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
 
Which version, exactly? <https://www.freshports.org/emulators/virtualbox-ose/#history> has 6.1.32_3 in quarterly, inferior to latest.



… you might like to try packages from latest.

Some of your posts mention ZFS. Create, boot then activate a new boot environment then, if you like, switch to latest and pkg upgrade --yes.
I am using pkg version:
MightyMax $ ~> pkg info |grep virtualbox
virtualbox-ose-kmod-6.1.32_1 VirtualBox kernel module for FreeBSD
Trying packages to latests seems dangerous to me, im a new FreeBSD user, i have configured some parts of the system and readed some documentation but i am not an expert, im not so confident to try boot environments and update to latest.
 
I would imagine the requirements are much like Bhyve. POPCNT is the actual instruction set needed.
dmesg | grep POPCNT

And since this is only a 2 core CPU you could only get one VM working if any.
Maybe you are right, but it would be inetresting that virtualbox check says exactly the reason of failure, no te confusing message "VT-x is disabled in the BIOS for all CPU modes (VERR_VMX_MSR_ALL_VMX_DISABLED)" i think that in that case it should advise something like that: "not supported cpu" or something similar.
 
, i will try to update it but it will be hard because you need Windows/DOS system to update it.
You can use FreeDOS or similar installed on the USB stick. If there is newer version of BIOS it does make sense to update it (though I'd keep the original version too just in case, especially if that motherboard doesn't have backup BIOS).
It doesn't make sense to troubleshoot virtualbox in your case - OS is reporting vt-x disabled. You need to fix that before moving to VirtualBox. Or you could use qemu (while it's unfortunate it doesn't have hw acceleration under FreeBSD you'd be able to use it here).
If you can share the CPU information from dmesg, the message that is printed out early in the boot, that would be helpful.
 
I will try updating BIOS using FreeDOS.
CPU information: /var/run/dmesg.boot
---<<BOOT>>---
Copyright (c) 1992-2021 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 13.0-RELEASE-p11 #0: Tue Apr 5 18:54:35 UTC 2022
root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
VT(vga): resolution 640x480
CPU: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz (2266.70-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x10676 Family=0x6 Model=0x17 Stepping=6
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>
Features2=0x8e3fd<SSE3,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1>
AMD Features=0x20100800<SYSCALL,NX,LM>
AMD Features2=0x1<LAHF>
VT-x: (disabled in BIOS) HLT,PAUSE
TSC: P-state invariant, performance statistics
 
Thanks for the output. As we thought vmx is supported by the CPU. Can you share what model of motherboard you have? dmidecode can help retrieving this information. But then the best bet is to upgrade the BIOS.

But as I mentioned security feature in BIOS can mess this up too. Doublecheck you don't have SMX enabled (safer mode execution) or TXT (Intel Trusted execution technology). Bios may call it something different but you should recognize it when you see it (I know you mentioned you didn't finding anything, just doublecheck).
 
While most certainly it's true (and I even assume OP did that at some point) that must be some crappy BIOS that doesn't do this automatically. When you do 'exit saving changes' or alike it should detect this and power off itself.
 
that must be some crappy BIOS that doesn't do this automatically.
Oh, I agree with that. It does sound like a crappy BIOS. I've enabled this option countless times and never needed to turn the machine off.
 
… some crappy BIOS that doesn't do this automatically. …

Re: cold starts, I found this yesterday (for Award BIOS, not PhoenixBIOS):

1651497208734.png

– but chose to not link, because part of what's elsewhere on the page seems to be contradicted by part of what's in Stack Overflow.
 
Incredible, after upgrading BIOS, FreeBSD detected correct BIOS configuration and virtualbox started to work:
MightyMax # ~> grep VT-x /var/run/dmesg.boot
VT-x: HLT,PAUSE
VT-x: HLT,PAUSE

MightyMax # ~> vboxmanage startvm "testVM" --type headless
Waiting for VM "testVM" to power on...
VM "testVM" has been successfully started.

MightyMax # ~> vboxmanage list runningvms
"testVM" {d3b67afd-6aa8-4a6d-88e6-422aae61cb81}
 
Back
Top