In order to successfully run software that requires hardware ID licensing in a virtual environment, one must be sure to use hardware-assisted virtualization or fully virtual server - as opposed to the paravirtualization (mostly related to Xen). On a Linux system this can be verified by running the following command:
sudo dmidecode | grep UUID
The procedure in a Windows system is a bit more complex, one needs to run some WMI commands.
This article explains all the necessary steps.
Although hardware ID licensing software can be installed without problems on fully virtualized machines, the problem occurs when one wants to virtualize an existing physical machine. This can be achieved with various kind of software, like
CloneZilla for example, but the newly created virtual machine will have a different ID than the original one. If the virtual environment permits it, one can resolve this by manually setting the original hardware ID and thus overriding the one assigned upon the virtual machine creation.
At Mono Ltd we are using Hyper-V and
KVM via ProxMox, which both offer the fully virtualized solution and provide a way to manually set the virtual machine UUID. As for the plain KVM, there is the -uuid argument option when starting the virtual machine. The ProxMox version has a .conf file for every VM, for example:
/etc/qemu-server/101.conf
One can add an uuid argument there, for instance:
args: -uuid 80E44B49-2F0C-DA11-ABB6-72CC4387A395
The Hyper-V procedure again requires the help of the Windows Management Instrumentation. I found the documentation on the net quite scarce about this,
here is an article that explains it. The property we are interested in is called
BIOSGUID. The article has a link to a
ModifyVirtualSystem Method of the Msvm_VirtualSystemManagementService Class MSDN documentation page, which contains a sample vbs script for changing the VM name. One just needs to modify that script a bit (actually modify only 2 lines) in order to change the VM UUID instead. I attached the modified script, the only 2 lines that need to be changed are the following:
set MyFirstVM = GetComputerSystem("YourVirtualMachineName")
where you obviously need to put your VM name. The second part is further below, in the middle of the script, the line where you put your UUID:
virtualSystemsetting.BIOSGUID = "{494BE480-0C2F-11DA-ABB6-72CC4387A395}"
Simple as that, download the script, change these 2 lines and run it on your Hyper-V server.
Last but not least - if you need to virtualize a Linux system on Hyper-V, UUID is displayed differently on Windows vs Linux. Check again the 2 sample IDs I used for KVM and Hyper-V, it's actually the same UUID, but written differently for KVM on Linux vs Hyper-V on Windows. Here's the general logic:
Linux: A1B2C3D4-E5F6-G7H8-XXXX-XXXXXXXXXXXX
Windows: D4C3B2A1-F6E5-H8G7-XXXX-XXXXXXXXXXXX