Vm versus physical linux server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Vm versus physical linux server
# 1  
Old 06-14-2013
Vm versus physical linux server

Does anyone have a script that can be run to tell you if you are on either a VM Linux or a physical Linux server?

Last edited by joeyg; 06-14-2013 at 03:19 PM.. Reason: Clarified Title
# 2  
Old 06-14-2013
no need for a script:

Code:
vmware QEmu or KVM:
dmesg | grep -i virtual

if these don't work check the config of a hard drive or cd rom and if it says virtual well there's your answer.
# 3  
Old 06-14-2013
Code:
if [ $(ifconfig -a|grep HWaddr|grep "00:50"|wc -l) -eq 0 ]
then
 echo "Not VMware or Physical"
else
 echo "VMware"
fi

# 4  
Old 06-14-2013
Are you suggesting that every Linux VM has a network interface whose MAC address contains "00:50"?
# 5  
Old 06-14-2013
if you need a script to identify if your server is vm or not,
I consider that you have at least one vmware and 1 physical server.
you can ifconfig -a on both and change 00:50 if needed scott
# 6  
Old 06-14-2013
You'll have to indulge me. I don't understand what you're saying.
# 7  
Old 06-14-2013
dmidecode should tell you something.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Run level process when Physical server goes down

Need inputs when physical server is coming down (ex- init 0) . We have a physical server in that there are couple of LDOM's and in LDOM's there are couple of Zones . In zones there are applications running . Physical Server (T4 Server) -> LDOM -> ZONES -> applications There are scripts... (1 Reply)
Discussion started by: ajayram_arya
1 Replies

2. Red Hat

Redhat versus Ubuntu Linux distribution

I am being asked to use RHEL red hat instead of ubuntu. Are the basic commands the same? I know the licensing is different, but are the package mangers/repositories the same? That is will sudo apt-get still be used? I have been using ubuntu for 4 years and have never used red hat so any... (5 Replies)
Discussion started by: cmccabe
5 Replies

3. UNIX for Dummies Questions & Answers

VM v Physical Server Speeds

HI We have been asked by our IT department to move from our current physical solution to a VM environment. I am not that clued up on VM. I looked from some benchmark tests to run so i can see a comparison between our live and new VM we have been presented. Please see below for results. To me the... (3 Replies)
Discussion started by: treds
3 Replies

4. Solaris

Physical and virual server difference

Hi, i am trying to find whether any particular solaris server is physical or virtual....are there any commands or set of commands which only runs (or provide specific pattern ) on physical machines and provides different pattern or error on virtual one... Is this the correct approach to... (7 Replies)
Discussion started by: omkar.jadhav
7 Replies

5. UNIX for Advanced & Expert Users

Server is virtual or physical?

Hi All, How can I know whether the server I am connecting to is a virtual or physical one? The server might be having any Unix OS (Linux/Solaris/HP-UX etc.). Is there any system files / commands which can show these concrete information? Thanks in advance for the replies. sanzee (1 Reply)
Discussion started by: sanzee007
1 Replies

6. Emergency UNIX and Linux Support

sed on Mac OS versus Linux

I'm trying to replace space with inderscore on Mac OS X 10.6.3 sed -i 's/ /_/g' somefile sed: 1: "hsa_mirbase.fa": extra characters at the end of h command This works perfectly fine on Linux. Thank you Joseph Dhahbi (3 Replies)
Discussion started by: jdhahbi
3 Replies

7. IP Networking

I can't get access by physical name to server

Hi all I have connected new server to LAN but when I use rlogin command by server name it dose not work but by IP adderss it works. can any one tell the reason? (4 Replies)
Discussion started by: bintaleb
4 Replies

8. Solaris

List all resources on physical host LDOM server

Hello, I have a SUN T5240 running Solaris 10 with Logical Domain Manager (v 1.0.3). You can use the "ldm" command to display current resources on the box. Is there away to display all the "physical resources" on the box(i.e.,used and unused). For example, "ldm ls" will tell me what the... (5 Replies)
Discussion started by: stephanpitts
5 Replies

9. UNIX for Dummies Questions & Answers

CTRL+H versus ^? versus BACKSPACE

Hi Gurus! I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key. After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile. Can someone please help me with the correct "STTY" sequence... (3 Replies)
Discussion started by: alan
3 Replies
Login or Register to Ask a Question