检测服务器是否是虚拟化,如KVM,VM等

1.执行如下,若无输出证明是物理机,如果输出如VMware,KVM等证明是虚拟的

复制代码
lscpu | grep Hypervisor

2.Manufacturer会输出厂商如戴尔等,不会输出Red Hat

复制代码
sudo dmidecode -t system

输出如下:

Manufacturer: Red Hat

Product Name: KVM

Version: RHEL 7.6.0 PC (i440FX + PIIX, 1996)

UUID: 480d3f2e-29c7-8a7a-f5e2-d2f9d719ac3f

正常输出如下:

dmidecode 3.2

Getting SMBIOS data from sysfs.

SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes

System Information

Manufacturer: Dell

Product Name: C6220

Version: Not Specified

Serial Number: 7HN6ML1

UUID: 4c4c4544-0031

Wake-up Type: Power Switch

SKU Number: N/A

Family: Server

Handle 0x001A, DMI type 15, 29 bytes

System Event Log

Area Length: 20176 bytes

Header Start Offset: 0x0000

Header Length: 32 bytes

Data Start Offset: 0x0020

Access Method: General-purpose non-volatile data functions

Access Address: 0x0000

Status: Valid, Not Full

Change Token: 0x12345678

Header Format: OEM-specific

Supported Log Type Descriptors: 3

Descriptor 1: POST memory resize

Data Format 1: None

Descriptor 2: POST error

Data Format 2: POST results bitmap

Descriptor 3: Log area reset/cleared

Data Format 3: None

Handle 0x0036, DMI type 32, 20 bytes

System Boot Information

Status: No errors detected

相关推荐
路溪非溪2 小时前
BLE的广播、扫描和连接等工作机制总结
linux·arm开发·驱动开发
gjc5922 小时前
踩坑实录:MySQL服务器CPU爆高,元凶竟是SELinux的setroubleshootd?
运维·服务器·数据库·mysql·adb
我才是一卓2 小时前
linux 安装简易 git 服务端并使用
linux·运维·git
德彪稳坐倒骑驴2 小时前
MySQL Server 5.5 win端安装,安装SQLyog
运维·服务器
Wanliang Li2 小时前
AArch64虚拟化——virtio-mmio实现
linux·虚拟化·virtio·hypervisor·mmio
乔宕一3 小时前
windows SSH服务修改SSH登陆后的默认终端
运维·windows·ssh
嵌入式-老费3 小时前
vivado hls的应用(第一个axi接口的ip)
linux·服务器·tcp/ip
旺仔.2913 小时前
Linux系统基础详解(二)
linux·开发语言·网络
x***r1513 小时前
Notepad++ 8.6 安装教程:详细步骤+自定义安装路径(附注意事项)
linux·前端·javascript
big_rabbit05023 小时前
JVM堆内存查看命令
java·linux·算法