dmidecode -s system-product-name

虚拟化技术

VMware 工作站

root@router:~# dmidecode -s system-product-name
VMware Virtual Platform

虚拟盒子

root@router:~# dmidecode -s system-product-name
VirtualBox

Qemu 与 KVM

root@router:~# dmidecode -s system-product-name
KVM

Qemu(模拟)

root@router:~# dmidecode -s system-product-name
Bochs

Microsoft 虚拟 PC

root@router:~# dmidecode | egrep -i 'manufacturer|product'
Manufacturer: Microsoft Corporation
Product Name: Virtual Machine

维尔图佐

root@router:~# dmidecode
/dev/mem: Permission denied

en

root@router:~# dmidecode | grep -i domU
Product Name: HVM domU

/dev/disk/by-id

如果您没有 dmidecode 运行权, 则可以使用: ls -1 /dev/disk/by-id/

虚拟化技术:QEMU

[root@host-7-129 ~]# ls -1 /dev/disk/by-id/
ata-QEMU_DVD-ROM_QM00003
ata-QEMU_HARDDISK_QM00001
ata-QEMU_HARDDISK_QM00001-part1
ata-QEMU_HARDDISK_QM00002
ata-QEMU_HARDDISK_QM00002-part1
scsi-SATA_QEMU_HARDDISK_QM00001
scsi-SATA_QEMU_HARDDISK_QM00001-part1
scsi-SATA_QEMU_HARDDISK_QM00002
scsi-SATA_QEMU_HARDDISK_QM00002-part1