VMware {code} Community
DancingZergling
Contributor
Contributor

How to get the uuid of a host system

Actually I want to add a PCIPassthrough device to a VM. In the VirtualPCIPassthroughDeviceBackingInfo, it need to set a systemId.
systemId    xsd:string    The ID of the system the PCI device is attached to. 

I have tried that this systemId is not the one in the HostSystemInfo. The uuid in the HostSystemInfo is just a hardware BIOS uuid, it's not the uuid for the ESXi host.
In the Esxi shell, I found the correct id is saved in the /etc/vmware/esx.conf file, as below:
/system/uuid = "57920319-a8d9-2180-4501-3497f6000f91"

The problem is how to get it.
I have tried to print the advancedOption in the HostConfigManager in the HostSystem, but it doesn't contain this UUID.
I know that this file can be printed by the path https://[HOST_NAME]/host/esx.conf, but it seems not an official method and I'm afraid that this method can be closed for some security reasons.
So how can I get this uuid?

Thanks a lot.

2 Replies
DancingZergling
Contributor
Contributor

Does anybody know this?

I find that the commands "esxcli system uuid get" and "esxcfg-info | grep 'System UUID'" in the ESXi shell also can get the value.

The VMKernel UUID has the same value as this uuid.

But I still can't find a way to get it in the SDK.

Reply
0 Kudos
DancingZergling
Contributor
Contributor

Finally I find the method by myself....

The systemIds of passthrough devices can be find by the path the EnvironmentBrowser->VirtualMachinePassthroughInfo->SystemId.