A funny experience with Windows 7, Sysprep and View 4.5
I had a funny experience this week. Earlier I completed my upgrade to vSphere4.1 (I think the change is not related, but not 100% sure…). I was inspired to get back to work on my guide on View 4.5. But when I started to create new Window 7 desktops I got a weird error which looked like this:
This error happened even when I ran the sysprep manually. So I felt I couldn’t really blame the upgrade of vSphere4.1 for this one….The bizzare thing is that I’ve cloned Windows 2008 and Windows 7 countless times without getting error so I was bit confused why I suddenly having problems.
During the Guest Customization process… Windows would power on after cloning, and arrive at the Ctrl+Alt+Del screen. It would then power down. But when it came back up it would come back with Windows Error Recovery, and default to “Start Windows Normally”…
After this Windows then boots back to the Ctrl+Alt+Delete splash screen and then sits there for sometime. I mean quite a long time. [I'm actually watching the process whilst I type this post!]. The Windows reboots another time… This time it boots to the “VMware Imaging Process message…”
Then a Windows Services starting splash screen appears, followed by ANOTHER reboot to the Windows Error Recovery screen. It’s at this point the deployment process just hangs – and I was left with the hard-error on the console. Confirming this error message just forces the system to reboot and try again – creating a loop. Click the OK dialog box didn’t help. Power off and Power On didn’t help.
My first instinct was to think that somehow my templates had become corrupted, especially when I saw this happen on Windows 2008 R2 64-bit. Anyway, I decided to totally rebuild my templates from scratch. I wasn’t difficult because my templates are more or less standard next-next installations of Windows, I don’t do much in the way of customization. Incidentally, that was interesting process too – with me seeing at least 2-3 times the install of VMware Tools cause random and unexplained reboots of the VM.
A mess right? A gizzillion reboots. Error messages. A lots of waiting around for reboots to happen. Leading to infinite loop, which required me to power off, and delete the VM………………
…
……
……….
Anyway, even after doing all this rebuilding of my templates – I found I still had the problem. What I didn’t realize was that the sysprep process was happening, but I had to keep on interacting with the installer, and stopping Windows repair itself at every possibility. In fact if I hadn’t been monitoring the cloning process I might never had noticed!
I was starting to get frustrated, and tweeted out to my buddies if anyone had seen these error. Fortunately, Kenny Coleman came to the rescue by pointing me to this blogpost on VMware Info:
http://www.vmwareinfo.com/2010/07/windows-2008-sysprep-error-applying.html
At first I’d ignored Kenny message, and had to tweet again to get a link to vmware.info. So I guess the moral of the story is when you ask for help. LISTEN TO OTHER PEOPLES ADVICE, and don’t discount the advice until you’ve checked it out. The retweet end up with Chris Calaf giving me a link to the post above.
Now although the error message is different I found if DON’T include a license key in the sysprep process goes absolutely bonkers. With all many of reboots, repairs and error messages – as soon as enter a valid license key this weirdness goes away. I guess you might sensibly ask why I don’t have a valid Windows 7 license key. Well, I do. I have a limited TechNet MSDN Subscription that only allows for so many activations until the key is locked. So I’m very careful when I use these keys because they are are in short supply. So generally reserve them for important long term stuff like my AD, SQL and vCenter boxes. I wouldn’t want to go wasting them on Windows 7 desktops that might not live for a day.
Interestingly, once Windows 7/Vista/W2K8 gets a valid key, then Windows defaults to activating itself within 3-days. Even though you actually get 30-days of evaluation with Microsoft. So I changed my guest customization in VMware to include a valid Window 7 license key. And then went looking for a method to stop this automatic activation. I found this:
http://www.zdnet.com/blog/bott/vista-hands-on-8-delay-activation/222
This refers to Windows Vista, but with some delving I managed to find the right path for Windows 7.
HKLM\Software\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation. In the right-hand pane, I double-clicked the Manual value and change it from 0 to 1. This stops the automatic 3-days activation, and instead says I have 30-days of use. Of course without activation, I wlll only get 30-days use from my desktops – without running the slmgr.vbs -rearm option. If you don’t know you only get 3 chances to do this before that stops. You can still use Windows beyond this – but you will get a hard-console error telling you to activate, with the standard “Genuine Windows Advantage” warnings.
Even with the correct license key and these changes – it’s still a convoluted process…
Well. We’re a long way from “Corp Keys” available online aren’t we?
I don’t have any of these woes with Windows XP. It’s hard to wonder with these woes, why people would want to select Windows 7 has the basis of their virtual desktop roll-out.








RSS
iTunes
August 2nd, 2010 at 10:08 am
Hello Mike,
Maybe you can solve any problems by using a KMS server for activating the Windows 7 clients.
There is information on setting up an KMS server at MS: http://technet.microsoft.com/en-us/library/dd772269.aspx
After you have setup the KMS server u can use the KMS keys that Microsoft provides:
http://technet.microsoft.com/en-us/library/ff793406.aspx
This is the preferred method of activating clients and servers when i need to deploy allot of VMs (or physical machines in that case).
August 7th, 2010 at 8:36 am
Have you tried skiprearm in your sysprep? http://d3planet.com/rtfb/2010/05/18/creating-an-activated-windows-server-2008-r2-vmware-template-using-microsoft-sysprep/
I’d be curious to hear if this works for you. Someone who read my blog seems to have the same issue so I’ll be linking back to this post. Awesome info and thanks!
August 9th, 2010 at 11:41 pm
This is a new (crappy) ‘feature’ of sysprep only 3 tries of running generilze before it locks up the whole system and you can no longer run it – a real pain if you’re not expecting it.
Anyway, you can put the following in a batch file to activate silently:
cs cript //b c:windowssystem32slmgr.vbs /ipk 12345-12345-12345-12345-12345
cs cript //b c:windowssystem32slmgr.vbs /ato
If you get the message again and really want to know what’s going on do the following:
Press Shift + F10 for a cmd prompt and then you can navigate to c:windowspanther – from here review the dumpfile.xml file (last 75 lines generally tell you what failed)
Also in this mode you can press the WindowsKey + E (windows explorer) and kind of get a desktop experience, I got a semi-usuable system for troubleshooting