Introducing the Nano Server Image Builder

Hi there,

Scott Johnson here to talk about the new Nano Server Image Builder tool, my new favorite time-saver. The Nano Server Image Builder helps you create a custom Nano Server image and bootable USB media with the aid of a graphical interface. Based on the inputs you provide, it generates images for deployment and creates reusable PowerShell scripts that allow you to create installations of Nano Server running either Windows Server 2016 Datacenter or Standard editions. The Nano Server Image Builder is now available for download on the Microsoft download center. If you need to download it later you can use this memorable shortcut: https://aka.ms/NanoServerImageBuilder. To run the tool, you must also install the Windows Assessment and Deployment Kit (ADK).

Nano Server is 20 to 25 times smaller than a full version of Windows Server 2016 with desktop experience.  
To make a version of Windows this small, we had to remove some things that were not critical to running server workloads – and one of the things we removed was setup.exe, including the Windows Welcome experience. To setup and configure a Nano Server, we need to leverage Sysprep services in Windows and use an unattended.xml file to automate the installation sequences.

Deploying Headless Servers – A New Challenge!
The Nano Server Image Builder creates VHD, VHDX and .WIM files that can be used to deploy Nano Server in a virtual machine or directly on hardware, even without a display monitor, a.k.a. the “Headless Server”. You will find a /NanoServerImageGenerator folder on the Windows Server 2016 media – it contains new cmdlets, such as New-NanoServerImage, which is supported on Windows 8.1, Windows 10, Windows Server 2012 R2, and Windows Server 2016. This new cmdlet enables you to create a custom Nano Server image using the computer name of your choice and a couple dozen other unique settings.

~

Creating the perfect syntax for these PowerShell cmdlets can be challenging and so this tool was created to simplify these tasks:

1) Graphical UI creation of Nano Server media with dozens of custom settings.
2) Create a USB key to detect the firmware and hardware settings of a server.
3) Creation of a bootable USB key that can be used to deploy Nano Server directly on hardware.
4) Optionally create a bootable ISO file that can be used to deploy from DVD or BMC-connected servers.
5) Create PowerShell commands that can be reused by simply changing the machine name.

The Nano Server Image Builder automates deployment settings:
• Accepting the license agreement terms.
• Choose from VHD, VHDX or WIM formats and an option to create a bootable ISO.
• Select server roles to install.
• Add device drivers to install.
• Set machine name, administrator password, logfile path, and time zone.
• Join a domain by using an existing Active Directory account or a harvested domain-join blob.
• Enable WinRM for communication outside the local subnet.
• Enable Virtual LAN IDs and configure static IP addresses.
• Inject new servicing packages on the fly.
• Add a setupcomplete.cmd or other custom scripts to run after the unattend.xml is processed.
• Enable Emergency Management Services (EMS) for serial port console access.
• Enable development services to enable test signed drivers and unsigned applications, PowerShell default shell.
• Enable debugging over serial, USB, TCP/IP, or IEEE 1394 protocols.
• Create USB media using WinPE that will partition the server and deploy the Nano Server image.

 

Hardware Detection USB Drive
The Nano Server Image Builder can also create a USB drive using WinPE that will detect your existing Nano Server hardware configuration and report the details on-screen and in a log file.

This hardware detection includes:

  1. Network interface index – We use it to target IP address assignments. In the future, we will move to use MAC-address targeting. Occasionally the network interface index will randomly change as Tron battles inner electrons in a race to see which networking card enumerates first.
  2. Boot firmware type – The system creates different partitions depending on your firmware type. Most new servers are UEFI.
  3. System board information – Validate that you are targeting the right server.
  4. Disks and volumes – Choose wisely when selecting a disk partition to format.
  5. Devices without a driver! - List devices that have no driver in the Server Core drivers package. Useful!

 

Hardware Detection Experience: a1 hw2 a3

Screenshot Walkthrough

Two sequences:    Create Nano Server images or bootable USB media :

a4

You’ll need a copy of Windows Server 2016:

a5

Choose your deployment type:

Virtual machine images can be .vhd or .vhdx
Physical machine images can be .vhd, .vhdx or .wim

a6

Accept the License Agreement (Nano Server requires customers have Software Assurance on the device) a0

Create a hardware-detection USB drive to analyze your system:  

a7

See the WinPE screenshots above to see how the USB hardware detection works.

~

Choose the roles you want to run - Nano Server only loads what you are planning to use:

a8

 Add special device drivers to the image if you need them:

a9
Use the USB hardware detection process to see which devices need drivers.   Pro-tip:  Audio drivers are not necessary.

Choose your machine name and password: a23

Join the Active Directory domain:
a11
Enable WinRM, Virtual LAN and set static IP addresses: a12
Use the hardware detection USB drive to figure out which network adapter interface index to target.

~
You are ready to create a basic Nano Server image – or continue to advanced settings: a13

 

 

Update Nano Server to the latest revision using a servicing package: a14
Learn about the servicing options for Nano Server.

~

 

Add your own scripts to the deployment process:

a15

~

Emergency Management Services:
Get out your serial cable and an RS-232-accessible console. If you have no monitor and no networking is working, this might be your only way into the server.
I use putty.exe or my 1998 copy of hyper-terminal. a16

~

Developers like to debug their code using a wide variety of connections:

a17

 ~

Final review of all the settings:

a18

~

Image creation is done, now you can create a bootable USB key:

a19

Pro-tip:  Copy the PowerShell script somewhere to use it directly without using the GUI tool in the future.
Just change the machine name and you can have a new Nano Server image in a matter of minutes.

 

Select your USB drive: a20

 

Select boot firmware type and optionally modify the partition schema:

a21

Now you have a bootable USB drive to deploy and you can optionally create a bootable ISO file using the same binaries: a22

I hope you enjoy the new Nano Server Image Builder, if you have any feature suggestions or error reports, please let us know on the user voice web site.

Cheers,
Scott Johnson
Senior Program Manager
Windows Storage Server
@Supersquatchy

Comments

  • Anonymous
    October 15, 2016
    What about installing the nano servers image on sd cards? Hyper convergence systems, blade servwrs, etc'
    • Anonymous
      October 21, 2016
      SD cards are not currently supported as boot devices under Windows. Microsoft provided for OEM-only support of Hyper-V installation on USB devices (https://technet.microsoft.com/en-us/jj733589(v=ws.11).aspx), and that may be how some SD devices are presented to Windows. So you would need to work with an OEM to get support for SD as Windows bootable devices.Not sure why there is any special need for hyper-converged or blade servers - they should work with this just fine. Of course, your mileage may vary depending upon the capabilities offered by the particular hardware platform, but the blade servers and hyper-converged servers with which I am familiar offer no issues with this.
  • Anonymous
    October 17, 2016
    Hi,Great post.Regards.
  • Anonymous
    October 17, 2016
    I agree with Johan Arwidmark that it's stupid to spend this much time of creating an alternative deployment method instead of just implementing Nano server to MDT. It's like there is NO cooperation within Microsoft at all…..
  • Anonymous
    October 18, 2016
    I'm getting an Exception after selecting "Create" at the "Confirmation" step...System.Windows.Markup.XamlParseException occurredMessage: Exception thrown: 'System.Windows.Markup.XamlParseException' in PresentationFramework.dllAdditional information: Set property 'System.Windows.FrameworkElement.Style' threw an exception.Any ideas?
    • Anonymous
      October 18, 2016
      The comment has been removed
    • Anonymous
      October 19, 2016
      The comment has been removed
    • Anonymous
      October 20, 2016
      The comment has been removed
      • Anonymous
        October 22, 2016
        Hi,We are trying our best to have a repro in our own environment. And would be very helpful if any of you can provide the logs under %temp%\NanoServerImageBuilder\logs to us. You can pack the files and send it to shawang@microsoft.comThanks
      • Anonymous
        October 25, 2016
        I had the same problem that as soon as you click create, the application crashes. I fixed it by changing the Windows to use US regional settings.
        • Anonymous
          November 06, 2016
          Thanks Sakari. That also fixed the issue I had.
          • Anonymous
            November 16, 2016
            Many thanks, this fixed my issu also
    • Anonymous
      October 23, 2016
      Same issue here; and I can't get Visual Studio to give me the call stack.
      • Anonymous
        October 25, 2016
        I have also this error, even though I have tried Windows 2016 and 2012 R2 with numerous input options. Problem Signature 09: System.Windows.Markup.XamlParse. Problem Event Name: CLR20r3.
      • Anonymous
        October 25, 2016
        Now I changed the regional settings to English US, after which the tool doesn't crash anymore. So it seems that another regional setting makes it crash.
  • Anonymous
    October 18, 2016
    The comment has been removed
    • Anonymous
      October 22, 2016
      The comment has been removed
    • Anonymous
      October 25, 2016
      I get the same problem - any fixes yet?
    • Anonymous
      November 02, 2016
      The comment has been removed
    • Anonymous
      November 02, 2016
      The comment has been removed
      • Anonymous
        November 11, 2016
        Why add '" at the beginning and the same '" at the end. That's not working...?Only add ' before and after the text: $copypeCmd = “copype $Script:SupportedArch $Script:WorkingDir” That worked.... until next error: ERROR: Failed to format "M:"; DiskPart errorlevel -2147212269
        • Anonymous
          November 11, 2016
          Manually Diskparted en Formatted the USB drive,It's working now;)
        • Anonymous
          November 24, 2016
          Thanks! Adding the ' to described lines worked for me.
    • Anonymous
      November 04, 2016
      Hi Guys,Not been able to fix it on my W10 notebook. Installed the Nano Server Image Builder on my 2012R2 server and that worked without any problem...
  • Anonymous
    October 19, 2016
    I get error "cannot load packages from the wim file located .wim. Check the media path and try again" during the packages selection screen. I can see that Nanoserver.wim is there in the path but unable to load the packages. Any help?
    • Anonymous
      October 22, 2016
      Hi Ram,Would you please run the tool to have a repro and send the logs at the following locations to shawang@microsoft.com? Maybe I can figure out what's the problem.%temp%\NanoServerImageBuilder\logs %SystemRoot%\logs\dism\dism.log%SystemRoot%\logs\cbs\cbs.logThanks
    • Anonymous
      October 26, 2016
      I'm getting that same error in the GUI. I'm in the process of trying again on a different computer to see if that makes a difference.
    • Anonymous
      October 27, 2016
      I am getting the exact same error.
      • Anonymous
        October 28, 2016
        The comment has been removed
        • Anonymous
          October 31, 2016
          The comment has been removed
          • Anonymous
            November 01, 2016
            I'm having the exact same issue. My powershell policy is already set to unrestricted (by group policy), so I'm not sure why this is failing trying to set it to what it's already set to.
          • Anonymous
            November 01, 2016
            The comment has been removed
          • Anonymous
            April 19, 2017
            The comment has been removed
        • Anonymous
          May 24, 2017
          Same Set-ExecutionPolicy error here. I voted too there at uservoice. They must sign the script an not try to decrease a security level.
  • Anonymous
    October 19, 2016
    The comment has been removed
  • Anonymous
    October 20, 2016
    Great Job and great tool !!!I want to report an issue that I found. Scenario: Windows Server 2016 (10.1493.231) Datacenter with Desktop. Installed ADK for Windows 10 (1611): Deploy tools and WinPE. And NanoServerBuilder tools... until here everything works fine. Create new image, select physical machine, select packages, etc. While creating image, get error compute package not found into C:\Users\USER\AppData\Local\Temp. Closing wizard and trying over get another error imagenanoserver.wim not found on same directory, Close and trying over again, it will finish fine. So, Wizard does not copy needed files to %TEMPUSER% directory. Thanks for the tool, will be useful for many people. Well Done !!!
  • Anonymous
    October 21, 2016
    Nice tool, definitely easier than just using PowerShell. I've just deployed a few images and noticed that even though I choose Manual IP (and entered the various settings) the image uses DHCP. I've replicated this test a few times with the same result each time. I'm just using the 'simple' setup option.
    • Anonymous
      October 21, 2016
      Same problem here, IP static not working properly. It sets DHCP IP.
      • Anonymous
        October 22, 2016
        A possible issue is the mismatch of the network interface ID specified in the tool and the actual value on the server. Could you try to enumerate the server NICs with Get-NetAdapter and check if the "ifIndex" value is the one you chose on UI?Also there should exist a log file at %SystemRoot%\setup\scripts\setupcomplete.log of your Nano server which may contain the errors if the static IP configuration emitted errors.ThanksShayu
        • Anonymous
          December 01, 2016
          The comment has been removed
    • Anonymous
      October 27, 2016
      Identical issue here!
    • Anonymous
      October 27, 2016
      I'm experiencing exactly the same!
  • Anonymous
    October 23, 2016
    Great Tool! But please consider the ability to directly create a bootable .iso file or a .wim file (for WDS). This would be much more useful than creating a UBS Stick. Today most of the servers get installed remote over BMC (iLO, iDRAC etc.) and not by plugging in a physical UBS Stick directly to the physical host. Also in virtualized environments, the need of a USB Stick is an unnecessary hurdle. For example, when you are running the Nano Server Image Builder on a virtualized management server you cannot simple plugin in a USB Stick.
  • Anonymous
    October 23, 2016
    Great Application! Very useful!Only problem for me is that on Windows 10, I get a Message With "nanoserverimagebuilder has stopped running" whenever I click "create image"
  • Anonymous
    October 27, 2016
    Had problems creating the USB boot. 2 things helped me.1. diskpart - select disk - attr disk clear readonly2. Set-executionpolicy unrestrictedAfter that I created a new wim file and created the USB stick without errors. After that I was able to create the ISO file
  • Anonymous
    October 31, 2016
    Hey Scott!Great Tool, this makes the first deployments alot easier.It would be nice if you could add the functionality to add further Partitions in the GUI e.g. Partition for Applications or VMs.Regards,Mike
  • Anonymous
    November 02, 2016
    Beautyful GUI - powershell is awesome... But the GUI...- just love it :-)
  • Anonymous
    November 10, 2016
    The VHD/VHDX Size Parameter is incorrectly transfered in the Powershell Commandlet. I specified a size of 0.8 GB and i get 8 GB.
  • Anonymous
    November 14, 2016
    VHDX create: OK, USB: OK, DVD: OKBut when starting the server with USB or DVD: vhd boot host volume not enough space
    • Anonymous
      November 26, 2016
      Hi Rob,One possible reason for this is the partition size becoming too small after applying the VHD and boot. What value do you set on the max VHD size textbox and the primary partition size to install the OS? You can try to configure the partition size a little larger to accommodate the VHD.ThanksShayu
  • Anonymous
    December 01, 2016
    Hi,I've been trying to use this Image Builder and I never manage to get the fixed IP address I set.Adding the latest Windows10.0-KB3200970-x64.cab to the image when I build it or not doesn't change anything. It just doesn't allow me to specify a fixed IP address.What should I check for this ?Thanks
  • Anonymous
    December 10, 2016
    HelloThe New-NanoServerImage has a param "-SetupUI", but cannot find any information how to use it.Could you please give some tips.Thx.
  • Anonymous
    January 03, 2017
    Excellent job! Only one Comment.Please add this to future releases of Server 2016 on the media :)Thumbs up! What Nano server needed!SeanThe Energized Tech
  • Anonymous
    January 31, 2017
    Guyes Please help me I am trying in the last 2 days the problem that I am facing is it's not detecting my drivers can you please suggest any solution to help me what to do.??
  • Anonymous
    March 03, 2017
    hi Scott , it's amazing tool !
  • Anonymous
    March 20, 2017
    Might I suggested adding a slider option for the size of the partition the VHD will be mounted on, where the smallest size is the size the user entered for the VHD itself. Or at least implement a warning that pops up when the user selected a partition size smaller than the size of the VHD. I made the unfortunate error of creating a partition that was smaller than the size of my VHD, admittedly completely my own fault, which resulted in a bluescreen on my host. The error is pretty easy to resolve once you know what went wrong, but it would be nice to keep users, as myself, from making the error in the first place.
    • Anonymous
      March 21, 2017
      Thank you for your feedback. I will bring this to the attention of the Engineering team.