I've been using MDT for a while to deploy various OS by usb media. Recently, I started getting this working on UEFI - one wim was > 4GB so enabled split wim & that's been working fine.
However, I found that when running a TS (using a differnet wim which isn't split and is <4GB in size) it fails during deployment, digging in the logs showed that it was looking for a .swm file. So, I figure that turning splitwim on is a single hit
- it affects all wims on that deployment.
I then realised I was on Update 1, so yesterday updated to Update 2.
Since then I've been unable to update my media.
This fails with:
Starting MDT Media Update
Opened the media deployment share.
System.Management.Automation.CmdletInvocationException: Cannot create a file when that file already exists.
---> System.IO.IOException: Cannot create a file when that file already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.Move(String sourceFileName, String destFileName)
at Microsoft.BDD.PSSnapIn.GenerateMDTMedia.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
--- End of inner exception stack trace ---
at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
at System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper()
at System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc()
Going with the "cannot when already exists", I've cleared out the temp folder, the contents of the destination offline media folders and so on, but it still happens. I've check dism.log - this is splitting the wim fine, and it copies the
split wim into the destination fine. Checking with procmon suggests that it was scanning the drivers folder, so I've stripped all of them out, stripped out the applications folder too (and the packages).
Still happening. Tried via PS, same issues (obviously), with the following errors:
VERBOSE: Starting MDT Media Update
VERBOSE: Opened the media deployment share.
Update-MDTMedia : Cannot create a file when that file already exists.
At C:\Users\ashg\AppData\Local\Temp\GenerateMedia.ps1:3 char:1
+ Update-MDTMedia -path "DS001:\Media\MEDIA001" -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-MDTMedia], IOException
+ FullyQualifiedErrorId : System.IO.IOException,Microsoft.BDD.PSSnapIn.Gen
erateMDTMedia
I can't see where I can get any more logging out of the cmdlet - it's already running with verbose & am going round and round in circles now. I'm on the latest ADK too.
I've run the deployment workbench with /debug, and it's spitting back
12:57:36 : splitWimPath after Trimming: C:\MDTDeploymentShare\Operating Systems\2012R2_nov15\2012R2_nov15.swm
13:03:38 : Saved temp path for wim to be copied finally: C:\Users\ashg\AppData\Local\Temp\b90d68e3-a5e8-41dc-b20c-7298b887c40b
:38 : temp path for wim to be copied : C:\Users\ashg\AppData\Local\Temp\b90d68e3-a5e8-41dc-b20c-7298b887c40b\2012R2_nov15.wim
:38 : temp path for wim to be copied : C:\Users\ashg\AppData\Local\Temp\b90d68e3-a5e8-41dc-b20c-7298b887c40b\2012R2_nov15.wim
:38 : temp path for wim to be copied : C:\Users\ashg\AppData\Local\Temp\b90d68e3-a5e8-41dc-b20c-7298b887c40b\2012R2_nov15.wim
--> System.IO.IOException: Cannot create a file when that file already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
System.IO.File.Move(String sourceFileName, S
So by the looks of it, it's realised that it needs to split the wim, it copies the wim to my %temp%, splits the original, and then tries to move it back, but cannot.
I have already tried just dropping the .swm files into the deployment workbench, but it then refuses to build the offline media at all.
Argh! Any clues anyone, or is this a bug?