sysprep failure on Windows Server 2008

0

Before deploying a Azure VM Role, we need to perform

%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown

But in my case the sysprep fails with the log file %windir%\system32\sysprep\Panther\setuperr.txt saying:

2012-07-05 08:03:57, Error      [0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 31
2012-07-05 08:03:57, Error      [0x0f00ae] SYSPRP WinMain:Hit failure while processing sysprep cleanup external providers; hr = 0x8007001f

I do not always want to create a new image. Is there any work around? I followed the instructions in MS support here and tried:

%windir%\system32\sysprep\sysprep.exe /generalize /oobe /shutdown /unattend:.\unattend.xml

It did not work.

Under certain circumstances, I need to tear down the VM Image from azure and re-deploy with some more changes. So sysprep has to run almost twice every week.

azure
windows-server-2008
azure-vm-role
unattended-processing
asked on Stack Overflow Jul 5, 2012 by dushyantp

3 Answers

0

Have you tried to use the UI? Just execute the sysprep.exe directly and a UI should open.

If you have to use the console, maybe try to run the console in evaluated modus. (run as admin)

answered on Stack Overflow Jul 5, 2012 by Daniel Manzke
0

Found that there is a limited number of times we can run sysprep on a Windows machine. I made the mistake of keeping one image and run sysprep on it everytime before uploading it as Azure VM Role. This can cause the licensing etc fail on the Windows machine.

So what I am doing now is keeping one backup of the VHD which is not syspreped and making changes to it. Then keeping backup again before running sysprep. So basically the Windows is effectively sysprepped only once before uploading. It works for me now.

answered on Stack Overflow Aug 28, 2012 by dushyantp
0

You need to use SkipRearm in your unattend.xml file. See http://technet.microsoft.com/en-us/library/cc722350(v=WS.10).aspx for basic information on where this is located. SkipRearm will allow you to sysprep an unlimited number of times.

If you don't know how to create an unattend.xml file you have a bit of a learning curve to get up. You can also include your volume license key and auto-activate as well as many other unattended features.

But I don't understand why you don't generalize and capture a .wim file and redeploy that image. Then again, you are in VM mode and I don't know much about that. Perhaps your VM software captures your sysprepped partition like imagex.exe captures a .wim file.

If you need more help with unattend.xml post a general question on that and we'll try to jump on that (when I have all my documentation with me).

answered on Stack Overflow May 25, 2013 by Kent England

User contributions licensed under CC BY-SA 3.0