Sub topic 9
CPU and BIOS/UEFI Virtualization Support
This chapter assumes you know what a hypervisor is and the difference between Type 1 and Type 2. It also assumes you can read basic CPU specifications and enter a PC's firmware setup screen. Here you will learn why a computer needs hardware support for virtualization, where that support is switched on, and how to check it on Linux and Windows.
Why hardware support matters
A hypervisor must let several guest operating systems share one CPU without letting any guest take control of the host. Early x86 virtualization did this in software. The hypervisor inspected and rewrote the guest's privileged instructions as they ran. This worked, but it was slow and complicated.
Modern CPUs include extensions that do much of this work in silicon. With them, the guest runs directly on the CPU, and the CPU switches control to the hypervisor only when the guest does something that needs supervision. Hardware support gives these benefits:
- Better performance, because less software translation is needed.
- Stronger isolation between guests and the host.
- Support for 64-bit guests and for several virtual CPUs per guest on many hypervisors.
Many current Type 2 hypervisors, such as VirtualBox and VMware Workstation, can fall back to slower software techniques or refuse to start a 64-bit guest when the extensions are unavailable. Hyper-V, KVM, and most Type 1 hypervisors require the extensions.
The CPU extensions
Each major CPU vendor has its own name for the feature set.
| Vendor | Technology name | CPU flag on Linux | Second-level address translation |
|---|---|---|---|
| Intel | Intel VT-x (Virtualization Technology) | `vmx` | EPT (Extended Page Tables) |
| AMD | AMD-V (AMD Virtualization) | `svm` | RVI / NPT (Rapid Virtualization Indexing, also called Nested Page Tables) |
Second-level address translation (SLAT) is a separate part of the feature set that matters in practice. A guest has its own idea of memory addresses, which differ from the real addresses in the host's RAM. SLAT lets the CPU's memory management hardware translate between the two, so the hypervisor does not have to do it in software. Windows requires SLAT to run Hyper-V on client editions, and the Windows Hypervisor Platform that some tools use depends on it too.
Intel also sells a feature called VT-d, and AMD sells AMD-Vi. These are IOMMU technologies. They let a hypervisor assign a physical device, such as a graphics card, directly to a guest. They are related to virtualization but are not required for ordinary virtual machines.
Not every CPU has it
Most desktop and laptop processors made in the last ten years support virtualization extensions, but there are exceptions. Some low-end or older models omit them. Some Intel models list "VT-x: No" in the vendor's product specification page. If a user reports that a hypervisor will not run a 64-bit guest, check the CPU model's specification first.
The BIOS/UEFI switch
Having the extensions in the CPU is not enough. On many PCs the firmware (BIOS or UEFI) ships with the feature turned off, and software cannot turn it on from inside the operating system. The user must enter firmware setup, change the setting, save, and reboot.
The setting has different names by vendor and board:
- Intel Virtualization Technology
- Intel VT-x
- VT-x
- SVM Mode
- AMD-V
- Secure Virtual Machine
- Virtualization Technology (on some laptops)
On many boards the setting is under a section named Advanced, CPU Configuration, or Processor. If the machine also lists VT-d, it is a separate switch and can stay as it is.
The general steps to enable it are:
- Restart the PC and press the firmware setup key during startup. Common keys are Delete, F2, F10, and Esc. The splash screen often shows the key.
- Find the virtualization option, usually under advanced or CPU settings.
- Set it to Enabled.
- Save and exit, which usually means pressing F10 and confirming.
- Let the system restart, then verify from the operating system.
Some firmware setups hide the option until a supervisor password is set, or lock it in managed corporate machines. Those cases call for the administrator.
Checking support on Linux
On Linux, the CPU flags show whether the extensions are present. Run both commands below.
lscpu | grep -i virtualization
grep -E -c '(vmx|svm)' /proc/cpuinfoThe first command prints a line such as Virtualization: VT-x for Intel or Virtualization: AMD-V for AMD. The second command counts the logical CPUs whose flags list vmx or svm. A result of 0 means the flags are not visible to the operating system. A nonzero number means the CPU supports hardware virtualization.
There is an important limit to this test. On some systems, the flag is shown even when the firmware has the feature turned off, and on others it disappears. The behavior depends on the CPU and firmware. For KVM specifically, you can also check whether the /dev/kvm device exists, because it is created only when the kernel can use the extensions.
ls -l /dev/kvmIf the flag shows but /dev/kvm is missing, suspect that the firmware setting is off. Also remember that if you are running inside a virtual machine already, the outer hypervisor must expose the extensions to the guest. This is called nested virtualization, and it is often disabled by default.
Checking support on Windows
Windows has a built-in report. Run it from Command Prompt or PowerShell.
systeminfo | findstr /i "Hyper-V"On a machine where no hypervisor is running, the output ends with a "Hyper-V Requirements" section. It lists these items:
- VM Monitor Mode Extensions: Yes
- Virtualization Enabled In Firmware: Yes
- Second Level Address Translation: Yes
- Data Execution Prevention Available: Yes
All four need to say Yes to run Hyper-V. If "Virtualization Enabled In Firmware" says No, go back to the firmware setup. If Hyper-V is already running, the report instead says "A hypervisor has been detected," and the individual lines are not shown. That is a sign that support is working.
You can also open Task Manager, select the Performance tab, choose CPU, and read the Virtualization line. It shows Enabled or Disabled.
Turning on Hyper-V
Hyper-V is available in Windows Pro, Enterprise, and Education editions. It is not included in Windows Home. To enable it, open an elevated PowerShell prompt, which means one started with "Run as administrator".
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -AllThe command installs the feature and its management tools. Windows then asks for a restart. After the restart, the Windows host itself runs on top of the hypervisor layer, which is why Hyper-V is sometimes described as a Type 1 hypervisor even though it is installed on a desktop edition.
Troubleshooting flow
When a virtual machine will not start or a hypervisor complains about hardware virtualization, work through the same questions in order.
Common errors and how to read them
| Symptom | Likely cause | Fix |
|---|---|---|
| VirtualBox offers only 32-bit guest choices | VT-x or AMD-V is disabled in firmware | Enable the setting in BIOS/UEFI |
| Message: "VT-x is disabled in the BIOS" | Firmware switch is off | Enable it and fully power cycle |
| `/dev/kvm` does not exist | Extensions off, or module not loaded | Enable in firmware, then load the `kvm_intel` or `kvm_amd` module |
| Hyper-V option missing in Windows Features | Windows Home edition, or unsupported CPU | Upgrade the edition or change the host |
| Windows says Hyper-V requirements not met | SLAT missing or firmware setting off | Check the `systeminfo` lines |
| Guest runs very slowly | Extensions off, so software fallback is used | Enable hardware virtualization |
Exam points
For the A+ exam, remember these facts:
- Intel calls the feature VT-x, and AMD calls it AMD-V.
- The feature must be supported by the CPU and enabled in BIOS/UEFI.
- If a hypervisor cannot run a VM, the first thing to check is the firmware setting.
- Changing firmware settings needs a restart, and you reach the setup screen with a key such as Delete or F2.
- A 64-bit guest needs hardware virtualization support on the host in most Type 2 hypervisors.
Exercise
A technician installs a Type 2 hypervisor on a new laptop with an Intel Core processor. The hypervisor shows only 32-bit operating systems in its list and refuses to start a 64-bit guest, citing missing hardware virtualization. The CPU's specification page lists VT-x support. What should the technician do next, and how can the technician confirm the fix?
Show answer
Restart the laptop, enter BIOS/UEFI setup, and enable the Intel Virtualization Technology (VT-x) option, then save and exit. If the problem persists, fully power off and start again. To confirm, run systeminfo on Windows and check that "Virtualization Enabled In Firmware" says Yes, or look at the Virtualization line in the Task Manager Performance tab. On Linux, run lscpu | grep -i virtualization. Then reopen the hypervisor and check that 64-bit guests are offered.
Exercise
On a Linux host, the command grep -E -c '(vmx|svm)' /proc/cpuinfo prints 8, but /dev/kvm does not exist. What does each result tell you, and what is the most likely next step?
Show answer
The count of 8 means eight logical CPUs list a virtualization flag, so the CPU model supports VT-x or AMD-V. The missing /dev/kvm means the kernel cannot use the extensions right now. The most likely cause is that the feature is disabled in BIOS/UEFI. Enable it in firmware setup and power cycle. If it is already enabled, check that the kvm_intel or kvm_amd kernel module is loaded.