<返回更多

LINUX 下如何检查服务器是虚拟机,还是物理机

2022-09-02    互联共商
加入收藏

centos:
物理机:
[root@db01 ~]# dmidecode |grep -A16 "System Information$"
System Information
Manufacturer: LENOVO
Product Name: Lenovo System x3850 X6
Version: 09
Serial Number: J3xxxx
UUID: 0xxB2E85-26xx-E711-A390-02E0EC431C8A
Wake-up Type: Reserved
SKU Number: none
Family: System X

Handle 0x0074, DMI type 2, 17 bytes
Base Board Information
Manufacturer: LENOVO
Product Name: 00YA700
Version: E63448-400
Serial Number: xxxxxx
Asset Tag: Base Board Asset Tag
[root@db01 ~]#

xen 虚拟机:

[root@dg ~]# dmidecode |grep -A16 "System Information$"
System Information
Manufacturer: Xen
Product Name: HVM domU
Version: 4.7.1-1.9
Serial Number: 9d12fe08-88d0-dab5-21ac-b4294e79ccf1
UUID: 9D12FE08-87D0-DAB5-31AC-B4294E79CCF1
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

Handle 0x0300, DMI type 3, 13 bytes
Chassis Information
Manufacturer: Xen
Type: Other
Lock: Not Present
Version: Not Specified
Serial Number: Not Specified
[root@dg ~]#

VMware虚拟机:
[root@dbserver ~]# dmidecode |grep -A16 "System Information$"
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-56 4d 53 25 bb 20 6c be-83 27 e2 c2 31 c3 02 1f
UUID: 25534d56-20bb-be6c-8327-e2c231c3021f
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Intel Corporation
Product Name: 440BX Desktop Reference Platform
Version: None
Serial Number: None
Asset Tag: Not Specified
[root@dbserver ~]#

麒麟:
VMWARE虚拟机:

zhengquan@zhengquan-vmwarevirtualplatform:~/桌面$ sudo dmidecode |grep -i "system information" -A16
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-56 4d fe 83 cb a6 6e 6c-f5 cb 1d ba 10 46 74 37
UUID: 83fe4d56-a6cb-6c6e-f5cb-1dba10467437
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
Manufacturer: Intel Corporation
Product Name: 440BX Desktop Reference Platform
Version: None
Serial Number: None
Asset Tag: Not Specified

声明:本站部分内容来自互联网,如有版权侵犯或其他问题请与我们联系,我们将立即删除或处理。
▍相关推荐
更多资讯 >>>