Windows MDT Capture of Windows 11 VM fails (disk partitioning issue?)

Gary Mansell 136 Reputation points
2023-08-16T08:53:33.8933333+00:00

I have a Win11 "Gold" image VM (which was originally created in Azure) that I have downloaded to on-prem Hyper-V, and I am now trying to capture using a standard Win11 System Prep Task Sequence, but it fails every time at the "Apply Windows PE" task:

User's image

It seems to fail (exception) at this point in the LTIApply.wsf script (as the "Boot Drive not found, attempting recovery option (Win8+Sysprep scenario)..." message is the last one in the bdd.log before the exception):

User's image

Which seems to be when it is trying to find the boot drive (is this the hidden EFI partition, or the Windows partition)?

Here is the disk partitioning layout of the VM - can you see any reasons why it should crash at this point?

User's image

Also, what is it trying to do at this point in the Capture sequence? As far as I can make out it is trying to find the Recovery partition so that it can extract the MDT WinPE.WIM into the Recovery partition, before rebooting into it and then doing the Dism capture of the image to the Deployment Share - is this correct?

Windows for business | Windows Client for IT Pros | Devices and deployment | Set up, install, or upgrade
{count} votes

3 answers

Sort by: Most helpful
  1. Gary Mansell 136 Reputation points
    2023-08-30T15:52:55.59+00:00

    In the end, I had to manually mount the OS drive onto another VM and manually capture the image using DISM to a system.wim file - which I could then import into MDT

    1 person found this answer helpful.
    0 comments No comments

  2. AllenLiu-MSFT 49,316 Reputation points Microsoft External Staff
    2023-08-17T02:57:20.72+00:00

    Hi, @Gary Mansell

    Thank you for posting in Microsoft Q&A forum.

    Based on the provided context, the issue seems to be related to the LTIApply.wsf script failing to find the boot folder on the system partition, which causes the Sysprep and Capture task sequence to fail. The disk partitioning layout seems to be correct, so the issue might be related to the script failing to find the hidden EFI partition.

    You may try to edit the LTIApply.wsf script to check for the existence of the boot folder on the system partition before running the takeown.exe command to change ownership on the folder.

    https://learn.microsoft.com/en-us/troubleshoot/windows-client/deployment/sysprep-capture-task-sequence-fails


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Add comment".


  3. Gary Mansell 136 Reputation points
    2023-08-24T07:20:37.1866667+00:00

    Still really keen to get some help on this... does anyone have any other suggestions they could help me with?

    I can confirm that I can both deploy and capture other Win10 and Win11 images to/from my Hyper-V environment using my MDT System. It just seems to be an issue with this Win11 master image VM (that originated from Azure).

    In my experimenting, I did come across a problem trying to deploy to a Hyper-V VM with vTPM enabled in Hyper-V, but I don't have this enabled in the problem VM now (I did before as it had v-TPM enabled in Azure). I don't think that this, or Secure Boot can be the issue - as other VMs deploy and capture OK with these same settings.

    As AllenLiu-MSFT seems to suggest, it is failing trying to find the boot partition (I think, to install Win-PE into - is this correct)? So, are there labels, or flags, attribs etc that need to be set on the hidden EFI partition, maybe? Or, are there folders/files that the LTIApply script is looking for that are not there?

    Am a bit stuck, as need to use the same Master image in Azure and on-prem and need to find a way to exchange back and forth. I don't want to have to try and maintain two identical images manually (one in Azure and one on-prem) - this would be a nightmare as my images are very complex.

    Any help, ideas (or even suggestions as to what I can try next) would be appreciated.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.