After creating the unattend.xml file which includes your customized settings, we need to inject it into the image.
Injecting the unattend.xml into a VHD(X) basically involves mounting the image first.
There are four steps involved to inject the unattend.xml file, as follow:
- Before we inject the unattend.xml file, we should create a mount directory.
From an elevated command prompt, run the following command:
dism /Mount-Image /ImageFile:.\NanoServer.vhdx /Index:1 /MountDir:.\mountdir ...