In today’s Ask the Admin, I’ll show you how to customize Nano Server images using a free tool from Microsoft.
Nano Server is a headless install option for Windows Server 2016 that’s designed for cloud apps, microservices and DevOps environments. Windows Containers, when managed using Docker, allow developers to deploy apps to servers in seconds, providing businesses with a high-velocity development platform for creating more exciting products and faster innovation. For more information about Nano Server, see Thoughts on Windows Nano Server on the Petri IT Knowledgebase.
In the instructions below, I’m going to create a Nano Server image for a Hyper-V virtual machine (VM), using the Image Builder tool on Windows 10.
- Log in to Windows 10.
- Download the Windows Assessment and Deployment Kit (Windows ADK) for Windows 10, version 1607, and install it by running adksetup.exe.
- Download and run the Nano Server Image Builder (1.0.78) MSI installer file.
- Download the Windows Server 2016 ISO here.
- Once the ISO file has been downloaded, right-click it in File Explorer (WIN+E), and select Mount from the menu.
- Type nano in the search bar at the bottom of the desktop taskbar, and select Nano Server Image Builder from the list of search results.
- On the Create a new image or bootable USB page, click Create a new Nano Server Image.
- Click Next on the Before you begin screen.
- On the Create a Nano Server image screen, click Browse and then the drive where the Windows Server ISO was mounted. Click Next.
- On the Review license terms screen, check I have read and agree to the terms of the Microsoft Software License Agreement provided above, and click Next.
- On the Select deployment type screen, check Virtual machine image, and then click Browse.
- In the Save As dialog box, click This PC and then Local Disk (C:).
- Click New folder and name it NanoServer.
- Double-click the NanoServer folder, type nano.vhd into the File name box, and click Save.
- Click Next on the Select deployment type screen.
Customize Nano Server
Let’s select the installation packages and networking options.
- On the Basic installation screen, click Next.
- On the Select optional packages screen, select either Datacenter or Standard from the drop-down menu, depending on the edition of Nano Server that you’d like to install.
- Now check the packages you’d like to include in the image under Optional packages. Click Next when you’re done.
- If you need to load specific drivers for a VM or physical server, click Add on the Add drivers screen and locate the necessary .inf driver files. Because I’m using a Hyper-V VM, I don’t need any specific drivers. Click Next.
- On the Destination machine information screen, type a computer name in the first empty box, or leave it blank if you plan to join the server to a domain using a domain-join blob.
- Type and confirm an administrator password.
- Change the time zone if necessary using the drop-down menu, and click Next to continue.
- We’re not going to join the server to a domain, so click Next on the Join domain screen. Here, you could specify a domain-join blob if you wanted to join Nano to an Active Directory domain.
For more information on creating domain-join blobs and joining Nano to a domain, see Join Windows Server 2016 Nano to a Domain on Petri.
- On the Set network screen, you can probably accept the default settings by clicking Next. But if needed, you can assign a static IP address and enable WinRM and remote PowerShell connections from subnets other than the one where the server will be located.
Advanced Settings configuration allows you to set Emergency Management Services (EMS) options and debugging methods. Also, you can provide servicing packages to install Nano Server updates, and embed files or scripts that can be run when setup completes.
- On the Select next step screen, click Create basic Nano Server image.
- On the Review all settings screen, click Create.
Note that a PowerShell command is displayed at the bottom of the Create Nano image screen. The New-NanoServerImage cmdlet can be used in the future to create Nano Server images without running the Image Builder tool GUI.
New-NanoServerImage -MediaPath 'D:\' -Edition 'Datacenter' -DeploymentType Guest -TargetPath 'C:\NanoServer\nano.vhd' -MaxSize 8589934592 -SetupUI ('NanoServer.DNS') -ComputerName 'NANO1' -SetupCompleteCommand ('tzutil.exe /s "Pacific Standard Time"') -LogPath 'C:\Users\Administrator.AD\AppData\Local\Temp\2\NanoServerImageBuilder\Logs\2016-12-05 03-40'
- Once the image has been created, click Close.
You’ll find the .VHD file for the Nano Server in the folder that you specified on the Select deployment type screen in the steps above. The image file can now be used to create a VM in Hyper-V or other virtualization solution that supports the .VHD file format.
For more information on creating a VM in Hyper-V, see Windows 8 Client Hyper-V : Create a Virtual Machine Based on an Exisiting VHD File on Petri.
In this article, I showed you how to customize a Nano Server image using the Nano Server Image Builder tool from Microsoft.