You can determine the virtualization technology used for a Linux guest virtual machine (VM) using the following methods:
- Check the output of the
dmesg
command: This command outputs the system log messages. If the Linux guest VM is running on a hypervisor, you may see messages from the virtualization technology in the output of thedmesg
command. - Check the output of the
lsmod
command: This command lists the kernel modules currently loaded in the Linux guest VM. Some virtualization technologies have their own kernel modules, which can be identified by looking at the output of thelsmod
command. - Check the
/proc/cpuinfo
file: The/proc/cpuinfo
file contains information about the host CPU. If the Linux guest VM is running on a hypervisor, you may see additional information in this file related to the virtualization technology. - Check the
/proc/modules
file: The/proc/modules
file lists the kernel modules that are currently loaded in the Linux guest VM. You can check this file for the presence of modules associated with specific virtualization technologies. - Use the
virt-what
utility: Thevirt-what
utility is a simple command-line tool that can identify the virtualization technology being used for a Linux guest VM. The tool checks various system files and outputs the names of any virtualization technologies that it finds. To installvirt-what
, you can use the package manager of your Linux distribution (e.g., apt-get for Ubuntu, yum for CentOS).