Using software with a node-locked license within VirtualBox
We have already explained how to set the BIOS date of a VirtualBox virtual machine. Today we are going to do something a bit more sophisticated. We are going to fool a license manager into believing that the virtual machine is exactly the same physical hardware in which the program was supposed to run.
This technique has a broad spectrum of applicability. The most common example would be the guy buying a computer with a pre-installed proprietary operating system. It is quite common for the installation CD of certain proprietary systems to be locked to a specific computer brand or model, to a serial number or to a hardware ID. But let’s imagine that our guy does not want to use the proprietary operating system as his primary operating system and that a dual-boot set-up does not fulfil his needs because he wants to use the proprietary system sporadically within a virtual machine at the same time that he is using his primary operating system.
In such a case, the first thing that this user should do is checking whether or not the license agreement of the proprietary operating system prohibits installing the system within a virtual machine. If it does not, we are ready to proceed. I really do not see any ethical issue with this method, for we are going to run a software we have already paid and for which we have a valid license and we are going to run it in the same computer it was supposed to run. The only difference is that there will be a virtualization layer between the operating system and the real hardware.
In my case, the situation was slightly different. I have an old node-locked 32-bit code that I used to run in a 64-bit machine (the licensed machine). However, the program started to refuse working after certain system upgrades due to library version incompatibilities. Initially, I patched my system just to be able to use this particular program. However, at certain point it became evident that this was not a good strategy and it was then that I decided to try virtualization.
In the following lines I will describe the procedure that worked for me, however, you may need to adapt it to your own circumstances. I have a Debian host (64-bit) and a Debian guest (32-bit). Apparently, in my case the license manager reads the hardware information from the BIOS and therefore that was all I needed to care about. In certain cases, you may also need to match other information between your guest and host machines (host name, local IPs, user name, user ID, paths, etc.), depending on what kind of information your license manager is locked to. A general policy may be trying to match your host and guest configurations as much as possible, just in case. Namely if you have no clue on how your license manager works.
1.- Fist, you will need a program called dmidecode. This software gathers information about your BIOS and hardware and comes preinstalled in many GNU/Linux systems. The commands “dmidecode -t0″ and “dmidecode -t1″, respectively, will give you all the information you will most likely need.
2.- Next, you need to pass the information to your virtual machine. In order to automatise this, I used the following bash script:
VSETED="VBoxManage setextradata $VM_NAME"
$VSETED $CFG_PATH/DmiBIOSVendor "American Megatrends Inc."
$VSETED $CFG_PATH/DmiBIOSVersion "'V1.08'"
$VSETED $CFG_PATH/DmiBIOSReleaseDate "03/30/2011"
$VSETED $CFG_PATH/DmiBIOSReleaseMajor 2
$VSETED $CFG_PATH/DmiBIOSReleaseMinor 6
$VSETED $CFG_PATH/DmiBIOSFirmwareMajor 2
$VSETED $CFG_PATH/DmiBIOSFirmwareMinor 6
$VSETED $CFG_PATH/DmiSystemVendor "<EMPTY>"
$VSETED $CFG_PATH/DmiSystemProduct "<EMPTY>"
$VSETED $CFG_PATH/DmiSystemVersion "<EMPTY>"
$VSETED $CFG_PATH/DmiSystemSerial "<EMPTY>"
$VSETED $CFG_PATH/DmiSystemSKU "To Be Filled By O.E.M."
$VSETED $CFG_PATH/DmiSystemFamily "Server"
$VSETED $CFG_PATH/DmiSystemUuid "9852bf98-b83c-49db-a8de-182c42c7226b"
dmidecode -t0 will provide you the first half of the information you need and dmidecode -t1 the second half. As you can see, in my case some of the fields are empty and you also see the correct format to indicate this. The only non-obvious values correspond to the minors and the majors. Major corresponds the part of the SMBIOS version to the left of the point the minor to the part to the right (in my case the SMBIOS version was 2.6, major is therefore 2 and minor is 6). Also note that the minors and the majors are the only non-quoted values (they are numerical values whereas all the rest are strings). In my case, the virtual machine is called DEBIAN. Obviously, you need to replace that string with whatever you have called or you are going to call your virtual machine.
3.- Before running this script you need to create the virtual machine. Make sure that the name you assign to it matches the name in the script. At this point, just create the machine and close VirtualBox (do not attempt to install the operating system yet).
4.- Run the script. If you wish, you can verify that it has worked as expected by having a look to the corresponding vbox file in your $HOME/VirtualBox VMs folder.
5.- Finally, start VirtualBox and install the operating system as you usually do. The license manager should now believe that your virtual machine is identical to the physical hardware on top of which the VM is running.