[WORKAROUND] Unable to Sysprep & Capture Existing Image
-
Wednesday, June 27, 2012 12:24 PM
In Short
I'm trying to capture an image of Windows Server Standard 2008 R2 that's fully patched for deployment. I created a new Sysprep & Capture TS but it doesn't sysprep or capture, and seems to terminate without errors. I think the [highly customized] CS is the culprit, but what?History
I'm in need of a second (or few hundred) pairs of eyes as I think I've made a mistake in the CustomSetting.ini or BootStrap.ini since its not working as expected for captures. I've customized both INI files and tested several OS deployments (physical machines, virtual machines, & specific models etc) with success suggesting they're setup properly for deployments. But I'm guessing something in there may be contributing to my inability to sysprep & capture the image.So far, all I've done is use MDT2012 to deploy Server 2008 R2 & run Windows Update. Once the TS finished, I manually ran Windows Updates until it was completely patched. Now I want to capture an image of this & use it for deployment. I created a new 'Sysprep & Capture' Task Sequence to capture an image of Server Standard 2008 R2.
- From the machine I'm trying to sysprep I ran cscript \\MDTWDSServer\DeploymentShare$\scripts\LiteTouch.wsf
- The Task Sequence window displays
- I select my 'Capture Image' TS for Server Standard 2008 & click Next
- The next step asks me for the Admin password & click next
- The next step is to begin the process
- If I expand details the deploymenttype is "CUSTOM"
- I'm missing the capture screen
Right now the machine is on VLAN 105 so it should be first executing what's in the [VLAN105] section before the [Default] section.
[Settings] Priority=Init,SetSysSerial,SetSysModel,SysModel,DefaultGateway,Default Properties=DebugEcho,Site,SysSerial,SysModel,DeploymentServer [Init] DebugEcho=True [SetSysSerial] UserExit=SysSerial.vbs SysSerial=#SetSerialAlias()# [SetSysModel] UserExit=SysModel.vbs SysModel=#SetModelAlias()# [X20] 'Specifically for Lenovo ThinkPad X201 JoinWorkgroup=WORKGROUP TaskSequenceID=VANILLA-001 OSDNetworkJoinType=1 OSDWorkgroupName=WORKGROUP [DefaultGateway] 192.172.21.1=BR 192.171.21.1=LD 192.171.22.1=LD 192.171.23.1=LD 192.171.24.1=LD 192.170.21.1=SV 192.169.21.1=SF 192.169.36.1=SF 192.169.37.1=SF 192.169.38.1=SF 192.169.39.1=SF 192.169.40.1=SF 192.165.43.1=LA 192.165.44.1=LA 192.165.45.1=LA 192.167.21.1=DN 192.166.31.1=NY 192.166.33.1=NY 192.166.34.1=NY 192.166.35.1=NY 192.166.36.1=NY 192.168.21.1=VA 192.168.43.1=DC 192.168.44.1=DC 192.168.41.1=DC 192.168.42.1=DC 192.168.39.1=DC 192.168.40.1=DC 192.168.37.1=DC 192.168.38.1=DC 192.168.35.1=DC 192.168.36.1=DC 192.168.33.1=DC 192.168.34.1=DC 192.168.26.1=DC 192.168.23.1=DC 192.168.24.1=DC 192.168.21.1=DC 192.168.22.1=DC 'Special VLANs 192.168.105.1=VLAN105 '192.168.18.1=VLAN18 192.168.18.1=DC [BR] Site=BR DeploymentServer=MDTWDSServer [LD] Site=LD DeploymentServer=MDTWDSServer [SV] Site=SV DeploymentServer=MDTWDSServer [SF] Site=SF DeploymentServer=MDTWDSServer [LA] Site=LA DeploymentServer=MDTWDSServer [DN] Site=DN DeploymentServer=MDTWDSServer [NY] Site=NY DeploymentServer=MDTWDSServer [VA] Site=VA DeploymentServer=MDTWDSServer [DC] Site=DC DeploymentServer=MDTWDSServer [VLAN18] Site=V18 DeploymentServer=MDTWDSServer SkipAdminPassword=NO SkipApplications=NO SkipAppsOnUpgrade=NO SkipBitLocker=NO SkipCapture=NO SkipComputerName=NO SkipComputerBackup=NO SkipDeploymentType=NO SkipDomainMembership=NO SkipLocaleSelection=NO SkipPackageDisplay=NO SkipProductKey=NO SkipSummary=NO SkipTaskSequence=NO SkipTimeZone=NO SkipUserData=NO '-------below orig SkipBDDWelcome=NO SkipWizard=NO SkipFinalSummary=NO [VLAN105] Site=V105 DeploymentServer=MDTWDSServer SkipAdminPassword=NO SkipApplications=NO SkipAppsOnUpgrade=NO SkipBitLocker=NO SkipCapture=NO SkipComputerName=NO SkipComputerBackup=NO SkipDeploymentType=NO SkipDomainMembership=NO SkipLocaleSelection=NO SkipPackageDisplay=NO SkipProductKey=NO SkipSummary=NO SkipTaskSequence=NO SkipTimeZone=NO SkipUserData=NO '-------below orig SkipBDDWelcome=NO SkipWizard=NO SkipFinalSummary=NO [Default] OSInstall=Y SkipBDDWelcome=YES SkipWizard=YES SkipFinalSummary=YES DeploymentType=NEWCOMPUTER AdminPassword=AdminPassword JoinDomain=DOMAIN DomainAdmin=DomainAdminLogin DomainAdminDomain=DOMAIN DomainAdminPassword=DomainAdminPassword MachineObjectOU=OU=STAGING-WIN7,DC=F,DC=Q,DC=D,DC=N KeyboardLocale=en-US 'BuildID=APW7_002 TaskSequenceID=APW7_002 KeyboardLocale=en-US UserLocale=en-US UILanguage=en-US TimeZone=035 TimeZoneName=Eastern Standard Time OSDComputerName=%Site%-%SysModel%-%SysSerial% DeployRoot=\\%DeploymentServer%.f.q.d.n\DeploymentShare$ SLShare=\\%DeploymentServer%.f.q.d.n\deploymentshare$\Logs SLShareDynamicLogging=\\%DeploymentServer%.f.q.d.n\deploymentshare$\Logs EventShare=\\%DeploymentServer%.f.q.d.n\deploymentshare$\Logs\Events EventService=http://%DeploymentServer%.f.q.d.n:9800 _SMSTSOrgName=%Site%@%DefaultGateway% %TaskSequenceID% %DeploymentServer%
Right now the machine is on VLAN 105 and it is executing what's in the [VLAN105] section before the [Default] section. VLAN105 is my test VLAN, and I was trying to create a CS and BootStrap that would give me total flexibility if I ever needed to deploy a one-off image or a specific image, or an image with specific applications or to perform captures etc. The rest of the VLANs will use the default TaskSequence determined either by make/model (like the X201) or the default TS used for normal imaging. Perhaps this is what's messing me up.
Below is the output of running LiteTouch.wsf from the machine in question.
Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Property LogPath is now = C:\MININT\SMSOSD\OSDLOGS Microsoft Deployment Toolkit version: 6.0.2223.0 Property Debug is now = FALSE ZTIUtility!GetAllFixedDrives (False) New ZTIDiskPartition : \\V105-VM-564DD28\root\cimv2:Win32_DiskPartition.DeviceID="Disk #0, Partition #0" \\V105-VM-564DD28\root\cimv2:Win32_LogicalDisk.DeviceID="E:" New ZTIDisk : \\V105-VM-564DD28\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE0" New ZTIDiskPartition : \\V105-VM-564DD28\root\cimv2:Win32_DiskPartition.DeviceID="Disk #0, Partition #1" \\V105-VM-564DD28\root\cimv2:Win32_LogicalDisk.DeviceID="C:" New ZTIDisk : \\V105-VM-564DD28\root\cimv2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE0" ZTIUtility!GetAllFixedDrives = E: C: No task sequence is in progress. Found OS Disk: C: Found FirstPossibleSystemDrive: C: Property SMSTSLocalDataDrive is now = C: Not running within WinPE. Property DeploymentMethod is now = UNC DeploymentMethod = UNC Property DeployRoot is now = \\MDTWDSServer.f.q.d.n\deploymentshare$ Validating connection to \\MDTWDSServer.f.q.d.n\deploymentshare$ Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Found Existing UNC Path Z: = \\MDTWDSServer.f.q.d.n\deploymentshare$ DeployRoot = \\MDTWDSServer.f.q.d.n\deploymentshare$ Property DeployDrive is now = Z: DeployDrive = Z: Property PHASE is now = VALIDATION Property DeploymentType is now = REFRESH Phase = VALIDATION About to run command: wscript.exe "\\MDTWDSServer.f.q.d.n\deploymentshare$\Scripts\ZTIGather.wsf" /inifile:Bootstrap.ini Command completed, return code = 0 Validating connection to \\MDTWDSServer.f.q.d.n\DeploymentShare$ Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Found Existing UNC Path Z: = \\MDTWDSServer.f.q.d.n\DeploymentShare$ About to run command: wscript.exe "\\MDTWDSServer.f.q.d.n\deploymentshare$\Scripts\ZTIGather.wsf" /nolocalonly Command completed, return code = 0 Validating connection to \\MDTWDSServer.f.q.d.n\DeploymentShare$ Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Found Existing UNC Path Z: = \\MDTWDSServer.f.q.d.n\DeploymentShare$ Property TaskSequenceName is now = AP Win7 Ent Patched Property TaskSequenceVersion is now = 1.0 Property TaskSequenceTemplate is now = Client.xml Property OSGUID is now = {bca4213c-5ea0-4e9b-be43-cd8af51efada} Property ImageIndex is now = 1 Property ImageSize is now = 9812 Property ImageFlags is now = ENTERPRISE Property ImageBuild is now = 6.1.7601.17651 Property ImageProcessor is now = x86 Property ImageLanguage001 is now = en-US InstallFromPath: \\MDTWDSServer.f.q.d.n\DeploymentShare$\Operating Systems\Win 7 Ent Patched with Sysprep Files\CAPTURE-001_20120530001 - Copy.wim Property InstallFromPath is now = \\MDTWDSServer.f.q.d.n\deploymentshare$\Operating Systems\Win 7 Ent Patched with Sysprep Files\CAPTURE-001_20120530001 - Copy.wim SourcePath: \\MDTWDSServer.f.q.d.n\DeploymentShare$\Operating Systems\Win 7 Ent Patched with Sysprep Files Property SourcePath is now = \\MDTWDSServer.f.q.d.n\DeploymentShare$\Operating Systems\Win 7 Ent Patched with Sysprep Files Property LTIDirty is now = TRUE About to run command: MSHTA.exe "\\MDTWDSServer.f.q.d.n\DeploymentShare$\Scripts\Wizard.hta" /definition:DeployWiz_Definition_ENU.xml Command completed, return code = 0 Validating connection to \\MDTWDSServer.f.q.d.n\DeploymentShare$ Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Found Existing UNC Path Z: = \\MDTWDSServer.f.q.d.n\DeploymentShare$ Property DeployDrive is now = Z: DeployDrive = Z: Property ResourceRoot is now = \\MDTWDSServer.f.q.d.n\DeploymentShare$ DeploymentType = CUSTOM ResourceRoot = \\MDTWDSServer.f.q.d.n\DeploymentShare$ Property ResourceDrive is now = Z: ResourceDrive = Z: Property _SMSTSPackageName is now = Lite Touch Installation SMS Task Sequencer found at \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64, copying to C:\MININT\Tools\X64 Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\CcmCore.dll to C:\MININT\Tools\X64\CcmCore.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\CcmUtilLib.dll to C:\MININT\Tools\X64\CcmUtilLib.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\Smsboot.exe to C:\MININT\Tools\X64\Smsboot.exe Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\SmsCore.dll to C:\MININT\Tools\X64\SmsCore.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TsCore.dll to C:\MININT\Tools\X64\TsCore.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TSEnv.exe to C:\MININT\Tools\X64\TSEnv.exe Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TsManager.exe to C:\MININT\Tools\X64\TsManager.exe Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TsmBootstrap.exe to C:\MININT\Tools\X64\TsmBootstrap.exe Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TsMessaging.dll to C:\MININT\Tools\X64\TsMessaging.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TsProgressUI.exe to C:\MININT\Tools\X64\TsProgressUI.exe Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\TSResNlc.dll to C:\MININT\Tools\X64\TSResNlc.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\xprslib.dll to C:\MININT\Tools\X64\xprslib.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Tools\X64\00000409\tsres.dll to C:\MININT\Tools\X64\00000409\tsres.dll Copying \\MDTWDSServer.f.q.d.n\DeploymentShare$\Control\CAPTURE-002\TS.XML to C:\MININT\Tools\X64 Copying C:\MININT\SMSOSD\OSDLOGS\VARIABLES.DAT to C:\MININT\Tools\X64\VARIABLES.DAT LTI beginning deployment Validating connection to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\Events Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Event 41016 sent: LTI beginning deployment Event 41016 sent: LTI beginning deployment About to run command: "C:\MININT\Tools\X64\TsmBootstrap.exe" /env:SAStart Property LTIDirty is now = TRUE Command completed, return code = 0 LTI deployment completed successfully Validating connection to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\Events Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. Event 41015 sent: LTI deployment completed successfully Event 41015 sent: LTI deployment completed successfully Property RetVal is now = 0 Validating connection to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs Already connected to server MDTWDSServer.f.q.d.n as that is where this script is running from. TargetOS is the current SystemDrive Copying C:\Users\ADMINI~1\AppData\Local\Temp\SMSTSLog\SMSTS.LOG to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\SMSTS.LOG Copying C:\windows\Debug\Netsetup.log to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\ Copying C:\windows\Panther\setupact.log to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\Panther Copying C:\windows\Panther\setuperr.log to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\Panther Copying C:\windows\Panther\UnattendGC\setupact.log to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\Panther\UnattendGC Copying C:\windows\Panther\UnattendGC\setuperr.log to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\Panther\UnattendGC Copying log C:\MININT\SMSOSD\OSDLOGS\BDD.log contents to \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\BDD.LOG Unable to open \\MDTWDSServer.f.q.d.n\deploymentshare$\Logs\V105-VM-564dd28\BDD.LOG for appending: Permission denied (70) CleanStartItems Complete Unregistering TSCore.dll. About to run command: wscript.exe "\\MDTWDSServer.f.q.d.n\deploymentshare$\Scripts\LTICleanup.wsf"
It completes without error but doesn't sysprep & capture an image. What's interesting is that the log shows the TaskSequenceTemplate as Client.xml, shouldn't it be CaptureOnly.xml? I've pulled the logs from C:\Windows\System32\Temp\DeploymentLogs on the machine and uploaded them here.
I've read throguh Mitch Tulloch's MDT2010 guide [a few times over the past 2 years] and I remembered him saying something interesting about the Sysprep & Capture process. I went back to that particular section of the guide & found what I was looking for. He said...
"Now before you use this new task sequence to sysprep and capture an image of your reference computer, I recommend that you restore the CustomSettings.ini and Bootstrap.ini files for your deployment share to their original values. Specifically, change your CustomSettings.ini file back to this:
[Settings] Priority=Default Properties=MyCustomProperty [Default] OSInstall=Y SkipAppsOnUpgrade=YES SkipCapture=NO SkipAdminPassword=YES SkipProductKey=YES
And then change your BootStrap.ini file back to this:[Settings] Priority=Default [Default] DeployRoot=\\SEA-DC1\DeploymentShare$
I recommend these changes because of my own personal experience trying to get the Sysprep and Capture task sequence template working properly."This is about 2 years old, and I figured (read: Hoped) maybe it was a 2010 bug that's since been fixed in MDT2012. I'm guessing it'll probably work if I do it this way, but I'd prefer to not have to switch INI's each time. Plus, if other folks in IT need to deploy a custom image or capture an image when I'm not around, they'll likely not know what to do & are prone to making a mistake.
But if that's the way it is, then it is what it is! Just seeking advice from the community on how to proceed.
All Replies
-
Wednesday, June 27, 2012 1:29 PM
don't know for sure but i think it is because you have
Skipwizard=YES set in the DEFAULT part of the cs.ini but haven't coded in the backup location.
try it with Skipwizard set to NO.as for the little bit you posted about changing the cs.ini back and forth for capturing it's not always needed if your current cs.ini allows you to capture without problems.
people mainly change it back to the minimum so they minimize the problems that could occur.
i personally use a different DS altogether for my capturing. -
Wednesday, June 27, 2012 5:52 PM
Thanks for the reply Stefan!
In reading several posts, it was clear to me that some settings can be overwritten, and some cannot. I had a tough time figuring out where this was documented & on a whim I looked at the ZTIGather.xml file in the Scripts directory under the DeploymentShare where I found some interesting information.
It seems that the document has been 'splt' by way of comments, into several sections, four sections are of interest to me:
- Properties that can be overwritten (last value wins) and are automatically set by the BDD scripts
- Properties that cannot be overwritten (first value wins)
- Wizard control variables (first value wins)
- UDI Wizard control variables (first value wins)
- Action Properties (commonly defined within Management Console)
Per the file, SkipWizard is one of those 'first value wins' variables/properties [under the Wizard control variables section]. So in theory, once its set in the VLAN105 section, it shouldn't get changed in the Default section. However, that that I am getting the Deployment Wizard tells me its working as expected. (Above, I get the option to choose my TS & set the Administrator password, but not capture etc). I'm happy to set SkipWizard=NO in the Default section just to see what happens, but I'm doubtful it will help.
As for the backup location, my expectation was that the Wizard would prompt for the location since 'SkipComputerBackup' is set to NO; but the default setting for 'ComputerBackupLocation' is AUTO. I would prefer to not default to a hardcoded path & instead prompt just because I may want to save the image elsewhere, like outside of our DFS since won't need to be replicated. But if I can get it to at least capture correctly location is a minor thing. Furthermore, by default, even with the bare minimum or default CS, it does prompt to capture & it prompts for a location.
You're idea of a separate DS for capturing I think is actually quite brilliant IMHO. Maybe I'll go down that route if I have to, but if I should be able to do it from one DS then I'd like to.
So the question remains: Should I be able to do a capture with a [highly] customized CS & BootStrap?
Thanks again for the response.
-
Thursday, June 28, 2012 1:57 PM
I added the following lines to my CS
- BackupShare=\\%DeploymentServer%\DeploymentShare$\Captures
- BackupDir=%OSDComputerName%
- BackupFile=%OSDComputerName%.wim
- ComputerBackupLocation=NETWORK
- DoCapture=YES
It goes through the motions but doesn't capture.
I'm not sure what to do next.
-
Friday, June 29, 2012 3:20 PM
Johan commented in another post on another site about this issue. He said to create a separate DS for Sysprep & Captures.
While it really gets under my skin that one has to create a separate DS for sysprep & capture TS' if it works, it works & life goes on. However, I'm not terribly excited about having duplicate data: Drivers & Images specifically. I thought I could be slick & just create a symlink/junction point to the original Operating Systems directory, but that didn't work.
Is there a way I can tell MDT to look 'here' for OS' & Drivers so I can avoid re-importing everything (Server 2008 the other OS', Drivers etc) that I've already imported?- Marked As Answer by JuliusPIV Thursday, July 05, 2012 3:03 PM
-
Friday, June 29, 2012 3:38 PM
what you can do is link a deployment share with a selection profile so that it only copies over what you want drivers, OS and applications etc.
you can find it under advanced configuration in MDT.
-
Friday, June 29, 2012 4:48 PMMake sure that the account that you are running this under has permissions to the capture folder on the deployment share.
-
Thursday, July 05, 2012 3:03 PM
Thanks Stefan and Brano for your responses.
Stefan: Not sure how to do that but I'll explore that this week as time permits.
Brano: I haven't specifically checked, that, but I'm using a domain admin account for testing purposes which should have rights to everything. Will double check.
For now I'm going to be relying on Johan's solution.

