Hardware

How to Check If Hardware Virtualization Is Enabled in Linux

Once you enabled the hardware virtualization on your computer from the BIOS/UEFI Firmware of your motherboard, you will have to check if the operating system that you’re using can use the hardware virtualization feature.

In this article, we will show you how to check if the hardware virtualization is enabled from the Linux operating systems.

Topic of Contents:

  1. Method 1: Using the Lscpu Command
  2. Method 2: Checking the Available CPU Flags/Features
  3. Conclusion

Method 1: Using the Lscpu Command

You can use the “lscpu” command to easily check whether the hardware virtualization is enabled from any Linux distributions.

You can check whether the hardware virtualization is enabled using the “lscpu” command as follows:

$ lscpu | grep -i virtualization

If you’re using an AMD processor, the enabled Virtualization feature should be AMD-V. If you’re using an Intel processor, the enabled Virtualization feature should be VT-x. In both cases, the Virtualization type should be full.

If the hardware virtualization is not enabled, read this article to learn how to enter the BIOS/UEFI Firmware of your motherboard and enable the hardware virtualization on your computer.

A screenshot of a computer program Description automatically generated

Method 2: Checking the Available CPU Flags/Features

You can also check if the hardware virtualization is enabled from any Linux distribution by checking the available CPU flags/features. The available/enabled CPU features can be found in the /proc/cpuinfo file.

To check whether the necessary CPU flags/features are available/enabled for hardware virtualization, run the following command:

$ egrep -i 'svm|vmx' /proc/cpuinfo

If you’re using an AMD processor, you should see the svm CPU flag/feature in the output if the hardware virtualization is available/enabled.

If you’re using an Intel processor, you should see the vmx CPU flag/feature in the output if the hardware virtualization is available/enabled.

If the correct CPU flag/feature is not available/enabled, read this article to learn how to enter the BIOS/UEFI Firmware of your motherboard and enable the hardware virtualization on your computer.

A screenshot of a computer Description automatically generated

Conclusion

We showed you how to check if the hardware virtualization is enabled from any Linux distributions. If the hardware virtualization is enabled, either the AMD-V/SVM or VT-x/VMX CPU features will be available/enabled depending on the processor that you installed on your computer, AMD, or Intel, respectively.

About the author

Shahriar Shovon

Freelancer & Linux System Administrator. Also loves Web API development with Node.js and JavaScript. I was born in Bangladesh. I am currently studying Electronics and Communication Engineering at Khulna University of Engineering & Technology (KUET), one of the demanding public engineering universities of Bangladesh.