判断一台机器是虚拟机还是实体机

sudo dmidecode -t 1

实体机如下:

# dmidecode 2.12
SMBIOS 2.7 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
	Manufacturer: Dell Inc.
	Product Name: PowerEdge R420
	Version: Not Specified
	Serial Number: 702HW02
	UUID: 4C4C4544-0030-3210-8048-B7C04F573032
	Wake-up Type: Power Switch
	SKU Number: SKU=NotProvided;ModelName=PowerEdge R420
	Family: Not Specified

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: ASUSTeK COMPUTER INC.
	Product Name: X450VB
	Version: 1.0       
	Serial Number: D7N0CY33072228F     
	UUID: 0ad45367-3f30-5ac9-c55f-74d02b1571dc
	Wake-up Type: Power Switch
	SKU Number: ASUS-NotebookSKU
	Family: X



虚拟机如下:

# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.

Handle 0x0100, DMI type 1, 27 bytes
System Information
	Manufacturer: Tencent Cloud
	Product Name: CVM
	Version: 3.0
	Serial Number: 5a0bbfab-60cc-430c-90b7-e1ac2d92c6b0
	UUID: 5a0bbfab-60cc-430c-90b7-e1ac2d92c6b0
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Smdbmds


# dmidecode 3.0
Scanning /dev/mem for entry point.
SMBIOS 2.4 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: VMware, Inc.
	Product Name: VMware Virtual Platform
	Version: None
	Serial Number: VMware-42 39 2c 3d 50 ef 76 5a-2c 51 82 b6 b6 5b 40 59
	UUID: 42392C3D-50EF-765A-2C51-82B6B65B4059
	Wake-up Type: Power Switch
	SKU Number: Not Specified
	Family: Not Specified

文/程忠 浏览次数:0次   2021-12-22 20:06:49

相关阅读


评论: