VMware Cloud Community
gid001
Contributor
Contributor

How to determine ESXI host UUID

Hi,

How to determine ESXI host UUID, either by vClient or CLI?

Tags (1)
11 Replies
BenLiebowitz
Expert
Expert

I've used the script from the link below that worked great for me...

Script to pull host UUID for VMware PowerCLI

Ben Liebowitz, VCP vExpert 2015, 2016, & 2017 If you found my post helpful, please mark it as helpful or answered to award points.
0 Kudos
Anjani_Kumar
Commander
Commander

1. open this url in to the browser with filling the hostname of your browser and login cred.

https://<ESX HOST IP>/mob/?moid=ha-host&doPath=hardware.systemInfo

2. Powershell Script is able to download here. http://professionalvmware.com/2009/04/new-script-get-vm-or-esx-host-uuids-get-uuidps1/

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
0 Kudos
Anjani_Kumar
Commander
Commander

3. For any specific host you can use this one liner too..

Get-View -ViewType HostSystem -Propert Name, hardware.systeminfo -Filter @{“Name”=”VMHostNameHere” } | Select Name, @{N=”UUID” ; E={$_.hardware.systeminfo.uuid } }

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
UmeshAhuja
Commander
Commander

Hi

Similarly you can get the information from vCenter database with the help of SQL query for all the ESXi host. You can run the query by login into vCenter database

select DNS_NAME , UUID_BIOS from [dbo].[VPXV_HOSTS]

NOTE : Would recommend not to go inside the database without the help of database administrator.

Thanks n Regards
Umesh Ahuja

If your query resolved then please consider awarding points by correct or helpful marking.
gid001
Contributor
Contributor

Looks like there is no vcli way of getting the information?

0 Kudos
Anjani_Kumar
Commander
Commander

I am not sure if this will work but you can try find your host uuid via this command or go with the help by (--help | -h ) .

system uuid get

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
0 Kudos
wila
Immortal
Immortal

Hi,

Have a look here:

http://www.vi-toolkit.com/wiki/index.php/Hostsvc/hostsummary

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
gdealencar
Contributor
Contributor

Access the ESXi shell of your host (vSphere Documentation Center) and execute that command:

# esxcli system uuid get

JvodQl0D
Enthusiast
Enthusiast

thank you, the PowerCLI one liner without a filter helped list all host UUIDs

Get-View -ViewType HostSystem -Property Name,hardware.systeminfo | Select-Object Name,@{N="UUID";E={$_.hardware.systeminfo.uuid}}

0 Kudos
briamiva
Contributor
Contributor

Hi,

You can try the following command

Get-VMHost "hostname" | Select Name,@{n="HostUUID";e={$_.ExtensionData.hardware.systeminfo.uuid}}

0 Kudos
HKAmer2023
Contributor
Contributor

Hello,

it's easy by using ESXCLI command:

[root@localhost:~] esxcli system uuid get

this command get host uuid 🙂