How do I enable hardware virtualization technology (VT-x) for use in Virtualbox?

368,358

Solution 1

Before changing BIOS settings we may want to see if hardware virtualization (VT-x for Intel, AMD-V for AMD processors) is supported by our CPU.

From a terminal issue

grep --color vmx /proc/cpuinfo ## for an Intel processor
grep --color svm /proc/cpuinfo ## for an AMD processor

If virtualization was supported the flag vmx (for Intel CPUs) or svm (for AMD CPUs) will be colored.

enter image description here

In case the CPU supports hardware virtualization, we need to enable it in the computer BIOS to be able to use it.

Also read How to determine if CPU VT extensions are enabled in bios? for other approaches.

Enter the BIOS (often pressing Del or F12 while booting) and see with the manual how it is named there. Each BIOS appears to have a different name fror this. Search for Virtualization, Virtualization Technology (VT-x), SVM, VMX, or similar, here shown for an Award BIOS:

Award BIOS Virtualization Flag

For an example screenshot of an Asus EFI-BIOS see this answer on SU.

Set this entry to Enabled in case it was not done yet. Some BIOS need a cold boot (i.e. boot from power off state) to be able to use hardware virtualization.

Hardware virtualization can then be chosen in the virtual machine's System -> Acceleration settings:

enter image description here

By this the VM uses hardware virtualization for optimal performance. We would even be able to run a 64-bit guest OS on a 32-bit host for testing.

Solution 2

I had the same exact error, and fixed it by dropping the 4095 GB to 3072 MB (3 GB). This is because it was 32-bit. I think the more than 3 GB is throwing it off.

Share:
368,358

Related videos on Youtube

user132520
Author by

user132520

Updated on September 18, 2022

Comments

  • user132520
    user132520 over 1 year

    So I am trying to run Ubuntu in a virtualbox but on installing 12.10 from the .iso I was greeted by a warning telling me that audio wouldn't work then I pressed next and this popped up:

    Failed to open a session for the virtual machine Tux 3
    VT-x features locked or unavailable in MSR
    (VERR_VMX_MSR_LOCKED_OR_DISABLED)
    Details
    
    Result Code: 
    E_FAIL (0x80004005)
    Component: 
    Console
    Interface: 
    IConsole {db7ab4ca-2a3f-4183-9243-c1208da92392}
    

    And then it doesn't work.

    I assigned 4GB of my 8GB to Ubuntu, 100 dynamically allocated GB of space, and 12MB of graphics memory. I'm running an Asus p8z77 V LX mobo with an Intel i5 3550 processor.

    Downloaded 12.04.2 on my PC and tried again. Still getting the same message.

  • Ads20000
    Ads20000 almost 10 years
    I still get this problem. My 'vmx' is coloured when running the command above and I've gone and enabled 'virtualisation' in the BIOS as well.
  • Boris Churzin
    Boris Churzin almost 10 years
    After changing the bios setting to ON, don't just restart your computer, turn it off and then on! Apparently just restart doesn't do the thing :/
  • Kaushik Acharya
    Kaushik Acharya over 9 years
    In my case 'vmx' was colored. But when I checked BIOS 'virtualisation' wasn't enabled. So it seems checking terminal command suggested by Takkat isn't a confirmation that 'virtualisation' is enabled.
  • Takkat
    Takkat over 9 years
    @KaushikAcharya: thank you for pointing this out.. The terminal commands for CPU flags were suggested by an edit from another user. I admit I had not tested them thoroughly - my bad. Nevertheless they are useful to see whether the CPU in our system does support virtualization at all.
  • nealmcb
    nealmcb over 9 years
    See more details on distinguishing cpu support from bios support via th kvm-ok command in the qemu-kvm package. Read more at askubuntu.com/questions/103965/…
  • user1350992
    user1350992 almost 9 years
    Just in case anyone has an HP computer, VT-x is in BIOS/Security/System Security.
  • PromInc
    PromInc over 8 years
    I had the same experience - despite the articles I was finding saying that the BIOS needs to be modified, the issue apparently lied in that I tried upping the memory for the virtual machine and it apparently was more than the 32-bit system could handle.
  • jave.web
    jave.web over 3 years
    @BorisChurzin solution actually worked - the computer must have to be firstly completely turned off/shut down after saving the bios settings
  • Takkat
    Takkat over 3 years
    @jave.web: thanks for the feedback - I edited this into the answer as it appears to affect many people.