I'm afraid I'm stumped and really could use some help.
I'm attempting to build a Windows 11 Enterprise reference image in a Hyper-V virtual machine and "capture" a .wim image of that to be used for deployment in our environment. (It's the capture part that isn't working.)
I've done this many dozens of times with Windows 10, but Windows 11 isn't working.
- I create a VM in Hyper-V, but for Windows 11 Enterprise requires you to use a "Generation 2" type of VM, with 'Secure Boot' and 'TPM' and at least '2' CPU threads assigned, which I've never used before. I've always only ever used Generation 1 VM's before when building and capturing Windows 10 images. (Is this part of the issue?)
- I install the Windows 11 Enterprise, software, etc., make some custom settings in the OS, etc.
- I sysprep and finalize/shutdown Windows.
- At this point I assign a WinPE bootable ISO to the 'DVD' drive in the VM. This WinPE (ISO) boot disk is created in Microsoft Deployment Toolkit (MDT) and runs a simple Task Sequence that uses the DISM tool to "capture" a .wim image file of the target OS.
- It gets to the step of "capturing" the image, but simply exits without actually doing anything.
FYI - This same exact WinPE (ISO) boot disk & Task Sequence to capture an image of the Hyper-V virtual machine works perfectly fine to capture .wim image files of my Windows 10 VM's in Hyper-V. (But these are all "generation 1" style of VM's.)
It acts like it can't find any OS to capture.
In the past with Windows 10, if I boot my VM with WinPE and I open a Command Prompt, there is always a disk drive of "C:" available that is the Windows Operating System drive that I want to capture.
But when I boot the Windows 11 VM the same way and open a Command Prompt, there are NO drive letters attached to the OS. (I've checked all 26 drive letters!) So of course DISM has no way of capturing anything because there is no drive letter to assign to the "/capturedir" parameter of DISM, (i.e. - **/capturedir:C:**). Thus, DISM can't capture an image because WinPE doesn't see the OS drive letter!
I don't understand what is causing this issue or how to overcome it to capture an image of my Windows 11 VM. I've tried changing some settings in the VM prior to booting into WinPE to capture, but nothing allows it to see the target OS drive that I want to capture.
How on earth do I install Windows 11 into a Hyper-VM and then 'capture' it as a .wim image file? Is there some other way to install Windows 11 in a Hyper-V virtual machine? (It's pretty straight forward with not that many options available and it refuses to install unless I use a generation 2 VM.)
I have no trouble with installing and capturing Windows 10 images with a generation 1 VM in Hyper-V. It has always just worked. But with Windows 11, I can't find a way to actually capture a .wim image of the VM.
Any help would greatly be appreciated.
Thank you.