What is VT and why is it required?

The 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 Ubuntu 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 Ubuntu system:

  • lscpu command
  • cpu-checker utility
  • /proc/cpuinfo file
  • Libvirt client utility

We have run the commands and procedures mentioned in this article on a Ubuntu 18.04 LTS system. We will be using the Ubuntu command line, the Terminal, in order to verify VT on our processor. You can open the Terminal application either through the system Dash or the Ctrl+Alt+T shortcut.

Verifying VT on your processor

Method 1: 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 Ubuntu Terminal:

$ lscpu

Here is the output format you usually see:

Check CPU architecture with lscpu command

Navigate to the Virtualization output; the result VT-x here ensures that virtualization is indeed enabled on your system.

Method 2: Through the cpu-checker utility

The cpu-checker utility is another way to check virtualization technology, among many other things. Since most Ubuntu 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 Ubuntu.

Install cpu-checker

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

Use kvm-ok command

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

Method 3: 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 information about one of the following, 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:

Use /proc/cpuinfo to check CPU architecture

The vmx indication and it’s information in the output indicates that the virtual technology, Intel-VT, is enabled and supported by my system. If you do not find any output for this command, this emans that the /proc/cpuinfo does not contain any information about VT and it is either unavailable or disabled from your BIOS settings.

Method 4: 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 Ubuntu systems do not have this facility by default, you can install is by running the following command as sudo:

$ sudo apt install libvirt-clients

Please note that only an authorized user can add/remove and configure software on Ubuntu.

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

Use virt-host-validate command

You can see that the “QEMU: checking for hardware virtualization” shows the result status as PASS on my system. This indicates that VT is indeed enabled on my processor. If the result status is “FAIL” in anyone’s output, that indicates that virtualization is either not supported or else 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.

How to check if your processor supports Virtualization Technology on Ubuntu