Determine VMWare ESX version from Linux as guest OS

Recently I was asked to look at a virtual (linux) system which needed to be moved to a new datacenter. If you want to determine if you are on VM Ware, you can use either lspci or dmidecode. A little searching on the internet revealed it’s reasonably easy to determine the version of VMWare ESX using the BIOS Information:

case $( dmidecode | grep -A4 "BIOS Information" | grep Address | awk '{ print $2 }' ) in
"0xE8480" ) echo "ESX 2.5" ;;
"0xE7C70" ) echo "ESX 3.0" ;;
"0xE7910" ) echo "ESX 3.5" ;;
"0xE7910" ) echo "ESX 4"   ;;
"0xEA550" ) echo "ESX 4U1" ;;
"0xEA2E0" ) echo "ESX 4.1" ;;
"0xE72C0" ) echo "ESX 5"   ;;
"0xEA0C0" ) echo "ESX 5.1" ;;
* ) echo "Unknown version: "
dmidecode | grep -A4 "BIOS Information" 
;;
esac

Sources:

http://virtwo.blogspot.com/2010/10/which-esx-version-am-i-running-on.html

http://dag.wieers.com/blog/detecting-vmware-esx-from-the-guest-os

About these ads
5 comments
  1. Laurent said:

    Thank you, very useful. You can complete it with 0xEA0C0 for ESX 5.1.

  2. Thank you Laurent! I’ve added your comment to the script in the article.

  3. dmidecode requires root access. If you don’t have root access, an alternative would be to search for VMWare MAC addresses in ifconfig output. VMWare MACs start with 00:05:69, 00:0C:29, 00:1C:14 or 00:50:56.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 2,191 other followers

%d bloggers like this: