Today I wanted to add a new 64bit virtual machine to my VirtualBox installation but when I tried to power it on I got the following error message:
root@debian /home/vms/Webserver # VBoxManage startvm Webserver --type headless Waiting for VM "Webserver" to power on... VBoxManage: error: VT-x features locked or unavailable in MSR. (VERR_VMX_MSR_LOCKED_OR_DISABLED) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component Console, interface IConsole, callee
The VirtualBox forum lists two prerequisites for using hardware virtualization in your VMs:
- a 64bit processor, which apparently I had:
root@debian /home/vms/Webserver # lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit
- hardware virtualization has to be enabled in the host’s BIOS, which as it turned out I didn’t have:
root@debian /home/vms/Webserver # modprobe msr root@debian /home/vms/Webserver # rdmsr 0x3a 1
(here’s a German description of the command above: Virtualisierungsfunktion Intel VT aktivieren)
After enabling the hardware virtualization feature (VT-X) in the host’s BIOS and restarting it, the VM could be powered on.