MDT 2013: Deploy a bootable Windows PE VHD with custom task sequence leaves dirty environment RRS feed

  • Question

  • Hello guys,

    we want to deploy a Windows PE VHD to an empty machine and run our deployment through that VHD, using MDT 2013.
    If we deploy that VHD through my custom scripts and a custom task sequence it works fine, the first Windows7 VHD deployment using the Windows PE VHD works fine too, but if we try to deploy another Windows 7 VHD to the machine, it returns a dirty environment.

    Here are the steps I took:
    First I made a Windows PE VHD from a WIM file.
    Using a custom task sequence (I disabled the "Install Application" step) in which I run certain scripts we successfully deploy the VHD to the empty machine.

    The first script cleans the disk, creates a primary partition formats the partition, assigns letter C to it and sets it as active.
    I then copy the VHD file from a network share to the c: partition using another script. After that I attach the VHD and assign the letter V to it. Set "bcdboot v:\windows /s c:" so we can boot from the VHD. After that I detach the VHD again and the task sequence is finished. Note that I only use my own scripts to do that, without using any other steps.

    To deploy the VHD we boot from a WINPE DVD and select the task sequence to deploy the WINPE VHD, it runs without returning any errors. Upon clicking "finish" the PC reboots and successfully enters the Windows PE routine from the now bootable VHD.
    I select a basic "Deploy to Client VHD" Task sequence with a Windows7 WIM file to deploy the OS VHD. This works without problems, I can boot into that OS and everything works. But if I try to deploy another Windows7 VHD to the same machine using another "Deploy to Client VHD" Task sequence, it says it found an ongoing Deployment and asks whether I want to skip it or not (the Dirty Environment error message)

    I have checked if the MININT and _SMSTS folders get deleted and they do get removed after the Windows PE VHD task sequence, the only thing that remains on the PC are the logs. I already checked, if it is the Win7 VHDs that causes the problem, negative. I tried to have the "post apply" Task sequence step added to the WinPE VHD task sequence, didn`t help either.

    EDIT: If I try to use the Client Deploy to VHD task sequence to deploy the WINPE VHD it just keeps rebooting into WINPE, loads the "Microsoft solution accelerators screen and then reboots again. I don`t know what causes that problem either.

    I am really desperate right now, can someone help me to solve that problem?

    Best regards,

    • Edited by daniel bu Thursday, January 22, 2015 1:00 PM edited paragraph
    Thursday, January 22, 2015 12:42 PM

All replies

  • Can you post your MDT logs to something like Onedrive?

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, January 23, 2015 1:06 AM
  • Hi Keith,

    thanks for your answer!

    and sorry for my late-ish reply :)

    Can you try this link? It`s the bdd.log taken after the deployment of the WINPE vhd:


    alternativley I can upload it to pastebin

    Tuesday, January 27, 2015 3:03 PM
  • Hi again,

    sadly I still haven`t found out where the Problem is located.

    I went through the logs and noticed that the last entry in the bdd.log says:

    Cleaning up TOOLS, SCRIPTS, and PACKAGES directories.

    shouldn`t it return a successful after it cleaned up?

    I also took a look at the filesystem after the deployment displays the "finish-window" (after which the lti-cleanup is executed, by pressing f8 and accessing the CMD) and the _SmsTaskSequence and minint folders were removed successfully.

    So there should be no reason to return a dirty environment.

    The same goes for the successful deployment of the first Windows7VHD.

    Still desperate to get some help!

    (can you even access the bdd.log in my onedrive?)



    • Edited by daniel bu Tuesday, February 3, 2015 10:13 AM
    Tuesday, February 3, 2015 10:12 AM
  • I tried to access the link you provided, but was unsuccessful.

    As far as making a VHD for cloning, have you considered adding the "Litetouch OEM" Task Sequence, then creating the ISO.  From there on the Virtual Machine, boot it with the ISO, Select the "LiteTouch OEM", let it "Pre-Stage" the Hard Drive.

    Once that is done, then you could clone/copy the VHD and use it for deploying new Virtual Systems.  When they first boot, they will run the entire process from the hard drive to the hard drive.  Just a thought.  :)

    Thursday, February 5, 2015 4:57 AM
  • I am unable to access the onedrive account either.

    Putting a winpe boot.wim file *within*  a VHD seems overly complex to me.

    Additionally, multi-boot VHD is an unsupported scenario within MDT, sorry.

    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    • Marked as answer by Keith GarnerMVP Tuesday, February 10, 2015 7:27 AM
    • Unmarked as answer by daniel bu Tuesday, February 10, 2015 9:43 AM
    Tuesday, February 10, 2015 7:27 AM
  • Hi,

    thanks for your answer.
    If I understood correctly you might have misunderstood my first question, we don't actually use the same VHD but use different VHDs with different versions of Windows on them, thats why I try to deploy them in different task sequences.

    Tuesday, February 10, 2015 9:55 AM
  • Hi Keith!

    Thanks for your efforts, here is the new (and working) link: 

    http://1drv.ms/1LP5nKa (BDD.log after the WINPE VHD is deployed)

    It is not supported by default, thats why we try to work around that, by deploying the VHDs to the HDD and then adjusting the BCD entry accordingly, depending on the Windows Installation we want to boot.

    The weird thing is: both the _SMSTasksequence and MININT Folders get removed after the WINPEVHD is deployed and after the WIN7VHD is deployed aswell. 

    Tuesday, February 10, 2015 9:59 AM
  • Sorry, but I figured that you were trying to boot to multiple VHD files. Not supported.

    This was never designed to work in MDT.

    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Tuesday, February 10, 2015 9:24 PM
  • Is there a way to disable the dirty environment. i.e. fool the MDT to think the environment is clean?

    I think of somthing like, setting a flag somewhere at the end of the TaskSequence that installs the first win7 VHD?

    I am more than grateful for your interest in my question!


    Tuesday, February 24, 2015 11:58 AM