When MDT Starts Breaking Bad

imageYes, I’ll admit it. I just started watching Breaking Bad. You know, that show where the dad from Malcolm in the Middle is a chemistry teacher that is diagnosed with lung cancer, and then turns to making meth so he can secure his family’s finances. The show is on its fifth and final season, but I just started watching it. I kept hearing how this was a great show, and I’m nuts for not watching it. It’s true, Breaking Bad is a good show, but I still prefer The Walking Dead.

In the show Walter (Malcolm’s Dad), had the best intentions. However due to unforeseen circumstances he turns bad.  MDT (Microsoft Deployment Toolkit) is the same.  All MDT wanted to do for you is deploy great images.  But due to unforeseen circumstances, it turns bad.  Bad Task Sequences, wrong drivers, wrong applications switches, scripts (Scripts! don’t get me started on scripts) are just a small number of things that could go bad. Instead of allowing your MDT Server to start selling meth, maybe theres a different way of fixing the problem. I would suggest checking the log files.

Locations of MDT log files:

Your logs will be in different locations depending on when the MDT Task fails. If the deployment fails before a partition has been created, you will find the log files in:

X:\MININT\SMSOSD\OSDLOGS

If your deployment fails after the partition has been created, you will find the log files in:

C:\MININT\SMSOSD\OSDLOGS

If your deployment finishes you will find the log files in:

C:\Windows\Temp\DeploymentLogs

MDT Log files:

During a deployment, each MDT script automatically creates a log. The name of the log file matches the name of the script that ran.  For example, the script “ZTIDiskpart.wsf” will create a log file called “ZTIDiskpart.log”.

Okay, but now you’re saying “That’s great Brandon, but isn’t there a major log file in MDT that contains all the information I would need?”  You said that right?  YES, yes there is!  The log you’re looking for is called the BDD.log file. When a script runs, instead of just creating its own log, the script will also write to the BDD.log file.

Another key log is the SMSTS.log file. This log is created by the Task Sequencer, and logs all the Task Sequencer transactions. Depending on the deployment scenario, it may reside in:

%TEMP%

%WINDIR%\System32\ccm\logs

C:\_SMSTaskSequence, or C:\SMSTSLog.

Server Side Logging:

I sure do love Server Side Logging.  As you know, I’m a busy man. (Breaking Bad isn’t going to watch itself.) Instead of wasting my time searching for MDT logs on the client OS, I just copying all of them up to the MDT Server.  The log doesn’t take up much space, and this will also provide a record of all your deployments.  If you want to enable Server Side Logging you have two options.

  1. You can add the “SLShare” property to your customsettings.ini file.  Adding the “SLShare” property will allow the task sequence to copy all the log files to a folder on your MDT server at the end of the setup.
  2. You can add the “SLShareDynamicLogging” property to your customsettings.ini file.  Adding the “SLShareDynamicLogging” will enable real time logging of your task sequence to your MDT Server.  This is very helpful when troubleshooting.

I always recommend using the variable %ComputerName% when setting up your path. This insures you are looking at the correct log files when troubleshooting.

Example: CustomSettings.ini:


;Logging
SLShare=\\MDT2012\DeploymentShare$\Logs
SLShareDynamicLogging =\\MDT2012\DeploymentShare$\Logs\%ComputerName%

Windows Setup Logs:

Last but not least, if your Deployment starts acting bad during the Windows Setup phase, you will have to turn to the Windows Setup log files instead.  Like the MDT log files, these will be in different locations depending on when the deployment failed.

If the deployment fails before a partition has been created, you will find the log files in:

$windows.~bt\Sources\Panther

If your deployment finishes you will find the log files in:

C:\Windows\Panther

  • Setupact.log – The main file you will want to look at if you have installation failures. This file is located at: “C:\Windows\Panther\Setupact.log”.
  • Setupapi.dev.log – Look at this log file when your investigating failed driver installations. This file is located at: “C:\Windows\Inf\Setupapi.dev.log.  NOTE: If you’re deploying Windows XP, the file is called “Setupapi.log”. By the way, if you are deploying Windows XP… STOP IT!
  • Netsetup.log – This file is useful when troubleshooting domain join issues. The file is located at: “C:\Windows\Debug\Netsetup.log

Viewing Log files:

If you’re still using Notepad to view your log files, I feel sorry for you. Instead download Trace32 from the System Center Configuration Manager 2007 Toolkit.  It’s free, and it makes reading your logs a lot easier. If you want the latest version of the tool it’s called CM Trace, download it here.

As you can see, MDT logs a ton of great information.  Your job is to use that information when your server turns bad, and get it back on track for deploying images.  Meth or faulty drivers, it doesn’t matter.  They both stink, and you don’t want either of them around.

4 Comments. Leave new

Maksym Vorchukov
February 11, 2015 5:45 am

Hi, Brandon.
Thanks for the great post. All clearly understand. Have a nice day.

Reply

Unfortunately, I implemented this solution but it uses the temporary computer name instead of the correctly applied name. For example, it is called MININT…..

Any help would be great.

Reply

[…] It is also possible to enable Server Side logging and automate MDT to copy all logs for each deployment. Brandon Lawson has a good example of how to accomplish this in his post: When MDT Starts Breaking Bad […]

Reply

Leave a Reply to Troubleshoot MDT Deployments with log files - Tech Thoughts Cancel reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.

Menu