Vm versus physical linux server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Vm versus physical linux server
# 8  
Old 06-14-2013
what I am saying is:
vmware mac addresses usually starts with "00:50", but if any other pattern exists, you ifconfig -a on your vmware server and use your own pattern.

---------- Post updated at 03:29 PM ---------- Previous update was at 03:28 PM ----------

dmidecode is not a global answer. It does not exist on all operating systems.
# 9  
Old 06-14-2013
But VMWare MAC addresses don't usually start with "00:50", and in a real-world scenario in which our MAC addresses are dynamically created based on hostname, which ties in with our network team, who assigns an IP address based on the MAC address, your theory doesn't hold water.
# 10  
Old 06-14-2013
Quote:
Originally Posted by doganaym
[..]
dmidecode is not a global answer. It does not exist on all operating systems.
Right, but the OP's question is about Linux. What Linux distribution are you referring to that does not have dmidecode?
# 11  
Old 06-15-2013
Here are one VM
Code:
dmidecode | more
-bash: dmidecode: command not found
root@SR2 ~ [0:8]#ifconfig -a|grep HWaddr
eth0      Link encap:Ethernet  HWaddr 00:16:3e:93:95:92
root@SR2 ~ [0:8]#uname -a
Linux SR2 2.6.38-8-generic-pae #42-Ubuntu SMP Mon Apr 11 05:17:09 UTC 2011 i686 i686 i386 GNU/Linux

Here from another type
Code:
ifconfig -a|grep HWaddr
venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

uname -a
Linux SR3 2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 i686 i686 i386 GNU/Linux

dmidecode | more
-bash: dmidecode: command not found

none of them has demidecode, nor hw 00:50
# 12  
Old 06-15-2013
@jotne, so sometimes it is not installed by default (or by choice?), thanks. But can't you just apt-get install dmidecode?
# 13  
Old 06-15-2013
I was able to install, but get this
Code:
dmidecode
# dmidecode 2.11
/dev/mem: Operation not permitted

other server
Code:
dmidecode
# dmidecode 2.9
# No SMBIOS nor DMI entry point found, sorry.

My old physical server it runs fine.
# 14  
Old 06-15-2013
Most probably there is no general answer which can be given to the problem. There are many different ways of virtualzation and it is not possible to detect all of them with a single command.

There are fully virtualized environments, like VMWare, KVM (Qemu), etc.. These create a virtual hardware onto which a system is generically installed. This can probably detected with "pciwalk" or similar tools because they use one or the other virtualized "hardware", for which a physical counterpart doesn't exist. Some sort of "Virtual Ethernet Card" or so will not be installed in a physical server.

This will have to be done on a product-by-product base because such "hardware" quirks will most probably not be consistent over different virtualization products.

Then there are para-virtualized environments (for instance: OpenVZ), where virtual systems are not real systems (not even virtualized ones) at all: OpenVZ basically is a hacked kernel which is able to run the processes belonging to different virtual systems separated from each other. From "inside" the system it looks like a standalone system, but on the hardware node (=host system) all the processes are visible. This makes the virtualization overhead much smaller and hence allows more virtual systems on the same hardware. Also, the virtual systems can be a lot smaller (web servers with 256MB memory are quite common), because many of a systems operations happen in fact not in the "local" kernel but the kernel of the hardware node. (In fact this is a kind-of chroot-environment with some additional management possibilities.)

It can usually be detected by some specialized commands, which allow to modify the virtual machine somehow, for OpnVZ this would be "vzctl". But like with the other virtualization techniques this will be on a case-by-case basis.

So coming back to your problem, the best you can probably do is to try to detect one after the other virtualization product and if you come up blank your system is most likely hardware (or a virtualization product you haven't recognized).

I hope this helps.

bakunin

Last edited by bakunin; 06-15-2013 at 08:10 AM..
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