Howto use a Virtualbox virtual disk file as a template

It turns out a Macbook Pro is a brilliant machine event when you need to do some code development on SharePoint. In short, create a Windows Server 2008 R2 Server in Virtualbox, install SharePoint and it boots and works faster than on a traditional server with spindle disks, thanks to its fast SSD.

Now you might need to keep some backup copies (read templates) of your fresh Windows installs, in order to reuse them for different projects / customers. In order to be able to use the copy for a new vm, you need to change the uuid of the vdi file, or otherwise Virtualbox will complain for the duplicate and won’t let you use it.

The command is:
VBoxManage internalcommands sethduuid {path-to-vdi}.vdi