VMware vSphere

 View Only
  • 1.  Retriev the UUID of a VM form the guest

    Posted Feb 20, 2018 03:31 PM

    Guys, windows guests with vmware tools installed. Any programmatic method (or otherwise) to get the UUID of the vm from the guest?



  • 2.  RE: Retriev the UUID of a VM form the guest
    Best Answer

    Posted Feb 20, 2018 03:44 PM

    Not without permissions to and querying vCenter.



  • 3.  RE: Retriev the UUID of a VM form the guest

    Posted Feb 21, 2018 05:47 PM

    Easiest way would be to go to the host  through Vsphere web console, (assuming you have vsphere access) and then VM's tab.. This will show you the VM's on the host. from there right click in the grey area in the columns field where it shows state, status , space etc and select Show/Hide Columns. From there you can select UUID from the list..



  • 4.  RE: Retriev the UUID of a VM form the guest

    Posted Feb 21, 2018 08:03 PM

    Hmm, just playing around and the UUID as seen in the vSphere web client is shown in the Win32_BIOS data from WMI in windows as the machine serial number but it seems that this might be the BIOS UID and not garunteed to be unique as per:

    So I guess instanceUID is what I'm looking for and it's not available in guest :smileysad:



  • 5.  RE: Retriev the UUID of a VM form the guest

    Posted Feb 21, 2018 09:01 PM

    Use below commands

    c:\wmic bios get name,serialnumber,version

    c:\wmic csproduct get name,identifyingnumber,uuid



  • 6.  RE: Retriev the UUID of a VM form the guest

    Posted Feb 21, 2018 09:56 PM

    Thanks not sure how this csproduct.UUID matches vcentre though?



  • 7.  RE: Retriev the UUID of a VM form the guest

    Posted Apr 22, 2019 10:25 AM

    It seems that the serial number matches the bios uuid with some formatting

    In powershell this works

    ([guid]((Get-WmiObject win32_bios).SerialNumber -replace "[\s-]","").Substring(6)).ToString()