When do you need Virtualization Technology (VT) in the CPU?
Virtualization Technology enables your processor to act as a number of independent computer systems. This enables several operating systems to be running on the same machine at the same time. Whenever you want to install virtualization applications on your Debian system such as VMware Workstation, VirtualBox, etc., you should first verify if your system supports virtualization and if it is enabled. Only then you can run virtual machines using a single processor.
The article explains the following methods to check if Virtual Technology is supported by your processor on a Debian system:
- lscpu command
- cpu-checker utility
- /proc/cpuinfo file
- Libvirt client utility
You can replicate the commands and procedures mentioned in this article on a Debian 10 Buster system and slightly older versions of the same.
Since we will be using the Debian command linen to verify VT on our processor, you can open the Terinal through the Application Launcher search as follows:
Check if VT is enabled in the CPU
Here, we will explain 4 simple ways for you to verify if VT is enabled on your processor:
1. Method: Through the lscpu command
The lscpu command is a popular method to extract information about your CPU’s architecture. This command extracts hardware information from the /pro/cpuinfo file of sysfs. This information includes the number of processors, CPU operation mode, sockets, cores, threads, model name, and virtualization information, among much more.
Simply run the following command in your Terminal:
$ lscpu
Here is the output format you usually see:
Navigate to the Virtualization output; the result VT-x here ensures that virtualization is indeed enabled on our system.
2. Method: Through the cpu-checker utility
The cpu-checker utility is another way to check virtualization technology, among many other things. Since most Linux systems do not have this facility by default, you can install is by running the following command as sudo:
$ sudo apt-get install cpu-checker
Please note that only an authorized user can add/remove and configure software on Debian.
After you have entered the password for sudo, the system might prompt you with a y/n option to verify if you want to continue installation. Please enter y and hit Enter after which cpu-checker will be installed on your system
The following command from this utility will help you in verifying if virtualization is supported by your processor or not:
$ sudo kvm-ok
The above output indicates that VT is enabled on your system. However, if you get the following output, it means that you need to enable virtualization to use applications that work on this technology:
INFO: Your CPU does not support KVM extensions
KVM acceleration can NOT be used
The HINT section in the above screenshot explains how you can enable VT on your system.
3. Method: From the /proc/cpuinfo file
We can also manually extract relevant information from the /proc/cpuinfo file by using the egrep command. For example, because we want to extract virtualization related information, we can use egrep command as follows to extract information related to either svm or vmx:
$ egrep "svm|vmx" /proc/cpuinfo
In the output you will see one of the following information that will verify that virtualization is enabled on your system:
Svm: AVM-V support information
Vmx: Intel-VT technology support information
This is the output of the above-mentioned command on my system:
The vmx indication and information in the output indicated that the virtual technology, Intel-VT, is enabled and supported by my system. If you do not find any output for this command, this means that the /proc/cpuinfo does not contain any information about VT and it is either unavailable or disabled from your BIOS settings.
4. Method: Through the Libvirt client utility
There is a virtual host validation tool called virt-host-validate. In order to use this, you need to have the libvert-clients package installed on your system. Since most Linus systems do not have this facility by default, you can install is by running the following command as sudo:
$ sudo apt-get install libvirt-clients
After you have entered the password for sudo, the system might prompt you with a y/n option to verify if you want to continue installation. Please enter y and hit Enter after which cpu-checker will be installed on your system
The following virt-host-validate command from this utility will help you in verifying if virtualization is supported by your processor or not, among many other things:
$ virt-host-validate
You can see that the “QEMU: checking for hardware virtualization” shows the result status as PASS on my system. This indicated that VT is indeed enabled on my processor. If the result status is “FAIL” in anyone’s output, that indicated that virtualization is either not supported or otherwise not enabled.
So now you have not one, but four very simple ways to verify if your hardware supports virtualization. This is the power of Linux, with just one command you can perform a seemingly complex task.