Linux: Determine The Type of Virtualization
This post will guide you how to determine the type of virtualization in your Linux guest. How do I check if your Linux guest is physical or virtual. How to find out the virtualization type of a remote Linux guest.
Assuming that you have a command line access to a Linux machine, and I want to determine what kind of virtualization technology it runs on. and there are several ways to detect the type of virtualization (KVM, XEN, VMWARE, VirtualBox, Lxc, Container, Hyper-V )in a Linux virtual guest.
Check The Type of Virtualization Using Virt-what Tool
You can use the virt-what tool to check the type of virtualization. You need to install this tool firstly, type the following command:
For Ubuntu/Debian Linux:
#apt-get install virt-what
For CentOS/RHEL Linux:
#yum install virt-what
For Fedora Linux:
# dnf install virt-what
Check the virtualization technology, type the following command:
# virt-what
Outputs:
[root@osetc_x8664 ~]# virt-what xen xen-hvm
For VMware Workstation Guest:
[root@osetc ~]# virt-what vmware
For VirtualBox Guest:
[root@osetc ~]# virt-what virtualbox kvm
For KVM guest:
[root@osetc ~]# virt-what kvm
You can also use the dmidecode command to achieve the same result. type the following command:
# dmidecode -s system-product-name # dmidecode -s system-manufacturer
Outputs:
[root@osetc_x8664 ~]# dmidecode -s system-product-name HVM domU [root@osetc_x8664 ~]# dmidecode -s system-manufacturer Xen
For KVM Guest:
[root@osetc~]# dmidecode -s system-product-name Standard PC (i440FX + PIIX, 1996) [root@osetc~]# dmidecode -s system-manufacturer QEMU