Linux下查看虚拟机还是物理机
1.dmesg命令
[root@Template ~]# dmesg |grep -i hypervisor
[ 0.000000] Hypervisor detected: KVM
2.lscpu命令
[root@Template ~]# lscpu|grep Hypervisor
Hypervisor vendor: KVM
Hypervisor vendor: KVM #虚拟机
Virtualization: VT-x #实体机
KVM:
虚拟化技术有两种类型的实现:
Type-I : hypervisor------>VM
Type-II:host------>VM----->VMS
3.systemd-detect-virt命令
[root@Template ~]# systemd-detect-virt
kvm

4.dmidecode命令
[root@Template ~]# dmidecode -t 1
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
Handle 0x0100, DMI type 1, 27 bytes
System Information
Manufacturer: QEMU
Product Name: Standard PC (i440FX + PIIX, 1996)
Version: pc-i440fx-7.2
Serial Number: Not Specified
UUID: 691b84b0-ff79-4d28-bcba-19fc255abdf0
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified
相关推荐
-
Nginx 原理和架构 | 原力计划2025-04-12 01:23:13
-
PHP极速匹配子字符串,你是怎么做的?2025-04-12 01:10:40
-
nginx的安装 教程2025-04-12 00:59:04
-
MySQL中是如何实现事务提交和回滚的?2025-04-12 00:54:21
-
nginx 配置白黑名单与配置访问频率和连接数2025-04-12 00:41:59