LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-11-2011, 08:17 AM   #1
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Rep: Reputation: 32
how to tell if a RH system is virtual or physical


This may seem like a silly question but I have many servers and sometimes we forget when we login if it physical or virtual running on a VMware system. This makes a diffrence when I try to get a console access etc. So I wanted to know before if its physical or VM.

yes I know i can change motd once i get the info or make a list etc.

There are many ways not OS related for me to find this info out. But I was wondering if there was a Linux command that I could use when I ssh to a system to check if its physical or logical?

I have inventory information etc and vm vsphere to check but that can be time consuming if I just want to check something quick.

uname -a or something like that that would tell me would be cool. I am thinking there is no command as Linux really does not care if its running Vm or physical.

Thanx for any info you can give me.

Last edited by unix1adm; 02-11-2011 at 08:19 AM.
 
Old 02-11-2011, 08:27 AM   #2
ozanbaba
Member
 
Registered: May 2003
Location: İzmir
Distribution: Slackware64 15.0 Multilib
Posts: 778

Rep: Reputation: 135Reputation: 135
Do VMware's guest addictions create special rc. scripts or dev files? You can try to see if they exist.
 
Old 02-11-2011, 09:04 AM   #3
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
First thing that comes to mind ... assuming that you have been installing vmware-tools on the VMs (which is recommended), you can check if /usr/bin/vmware-toolbox exists.

The other option would be to use the "dmidecode" command which converts the system DMI into readable format. So in essence when you run
Code:
dmidecode | grep -i vmware
you should be able to tell if your system is a VM or runs on hardware.

HTH
 
1 members found this post helpful.
Old 02-11-2011, 09:58 AM   #4
nowonmai
Member
 
Registered: Jun 2003
Posts: 481

Rep: Reputation: 48
Depending on the hypervisor, the device names can often indicate a virtual device. /dev/vxd1 in KVM and so on.
Also, if you lshw, it may display devicenames which are obviously virtual.
 
Old 02-11-2011, 01:18 PM   #5
unix1adm
Member
 
Registered: Oct 2008
Posts: 688

Original Poster
Rep: Reputation: 32
cool that worked

dmidecode | grep -i vmware

I knew there had to be a way.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with converting a physical server to a virtual centosboy Linux - Virtualization and Cloud 3 08-20-2010 03:15 PM
Help ,Moving Linux System on a Virtual Machine (VMDK File) 2 Physical one shiko0o Linux - Newbie 2 07-01-2010 12:39 PM
[SOLVED] Moving Debian From a Virtual System to Physical Woodsman Debian 4 02-20-2010 06:04 PM
Is This Machine Physical or Virtual? unixanalyst Linux - Hardware 5 10-11-2009 04:24 AM
from virtual to physical kidswipe Linux - General 5 06-11-2007 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration