Tuesday, December 20, 2011

Create Cloneable VirtualBox VM Without Redo Windows Activation

Please do not use this for your production environment, seperate windows licenses must be purchased on production usage. This is only for the local test environment and temporary usage.

I am working on setup a web farm local test environment with Microsoft Web Farm Framework 2.2.  While doing this, I need a few Windows 2008 R2 or Windows 7 instances.  Since I don't have so many hardware, VM will be my best options.  I use Oracle open source VirtualBox as my VM tool.  VM hosted by VirtualBox is much more faster than VMWare player and has more features.

The only thing I need to figure out is after creating a initial baseline copy of the Windows 2008 R2 or Windows 7 VM, how to clone more copies without reactivate windows again.  By default, VirtualBox clone will require reactivate windows.

After some research, I found a solution and tested successfully.  Here is what I am doing:

1. Create a new VirtualBox VM for Windows 2008 R2 or Windows 7
















2. Before installing the Windows 2008 R2 or Windows 7 OS from ISO image, open the newly created *.vbox file with any text editor.  Look for the machine UUID and copy the value without brackets.


















3. Go to either of the following online UUID generation website and create a new UUID.
http://createguid.com/
http://www.famkruithof.net/uuid/uuidgen
http://www.guidgenerator.com/online-guid-generator.aspx

4. Run the following command, where first UUID is the machine UUID, the second UUID is the one generated from one of the above website.
"C:\Program Files\Oracle\VirtualBox\vboxmanage" modifyvm 69310832-0890-4f83-9e9f-72f978818f6c --hardwareuuid b93ff710-28ee-11e1-bfc2-0800200c9a66

5. The *.vbox file should have the newly added hardware UUID.


















6. Now, start to install the Windows 2008 R2 or Windows 7 on the new VM.  After installation complete, activate the windows.  When clone based on the activated Windows VM, there is no need to reactivate again, because the same hardware UUID will be cloned into new Windows VM which the activation depend on.

Please do not use this for your production environment, seperate windows licenses must be purchased on production usage.  This is only for the local test environment and temporary usage.


1 comment:

  1. Seems very simple, just have a few questions. I am looking to save all my settings before I start copying the Windows 7 VM over to other machines. Since the product key really was my only concern and having issues with it re-activating, would there or do you suppose issues would exist if I exported instead of cloning or visa versa on a domain?

    Reason I ask is we have 100's of users and our machines have DeepFreeze installed and exporting the VM as a .ova would allow each user to take the file and export it under their profile, which would be great, but would the hardware UUID still stay intact? DeepFreeze is required on our PC's however we have a thawspace to store files on each computer so files will not be erased due to DeepFreeze. I appreciate the expertise and help!

    ReplyDelete