Skip to content

Detect Virtualization Type in guest OS

Henryk Paluch edited this page May 1, 2018 · 1 revision

There is very good discussion on https://unix.stackexchange.com/questions/89714/easy-way-to-determine-virtualization-technology

I tried lshw this way:

yum install -y lshw

On CentOS 7.4 where:

dmesg | grep -i virtualized | head -1
    [    0.000000] Booting paravirtualized kernel on Xen HVM

I got nice output:

lshw -class system | sed '/-pnp/,$d'
   centos7.example.com
       description: Computer
       product: HVM domU
       vendor: Xen
       version: 4.7.4-4.1
       serial: 1daf0fe9-cefd-cc9d-41b3-a0b5ed0fe1ab
       width: 64 bits
       capabilities: smbios-2.4 dmi-2.4 vsyscall32
       configuration: boot=normal uuid=1DAF0FE9-CEFD-CC9D-41B3-A0B5ED0FE1AB

However on CentOS 6.9 32bit (pure Para-Virtualized guest - no HVM):

dmesg | grep -i virtualized
   Booting paravirtualized kernel on Xen

I got only terse output:

 lshw -class system | sed '/-pnp/,$d'
centos6.localdomain
    description: Computer
    width: 32 bits

Resources

Clone this wiki locally