none
NIC Removed During Sysprep Capture to Deployment Share RRS feed

  • Question

  • I'm using HyperV to sysprep a reference image.  Previously I converted the VHDx to a WIM, but this has problems of its own.  I recently attempted to image from the VM directly to the share by running litetouch.vbs from the VM over the network.  I find that the NIC card is removed on generalize which breaks the connection to the share preventing the WIm from being written.

    I have found suggestions that the unattend XML be modified to prevent drivers from being removed, but this only works if the target system has the same hardware, which it does not.

    I'm using MDT 6.3.8450.1000, ADK 1809.  The WinPE settings call for all drivers to be installed, which some docs indicate should allow network connections via WinPE, but it does not.

    Any suggestions? 

    What is t he best way to sysprep and capture a HyperV VM?

    Monday, July 8, 2019 3:05 PM

All replies

  • I build all my images using MDT in Hyper-V and have zero drivers added. 

    It could be the way you are making your VM. Make sure to use Generation 1 and do not use Dynamic Memory. Set Memory to be 4096MB


    Daniel Vega

    Monday, July 8, 2019 8:17 PM
  • Thanks, I've been using gen 2, ill try gen 1.

    I tried a completely different way - booting to the LiteTouchPE_x64.ISO mounted as a CD/DVD on the Reference VM.  This results in an insufficient space for Win PE copy task, looks like it is trying to write to the DVD.  Any thoughts on how to fix this?

    Tuesday, July 9, 2019 11:15 PM
  • Sysprep will always destroy your third-party drivers, which is removing your NIC.

    As Daniel suggests, you don't want anything as a driver in your reference image that isn't native to Windows (this is true whether it's Hyper-V, VMWare, or Physical) - you should be applying third-party drivers only during the deployment task sequence.

    Also, I'd suggest updating to MDT 8456 if using ADK 1809 to rule out other issues - though I suspect that's not your actual issue here.

    Tuesday, July 9, 2019 11:35 PM
  • Could be dynamic memory, Hyper-V uses that by default. I always boot to the MDT generated boot image to start my builds. Though I have a separate deployment share for make images. It's easier to do that from an automation point of view. It also keeps my production share from being as cluttered. 

    Daniel Vega

    Wednesday, July 10, 2019 1:35 PM
  • Hello,

    You can perform the sysprep and capture actions manually. By booting the reference system in WinPE and run the Capture Command.

    Here's the details which might be helpful for you.

    Dism /Capture-Image /Compress:maximum /ImageFile:<Location>\FileName.wim /CaptureDir:D:\/Name:"FileName"

    Note: Assigning of drive letters to partitions is handled by WinPE when it first boots up.it normally assigns the System Reserved partition a drive letter C: and the OS partition a drive letter D:

    Wednesday, July 10, 2019 4:01 PM
  • To know about the best practice, Advantages to capture an Image in Virtual Machine ,please follow the  Guide link


    • Edited by JiteshKumar Wednesday, July 10, 2019 4:07 PM
    Wednesday, July 10, 2019 4:06 PM
  • Hello,

    You can perform the sysprep and capture actions manually. By booting the reference system in WinPE and run the Capture Command.

    Here's the details which might be helpful for you.

    Dism /Capture-Image /Compress:maximum /ImageFile:<Location>\FileName.wim /CaptureDir:D:\/Name:"FileName"

    Note: Assigning of drive letters to partitions is handled by WinPE when it first boots up.it normally assigns the System Reserved partition a drive letter C: and the OS partition a drive letter D:

    But you can make a single task sequence in MDT that builds and captures your image. It's so much easier to just start the task sequence and then let it run in the background and when it's done your custom image is sitting in the captures folder.

    Daniel Vega

    Wednesday, July 10, 2019 4:14 PM
  • Agreed Daniel.. But the process which I was mentioning, It will be effective when we don't want to be dependent on network connectivity or some issues that prevent us to capture using Tasksequence 
    Wednesday, July 10, 2019 4:25 PM
  • I understand. Though you can still accomplish that using a couple of VMs on a single computer, with the "Admin" deployment share being a VM and the VMs can use a internal or private virtual switch". The more automated you make it the less likely there will be a mistake and the more consistent the process.

    Daniel Vega

    Wednesday, July 10, 2019 4:32 PM
  • Thanks everyone for your responses.  The problem has been fixed using bits of advice from the various responses.

    Here is what worked for me:

    1.  Manually sysprep

    2.  Create capture only task sequence

    3.  Boot from litetouchPE-x64.iso and complete capture to deployment share

    Full automation would be better but this will have to do for now until I can fully understand the sysprep issues in the task sequence.


    Wednesday, July 10, 2019 7:10 PM