如何查看linux系统是物理机还是虚拟机
展开全部
Windows:
在CMD里输入:Systeminfo | findstr /i "System Model"
如果System Model:后面含有Virutal就是虚拟机,其他都是物理机
或者用powershell命令:get-wmiobject win32_computersystem | fl model
Linux:
在bash里输入:dmidecode -s system-product-name
或者lshw -class system
或者dmesg | grep -i virtual
在CMD里输入:Systeminfo | findstr /i "System Model"
如果System Model:后面含有Virutal就是虚拟机,其他都是物理机
或者用powershell命令:get-wmiobject win32_computersystem | fl model
Linux:
在bash里输入:dmidecode -s system-product-name
或者lshw -class system
或者dmesg | grep -i virtual
快又稳
2024-10-28 广告
2024-10-28 广告
可以从硬件型号上来判断,虚拟机的硬件型号是特定的,而且就那么几种,从硬件型号上甚至还能知道是哪种虚拟机;还有驱动,虚拟机中有特定的驱动,也可以辅助判断;另外还可以通过网关类型来判断,比如VMware Workstation虚拟机的网关就很有...
点击进入详情页
本回答由快又稳提供
展开全部
虚拟机(下边有VMWar):
[root@test ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
物理机:
[root@localhost 2019]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 02 Id: 00 Lun: 00
Vendor: LSI Model: MR9240-8i Rev: 2.13
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 01 Lun: 00
Vendor: LSI Model: MR9240-8i Rev: 2.13
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi7 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi6 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi8 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
[root@test ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: VMware, Model: VMware Virtual S Rev: 1.0
Type: Direct-Access ANSI SCSI revision: 02
物理机:
[root@localhost 2019]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 02 Id: 00 Lun: 00
Vendor: LSI Model: MR9240-8i Rev: 2.13
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 02 Id: 01 Lun: 00
Vendor: LSI Model: MR9240-8i Rev: 2.13
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi7 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi6 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi8 Channel: 00 Id: 00 Lun: 00
Vendor: WD Model: Elements 25A2 Rev: 1004
Type: Direct-Access ANSI SCSI revision: 02
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询