Microsoft Azure Stack is an extension of Azure—bringing the agility and innovation of cloud computing to your on-premises environment and enabling the only hybrid cloud that allows you to build and deploy hybrid applications anywhere. We bring together the best of the edge and cloud to deliver Azure services anywhere in your environment.

Accessing and Using Azure VM Unique ID

We have recently added support for Azure VM unique ID. Azure VM unique ID is a 128bits identifier that is encoded and stored in all Azure IaaS VM’ SMBIOS and can be read using platform BIOS commands.
This identifier can be used in different scenarios whether the VM is running on Azure or on-premises and can help your licensing, reporting or general tracking requirements you may have on your Azure IaaS deployments. Many independent software vendors and partners building applications and certifying them on Azure may require to identify an Azure VM throughout its lifecycle and to tell if the VM is running on Azure, on-Premises or on other cloud providers. This platform identifier can for example help detect if the software is properly licensed or help to correlate any VM data to its source such as to assist on setting the right metrics for the right platform and to track and correlate these metrics amongst other uses.
This unique identifier cannot be modified, it can only be queried. Although only new VMs created after 09/18/2014 will have this capability enabled upon creation, VMs that were created prior to 09/18/2014, will automatically get this capability upon next VM restart. Azure Unique VM ID won’t change upon reboot, shutdown (either planned for unplanned), start/stop de-allocate, service healing or restore in place. However, if the VM is a snapshot and copied to create a new instance, Azure VM ID will get changed.
If you have older VMs created and running since this new feature got rolled out (9/18/2014), please restart your VM to automatically get a unique ID which you can start using upon reset.
To access Azure VM ID from within the VM, follow these steps:

Step 1 - Create a VM (only VMs created after 9/18/2014 will have this feature enabled by default)

No matter what your platform or applications requirements on Azure VM, you can now have access to an Azure VM unique identifier.
If you have older VMs created and running since this new feature got rolled out, please restart your VM to automatically get a unique ID which you can start using upon reset.