O'Reilly logo

Getting Started with Nano Server by Charbel Nemnom

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Injecting unattend.xml into VHD(X)

After creating the unattend.xml file which includes your customized settings, we need to inject it into the image.

To create a VHD(X) image, please refer to the Building and customizing a Nano Server image Using Windows PowerShell and Building and customizing a Nano Server image using Nano Server Image Builder sections covered earlier.

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:

  1. 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required