Getting around Windows Activation when Virtualizing

11Jul07

(Time required = 30 minutes) Scroll down to Setting up Automatic Activation to see the process if you are not interested in the background.

Background

When I first setup my VMware Server to run an existing Windows Install from a physical partition, I was asked to reactivate Windows XP before I could use it as a guest OS. All this required was to enter the product key, request verification and within a couple seconds everything ran fine. I received a lot of complaints from people saying that they were then again asked to reactivate Windows again once they booted back into Windows natively, and then again under VMware and so on every time the OS was booted in a different environment. I wasn’t sure what to tell readers and a web search brought up an endless number of forums with the same problem but no answers. My favorite answer had to be this one from a Microsoft tech saying “Running a virtual machine counts as running two copies of Windows”. Really? Maybe he should have read the user’s question more carefully. Regardless, I couldn’t really help since I couldn’t reproduce the problem.; that was until I upgraded my hard drive this week.

I found myself experiencing the same problem others had mentioned; I would boot natively and be asked to reactivate, it would work fine until I booted the VM and was again asked to reactivate. Remember that WPA (Windows Product Activation) typically allows you to reactivate twice through the internet and after that it requires you to call in. This meant that I was calling up MS every time I wanted to boot in a different environment; hardly practical considering it takes 10 minutes each time activating over the phone.

Reading up on WPA I learned that there are two files used to store the hardware info along with WPA data, WPA.dbl and WPA.bak (These files reside in C:\Windows\System32). If you go through the activation process in Windows natively as well as under VMware you will notice that the file size changes each time you reactivate. This means that if you replace the WPA files prior to booting based on whether you’re using VMware or booting natively you won’t have to reactivate. You will have WPA files for your native hardware and WPA files for your virtual hardware, just swap prior to boot.

I set out to write a script in Linux to perform this but ran into a much simpler solution that a Mac user developed. Linux users can follow the steps below to achieve the same results.

Setting up Automatic Activation

Step 1:

Boot into Windows XP natively. You will be prompted to activate your copy of Windows (if already activated, skip activation and just copy the files). Go ahead and reactivate your copy, this can be as simple as doing it through the web or going through a 10 minute phone call with Microsoft’s automated machine. Once Windows is activated:

-Navigate to C:\Windows\System32

-Create a new folder and name it “nativeboot”

-Copy and paste wpa.dbl and wpa.bak from C:\Windows\System32 into the new “nativeboot” folder

Step 2:

Boot into Linux. Run VMware and boot into Windows XP. You will be prompted to activate your copy of Windows. Go ahead and reactivate your copy, this can be as simple as doing it through the web or going through a 10 minute phone call with Microsoft’s automated machine. Once Windows is activated:

-Navigate to C:\Windows\System32

-Create a new folder and name it “vmware”

-Copy and paste wpa.dbl and wpa.bak from C:\Windows\System32 into the new “vmware” folder

Step 3:

You now have a copy of the WPA info for both your physical and virtual hardware! The next step is to guide Windows to use the right set of files when booting. The easiest way to do this is to setup a script that will be run when Windows boots:

Windows should now automatically choose the right WPA files and not require activation as you restart or change from physical to virtual hardware.

Additional Thoughts

Nevertheless, the fact that users need to go through this process to get their systems working is beyond stupid. WPA has in no way eliminated piracy and problems like this many times lead users to ditch legal software and go the route of pirated software which isn’t infested and crippled with WPA. It’s clear that Microsoft did not foresee these problems and still fails to address them. The fact that a call to MS tech support will result in them telling you that you will need two copies of Windows when virtualizing shows a lack of understanding as well as a lack of a clear solution. Even if you were to pay MS an additional $300 you would still be where you started if you are trying to virtualize a physical partition, you would just be out $300. This is because each copy of Windows can only handle one WPA file and can only be installed on one PC. When you switch environments, WPA thinks you are completely changing computers and requires reactivation. MS will try to tell you that virtualization requires two copies of Windows and that you are violating the EULA by virtualizing the same copy. THIS IS NOT TRUE. You only installed Windows once, it’s all the same set of files, and you’re still technically running it on the same original hardware since you are using the same CPU, Mobo, HDD, RAM, NIC, etc. What you are doing is not in violation of the EULA and don’t let Microsoft’s limitations in software design limit your options and your computer’s functionality.

microsoft wants you to pay twice for running the same copy of software.

this isn’t something the overlooked it is designed this way. they are out to keep their stockholders happy.

to keep feeding the company money when there is linux available is isanity. I just quit buying their products and am strictly using linux and will never look back. bye bye microsoft – my data is my data and I want to store my data in a truely open format like ODF.

Thanks for catching that guys, it is WordPresss formatting the code, a simple double slash fixed the problem. Let me know if I missed any.

James, thanks for the comment. I understand MSFT wanting you to purchase two separate copies if you were doing a new install on a virtual disk. But this should not be the case when virtualizing a physical partition since Windows is not being installed again. Moreover, buying a second copy for installing on a virtual disk will fix your WPA problems but buying a second copy will not fix your WPA problems for booting a physical partition. The fact that they tell customers with this problem to buy a second copy is just plain stupid. There is nothing that I would love more than to run only Linux but that is not a feasible solution for me or others as you can see from the comments. The software market being what it is, there are certain applications that are only available in Windows and sometimes for school or work you just need to use them.

Salam M Azimi,
I am thankful for your articles on using Virtual Machines in different ways, Could you please write a small article on how can i easily use a Virtual Machine created in Windows in Linux Host OS and vice versa.

thanks for the script.
Any Idea if this works also for “Microsoft Office 2003″ or is there a similar mechanism?
I’ll have to reactivate Office, but i don’t know i which environment to start with..and what to backup..

I’ve read the answers given by Microsoft techies about this problem. It’s quite a feat to be so obtuse about a simple matter. They don’t even try to understand what the customer is saying (despite the provided links). Their own arguments show that User profiles in Windows is a scam. That exchange would have made a perfect script for a Buster Keaton movie. It’s no wonder that Microsoft produces shoddy software despite hiring legions of talented people.
One way out of this mess would be for companies like Adobe to start releasing *nix versions of their applications, the way Oracle does.

Sorry if this is a dumb noob question, I am new to Linux…. Would the WPA issue apply if I have a dual boot Lin/Win and also have a VMWare Windows as well ?
(I am intending to get rid of the dual boot eventually and just use a VM but in the meantime I want to have both – I guess I’m “evaluating” whether switching fully to Linux is viable for me).

You have to check the name of your VirtualBox Network Adapter in the virtualized Windows. For this do a ‘ipconfig /all’ in a “DOS-Box” (start – run – cmd – enter) and look for something like ‘Ethernetadapter der AMD-PCNET Familie’ (in my case in german).

Now change the value ‘find “VMware” in line 2 with a part of the name of your VirtualBox Ethernet Adapter, for example with ‘find “AMD-PCNET”.

Save the script and GOOD LUCK !!

@Mohammad Azimi -> thank you for your very helpfull article. Great work!

This is a great idea, except that it doesn’t seem to work for me. My wpa files does not change size or date modified after activation . When rebooting from virtual to native, Windows still wants to activate within 3 days. Any hints? By the way, I have XP Pro SP 3.

It never ceases to amaze me how happy people are to misinterpret legal documents (a EULA in this case) for their own gain.

When they do, they tend to justify it by saying “well isn’t Microsoft a big huge corporate and aren’t they wielding their power over us poor individuals?”

I agree that Windows XP’s EULA wasn’t designed for the emerging market in virtualisation (think a little about when it was written, and the state of play at that time, and the fact it’s not possible to change an EULA for a given product once you’ve already put it on a market), but saying that Microsoft are showing “a lack of understanding as well as a lack of a clear solution” is a tad disingenuous.

The EULA states that a Windows XP licence pertains to one device, and one device only. One, at any given time. There is a little slack in the EULA, designed so that when someone changes their hardware, they may still actually use Windows – but that slack is not there to allow multiple copies of the OS to run. It’s there to make life easy. That’s a nice thing to do.

It riles me when software companies make things a little easier for the user, then the user responds by claiming that they are ‘owed’ that right and that the company is terrible for making your life difficult.

> “MS will try to tell you that virtualization requires two copies of Windows and that you are violating the EULA by virtualizing the same copy. THIS IS NOT TRUE.”

Hmm, maybe using ALL CAPS strengthens your small-minded feelings on the law against the actual truth of the matter.

Even if you don’t run multiple OSEs simultaneously, I would suggest that *you* read the EULA instead of asking your readers to. Have you actually read through it, or are you just saying you have?

Mat Smith, I’m sorry you were having a bad day and need to resort to name calling but I suggest you read the entire post before you criticize me for having problems with “words that are too long” and being “small-minded”.

You state: “The EULA states that a Windows XP licence pertains to one device, and one device only. One, at any given time. There is a little slack in the EULA, designed so that when someone changes their hardware, they may still actually use Windows – but that slack is not there to allow multiple copies of the OS to run. It’s there to make life easy. That’s a nice thing to do.”

If you actually read the post and knew what was being discussed you would realize that this method is not to “allow multiple copies of the OS to run” at once. I have a Windows install and I virtualize that same Windows install within Linux. I have not reinstalled or copied Windows in any way and it continues to run on the same exact machine from the original install.

Just FYI, the EULA states:
“1.1 Installation and use. You may install, use, access,
display and run one copy of the SOFTWARE on
the COMPUTER. The SOFTWARE may not be used
by more than two (2) processors at any one time on the
COMPUTER, unless a higher number is
indicated on the COA.

1.2 SOFTWARE as a Component of the COMPUTER – Transfer.
This license may not be shared, transferred to or used
concurrently on different computers. The SOFTWARE
is licensed with the COMPUTER as a single integrated
product and may only be used with the COMPUTER.”

I am doing exactly as the EULA specifies running one install of Windows on a single machine. I have not setup a virtual environment where I reinstall Windows and use the same product key, it is all the original install. Also, my problem with Microsoft in the matter of XP (mind you this was posted 1.5 years ago when XP was still being sold and supported) is that they didn’t have a clear solution for this problem. Even if your false claims were true and I had to purchase another license, XP would still have issues with licensing and lock itself up.

this blog tought me a lot; however, after following the instructions, the script is not loaded prior to boot. Does this have to do with XP service pack 3 (as suggested by some comments)? or is the “Fast Logon Optimization feature” the evil-doer (I don’t seem to be able to find it in the GPO). manually replacing the wpa.* files in the systems32 folder and then restarting windows also seems to work, but is just as time-consuming as reactivation… I guess I won’t switch too often between the vm and the native boot.

I am also running into the same problem of virtualizing (using VirtualBox in Ubuntu 8.10) my physical Windows XP SP3 partition. I therefore get the Windows Activation messages every time I boot WinXP using VirtualBox.

I was planning on using the solution proposed by you, Mohammad, but I have seen some issues and I was wondering if Service Pack 3 had something to do with it as mentioned in some of the posts.

First, I can only find the wpa.dbl file within my system32 folder. Second, windows activation does not let me activate my virtualized version. Does any of this have anything to do with Service Pack 3?

I would truly appreciate if I could get some advice or help, since I deeply want to keep using VirtualBox.

1. I successfully reactivated XP under VMware and newly generated wpa.* files were different than original ones. I made 2 dirs as proposed by author.

2. Startup script doesn’t run before user login script appears. Instead it only runs after successful user log in. (Here I guess that SP3 changes the way the startup scripts are handled)

I started to think how to launch the script…

* I remembered old DOS times and autoexec.bat, but XP only parses it for env vars only. won’t work any way.

* I’ve downloaded W2K3 Server Resource Kit and install script as Windows Service using srvany.exe from the ResKit. Still doesn’t work – service is started also after user login. Very strange. But I gave up and:

* added some simple lines to vmware startup script:
they copies vmware-activation files to mounted /media/disk/WINDOWS/system32/ before starting vmware binaries
also I removed `exec` from line launching vmware binaries and added after this line the lines which restores native-activation files after vmware exits

I know it isn’t so smart and elegant solution as proposed by author but it works for me.

PS. For someone who said that files didn’t change after reactivation. My system was installed as XP+SP1_integrated then activated and then SP3 was installed. May be this is a point if you will compare with XP+SP3_integrated, I don’t know.

I struggled with this myself recently and even installed the script. I was hoping it would solve what I thought was an activation loop with my SP3 slipstream. In the end I disabled the script and finally discovered that Windows seems to be happy switching between two different activations. I *think* Windows XP is okay with switching back and forth between the last two configurations that you’ve activated. Note that installing VMWare Tools causes hardware to change enough that a second activation is required there.

So I’m now to the point where I can boot the same partition into Windows XP (native) with one hardware config, and also into VMware Player with a different hardware config. And I’m no longer bothered to re-activate.

This lets me run iTunes inside of VMWare on my MythTV box and download TV shows, etc.. Unfortunately playback is intolerably slow through vmware, so I have to reboot into windows natively and then playback is fine. It’s a bit of a hassle, but it’s cheaper than an AppleTV! (and adminstering yet another box)

Hi guys! Great site. Thanks to it I got my Native/Guest configuration up and running in no time. I might have found another (pretty easy if it works, did for me) solution to the activation problem with SP3. After a lot of browsing I worked out this solution (based on VBox, don’t know if it works in VMware as well):

1. When in Native, Start>Run>cmd>”ipconfig /all”. Check the MAC (physical) address and write it down.

2. Reboot and start VBox (don’t start guest OS)

3. Enter Settings for Guest. Then go to the tab Network and click Advanced.

4. In the field “Hardware address (?)” (I’m not running the English version, but it should only be one field for you to type in) erase the existing address and enter the MAC address from your Native without dashes.

5. Switch between Guest and Native a couple of times to make sure it works.

Thanks for this guide. I am trying to install microsoft office 2007 in VMware. The problem is the Office 2007 activation. http://www.trendsandnews.net/office-2007-2003-xp-activation-without-contacting-microsoft/ With this method I saved the activation files before installing MS Office in VM ware and than after installing MS Office 2007 in VMware it does not reactivate automatically. Can you please help me how can I activate my genuine Office copy in VMware. Thanks.