UnixDroid

Lesson 2 of 10 · 9 min

Turn on virtualization & install VirtualBox

Check that hardware virtualization is on, fix the Hyper-V slowdown on Windows, and install VirtualBox on Windows, Linux or macOS.

VirtualBox needs your CPU's hardware virtualization: Intel VT-x or AMD-V. Most "VirtualBox won't start my VM" problems come from it being switched off, or from Windows quietly using it for something else. So we check that first, then install.

3 checks before installing VirtualBox
3 checks before installing VirtualBox

Step 1: Is virtualization switched on?

Windows: open Task Manager → Performance → CPU. Under the graph, look for Virtualization: Enabled.

Linux:

lscpu | grep -i virtualization     # should print VT-x or AMD-V
grep -Ec '(vmx|svm)' /proc/cpuinfo # a number above 0 = CPU supports it

If it says Disabled, go to Step 2. If it says Enabled, skip to Step 3.

Step 2: Turn it on in BIOS/UEFI

Reboot and keep tapping the setup key as the PC starts:

BrandKey to try
Dell, Acer, ASUS laptopsF2
HPEsc, then F10
LenovoF1 or F2 (or the small Novo button)
MSI, most desktop boardsDel

On Windows 11 there's an easier way: Settings → System → Recovery → Advanced startup → Restart now → Troubleshoot → Advanced options → UEFI Firmware Settings.

Look for Intel Virtualization Technology (VT-x) or, on AMD, SVM Mode. It's usually under Advanced, CPU Configuration or Security. Set it to Enabled, then Save & Exit (often F10).

Step 3 (Windows only): stop Hyper-V from hijacking it

Windows features like Hyper-V, WSL2, Docker Desktop, Memory Integrity and Virtual Machine Platform grab the virtualization hardware for themselves. VirtualBox still runs on top of them, but slowly. The sign is a small green turtle icon in the VM's status bar.

For full speed, open PowerShell as Administrator:

bcdedit /set hypervisorlaunchtype off

Then go to Windows Security → Device security → Core isolation and turn Memory integrity off. Reboot.

Trade-off: this pauses WSL2 and Docker Desktop, and Memory integrity is a real Windows protection. To undo it later, run bcdedit /set hypervisorlaunchtype auto and switch Memory integrity back on. If you need WSL2 every day, skip this step and accept slower VMs.

Step 4: Install VirtualBox

On Windows

  1. Go to virtualbox.org → Downloads and get the Windows hosts installer.
  2. Run it and keep the default options.
  3. If it says a Microsoft Visual C++ Redistributable is missing, install the latest x64 version from Microsoft, then run the VirtualBox installer again.
  4. If it warns about Python Core / win32api, click Yes. You don't need them for this path.
  5. Your network will drop for a few seconds while it installs virtual network adapters. That's normal.

On Linux (Ubuntu, Debian, Kali as host)

Download the .deb for your distribution from the VirtualBox Linux_Downloads page, then:

sudo apt update
sudo apt install ./virtualbox-7.2_*.deb   # use the exact file name you downloaded
sudo usermod -aG vboxusers $USER          # lets your user access USB devices

Log out and back in. If a VM later fails with "Kernel driver not installed (rc=-1908)", run sudo /sbin/vboxconfig. On PCs with Secure Boot, follow its prompt to enrol a signing key at the next reboot.

On macOS

Download the package for your Mac (Intel or Apple Silicon). On first launch, allow Oracle's system extension in System Settings → Privacy & Security.

Step 5: Set it up before your first VM

  1. Default Machine Folder: File → Preferences → General. Point it to your fastest drive with the most free space, like D:\VMs. Every VM you create lands here.
  2. Learn the Host key: by default it's Right Ctrl. Inside a VM it releases your mouse and keyboard back to your PC. Host + F toggles full screen and Host + Del sends Ctrl+Alt+Del to Windows VMs.
  3. Extension Pack (optional): adds extras like webcam pass-through. It's free only for personal and educational use, and its version must match VirtualBox exactly. You won't need it in this path.

A quick tour of VirtualBox Manager

ButtonWhat it does
NewCreate a VM from an ISO file
AddOpen a VM someone already built (a .vbox file)
SettingsCPU, RAM, disk, network, display
StartBoot the VM (the arrow next to it has Headless start, with no window)
SnapshotsSave and restore points (in the machine's tools menu)

Fixing common errors

Error or symptomCauseFix
VT-x is not available (VERR_VMX_NO_VMX)Virtualization off, or taken by Hyper-VSteps 2 and 3
AMD-V is disabled in the BIOS (VERR_SVM_DISABLED)SVM Mode offEnable SVM in BIOS
Only 32-bit versions in the OS listVirtualization not availableSteps 2 and 3
Green turtle icon, very slow VMRunning on top of Hyper-VStep 3
Kernel driver not installed (rc=-1908)Linux/macOS driver not loadedsudo /sbin/vboxconfig, or allow the extension on macOS
Try it yourself
  1. Confirm Virtualization: Enabled (Task Manager) or VT-x / AMD-V (lscpu).
  2. Windows users: check for the Hyper-V conflict and decide whether to turn it off.
  3. Install VirtualBox and set the Default Machine Folder to a drive with at least 100 GB free.
  4. Open Help → About VirtualBox and write the version in your lab notebook.
  5. Find your Host key in File → Preferences → Input and write it down.
No Linux machine? Practise in the free online terminal

Quick check

Which Windows command-line tool turns off the hypervisor so VirtualBox runs at full speed?

Need a hint?

bcd___ /set hypervisorlaunchtype off

Finished this lesson?

Done lessons keep your daily streak going 🔥

0 day streak

0 lessons done

best 0 days

Log in to keep your streak on every device →