LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Is This Machine Physical or Virtual? (https://www.linuxquestions.org/questions/linux-hardware-18/is-this-machine-physical-or-virtual-760962/)

unixanalyst 10-10-2009 07:00 AM

Is This Machine Physical or Virtual?
 
Hi,

Title says it all. I need to be sure of whether a machine is physical or virtual. We have lots of both in our organisation. I've run the following commands but have not spotted anything that has convinced me either way. If anything, I am leaning towards virtual due to the df output.

Anyone have a foolproof way of working it out?

TIA.

Code:

uname -a
Linux hostname 2.4.20-64GB-SMP #1 SMP Wed Dec 3 10:57:11 UTC 2003 i686 unknown unknown GNU/Linux

dmidecode -t 1
-bash: dmidecode: command not found

cat /etc/SuSE-release
SuSE Linux 8.2 (i586)

cat /proc/cpuinfo
processor      : 0
vendor_id      : GenuineIntel
cpu family      : 6
model          : 8
model name      : Pentium III (Coppermine)
stepping        : 6
cpu MHz        : 860.932
cache size      : 256 KB
physical id    : 0
siblings        : 1
fdiv_bug        : no
hlt_bug        : no
f00f_bug        : no
coma_bug        : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 2
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips        : 1717.04

processor      : 1
vendor_id      : GenuineIntel
cpu family      : 6
model          : 8
model name      : Pentium III (Coppermine)
stepping        : 6
cpu MHz        : 860.932
cache size      : 256 KB
physical id    : 0
siblings        : 1
fdiv_bug        : no
hlt_bug        : no
f00f_bug        : no
coma_bug        : no
fpu            : yes
fpu_exception  : yes
cpuid level    : 2
wp              : yes
flags          : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse
bogomips        : 1717.04

lspci
00:00.0 Host bridge: ServerWorks CNB20LE Host Bridge (rev 06)
00:00.1 Host bridge: ServerWorks CNB20LE Host Bridge (rev 06)
00:0e.0 VGA compatible controller: ATI Technologies Inc 3D Rage IIC (rev 7a)
00:0f.0 ISA bridge: ServerWorks OSB4 South Bridge (rev 50)
00:0f.1 IDE interface: ServerWorks OSB4 IDE Controller
00:0f.2 USB Controller: ServerWorks OSB4/CSB5 OHCI USB Controller (rev 04)
01:02.0 PCI bridge: Intel Corp. 80960RM [i960RM Bridge] (rev 02)
01:02.1 RAID bus controller: Dell Computer Corporation PowerEdge Expandable RAID Controller 3/Si (rev 02)
01:08.0 Ethernet controller: Intel Corp. 82557/8/9 [Ethernet Pro 100] (rev 08)
02:04.0 SCSI storage controller: Adaptec RAID subsystem HBA (rev 01)
02:04.1 SCSI storage controller: Adaptec AIC-7899P U160/m (rev 01)

df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              11G  2.2G  7.9G  22% /
/dev/sda3              39G  29G  11G  74% /mnt/data
shmfs                758M    0  758M  0% /dev/shm


business_kid 10-10-2009 01:32 PM

have you tried 'fdisk -l' as root. If you have drives or partitions you can't see, it might point you.
I would also go for /etc/fstab for the same reason.

kirukan 10-10-2009 01:47 PM

i hope from lspci output you can get some idea whether it is physical or virtual

this is my virtual server lspci output
Quote:

00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)
00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)
00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PIIX4 USB
00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)
00:0f.0 VGA compatible controller: VMware Inc [VMware SVGA II] PCI Display Adapter
00:10.0 SCSI storage controller: BusLogic BT-946C (BA80C30) [MultiMaster 10] (rev 01)
00:11.0 PCI bridge: VMware Inc: Unknown device 0790 (rev 02)
02:00.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
02:01.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970 [PCnet32 LANCE] (rev 10)
02:02.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)
02:03.0 USB Controller: VMware Inc: Unknown device 0770

catkin 10-10-2009 02:59 PM

For VirtualBox, look for /sys/devices/virtual/misc/vbox*

AlucardZero 10-10-2009 05:28 PM

A PIII has to be physical

unixanalyst 10-11-2009 04:24 AM

Great, thanks guys. All useful replies. The sample lspci output is especially helpful, it should of course have some VM devices listed (duh, I should've thought of that).


All times are GMT -5. The time now is 02:44 PM.