Pages

Monday, February 6, 2017

How to check a server VM image or physical machine ?


How to check a server VM image or physical machine ?




1. search in dmesg



    dmesg | grep VMware


OR use below command


    dmesg | grep 'XEN\|VMware\|VirtualBox'


grep with logical OR .


This can be run by non root users


Output :
XEN
[root@VMIMAGE1 data]# dmesg | grep 'XEN\|VMware\|VirtualBox'
#1 [000329b000 - 00032b8000] XEN PAGETABLES ==> [000329b000 - 00032b8000]
#5 [00028bc000 - 000329b000] XEN START INFO ==> [00028bc000 - 000329b000]
XENBUS: Device with no driver: device/vbd/51712




VirtaulBox
[root@VMIMAGE1 data]# dmesg | grep 'XEN\|VMware\|VirtualBox'
DMI: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006










Vmware

dmesg | grep 'XEN\|VMware\|VirtualBox'
DMI: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/02/2015
Hypervisor detected: VMware
ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33




2. using dmidecode (only for root )







    dmidecode -t system




Output :

Desktop or Non VM server
[root@sterinlap ~]# dmidecode -t system
# dmidecode 2.12
SMBIOS 2.7 present.


Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: Dell Inc.
Product Name: Latitude E7440
Version: 01
Serial Number: DG5VD02
UUID: 4C4C4544-0047-3510-8056-C4C04F443032
Wake-up Type: Power Switch
SKU Number: Latitude E7440
Family: Not Specified




XEN
# dmidecode 2.11
# No SMBIOS nor DMI entry point found, sorry.










VirtaulBox
# dmidecode 2.12
SMBIOS 2.5 present.


Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: innotek GmbH
Product Name: VirtualBox
Version: 1.2
Serial Number: 0
UUID: D29C6E95-B72D-4A89-BC8B-F720A31C4EEB
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Virtual Machine










Vmware

dmidecode -t system
# dmidecode 2.12
SMBIOS 2.7 present.


Handle 0x0001, DMI type 1, 27 bytes
System Information
Manufacturer: VMware, Inc.
Product Name: VMware Virtual Platform
Version: None
Serial Number: VMware-56 4d e1 ee 1c d7 be c2-07 ad 24 c5 73 a9 98 17
UUID: EEE14D56-D71C-C2BE-07AD-24C573A99817
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Not Specified


3. Checking SCSI devices (only for root )







    cat /proc/scsi/scsi





Output :

Desktop or Non VM server
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST500LT032-1E914 Rev: SDM1
Type: Direct-Access ANSI SCSI revision: 05



XEN
cat /proc/scsi/scsi
Attached devices:
Shows no devices .






VirtaulBox
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: VBOX Model: CD-ROM Rev: 1.0
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: VBOX HARDDISK Rev: 1.0
Type: Direct-Access ANSI SCSI








Vmware

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








4. Using Network Scan .



    nmap -sP <IP of VM IMAGE>


This can be done from remote system also .
Nmap might need to install . It is not avilable by default


This also works for windows VM guest


Output :

Desktop or Non VM server
nmap -sP <DELL Lap>
Starting Nmap 5.51 ( http://nmap.org ) at 2017-02-07 22:31 IST


MAC Address: F0:1F:AF:6F:A0:95 (Dell)
Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds



XEN
Starting Nmap 5.51 ( http://nmap.org ) at 2017-02-07 22:32 IST
Host is up (0.00033s latency).
MAC Address: 00:16:3E:59:3A:CA (Xensource)




VirtaulBox
Starting Nmap 5.51 ( http://nmap.org ) at 2017-02-07 22:32 IST


Host is up (0.00047s latency).
MAC Address: 08:00:27:51:56:C7 (Cadmus Computer Systems)




Vmware

Starting Nmap 5.51 ( http://nmap.org ) at 2017-02-07 22:33 IST


Host is up (0.00034s latency).
MAC Address: 00:0C:29:A9:98:17 (VMware)







No comments:

Post a Comment