METHOD 1 : Using lshw command

# yum install epel-release
# yum install lshw
# lshw -class system

The output would be

[root@server ~]# lshw -class system

description: Computer
product: KVM
vendor: Red Hat
version: RHEL 7.6.0 PC (i440FX + PIIX, 1996)
width: 64 bits
capabilities: smbios-2.8 dmi-2.8 vsyscall64 vsyscall32
configuration: boot=normal family=Red Hat Enterprise Linux uuid=DFEEDC28-D107-F841-8C98-AC43DDC42C31


METHOD 2 : Using virt-what command

# yum install virt-what
# virt-what

The output would be

[root@server ~]# virt-what
kvm


METHOD 3: Using the systemd-detect-virt Command
systemd-detect-virt detects execution in a virtualized environment. It identifies the virtualization technology and can distinguish full machine virtualization from container virtualization.

The output would be

[VirtualBox]
$ systemd-detect-virt
oracle

[Physical]
$ systemd-detect-virt
None


METHHOD 4: How to Check Whether the Linux Server is Physical or Virtual Using the hostnamectl Command
The hostnamectl tool is provided to administrate the system hostname. There are three separate classes of host names in use on a given system, static, pretty, and transient.
See the result in chassis

#hostnamectl

¿Fue útil la respuesta? 29 Los Usuarios han Encontrado Esto Útil (117 Votos)