Solved

VM BIOS UUID hosted on ahv hypervisor

  • 4 August 2023
  • 4 replies
  • 138 views

How to get Nutanix AHV VM bios UUID

icon

Best answer by sl.farhanparkar 5 August 2023, 18:47

View original

This topic has been closed for comments

4 replies

Userlevel 3
Badge +5

Hi @IsmailS 

Currently, AHV VM do not contain BIOS UUID, i believe your use case is some application licensing based on VM UUID. 

But rest assured the feature is much anticipated and actively worked on and will be available in upcoming release.

I will advise to open support ticket so if your use case is same as i had mentioned you can vote on the development of the feature

F>P

Userlevel 4
Badge +7

Hi @IsmailS 

Nice to meet you, are you hoping to achieve this via UI, CLI or API?

Thanks,

Kim

Hi @Kcmount  I had got UUID of vm through CLI but i need UUID of BIOS of VM

Userlevel 4
Badge +7

Hi there,

I’ve not tested this recently but I had to convert the ID of the VM (taken from Prism) to that of what was picked up on PXE booting for installations of OS.

If you try this it might work…

 

function Convert-GuidToOctetString

{

    param

    (

        [String]$Guid

    );

 

    [Guid]$g = New-Object Guid;

    if([Guid]::TryParse($Guid, [ref]$g))

    {

        return ([System.String]::Join('', ($g.ToByteArray() | ForEach-Object { $_.ToString('x2') })).ToUpper());

    }

    else

    {

        throw Exception("Input string is not a valid GUID")

    }

 

}

 

 

$uuid = “the ID from above” ; Convert-GuidToOctetString

 

I can’t recall where I originally found this - it is seen widely online though - https://community.spiceworks.com/topic/1633583-convert-guid-to-octet etc

 

 

If not, then I think virsh dumpxml is the only hope we have without some creativity.