0

i was looking if there is a option with vmware tools command or any other where i can get the vmware hardware version of the guest OS, currently i have tried is vmware-toolbox-cmd -v which gives the vmware tools version, but not the hardware version, this is very much required for me as one of the application system has given a pre-requisite to get the vmware hardware to be on version 10 before the installation. Currently i have access only to the guest OS no access to the ESX servers.

0

This seems to do the trick for me:

# cat test.sh
#!/bin/bash

case $( dmidecode | grep -A4 "BIOS Information" | fgrep "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"   ;;
    "0xE9AB0" ) echo "ESX 5.1" ;;
    "0xEA0C0" ) echo "ESX 5.1 (older)" ;;
    "0xEA050" ) echo "ESX 5.5" ;;
    "0xE9A40" ) echo "ESX 6.0" ;;
    * ) echo "Unknown version for address:"
    dmidecode | grep -A4 "BIOS Information" | fgrep "Address:" | awk '{print $2}'
    ;;
esac

Example output:

# ./test.sh
ESX 5.1

Note that I've only tested this on centos 6.x and 7.

EDIT: added ESX 5.5, 6.0 and an older version of 5.1. source

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.