Install Nano Server 2016 – Hyper-V host

In this post series I will guide you in our journey of creating a Nano Server 2016 Hyper-V host on a bare metal machine. We will meet some friendly wizards, annoying driver pitfalls, smooth powershell configuration and to top it all of it will all end well! Looks like we have our self a true fairy tail story…

This chapter: The journey begins, we start installing our new server!

nano-server-smaller

Post series:

  1. Install Nano Server 2016 – Hyper-V host (this post)
  2. Manage Nano Server 2016 – Hyper-V host
  3. Some super handy Nano Server 2016 trick’s

Prerequisite’s

  • We have a fully working windows 10 client.
  • We have a separate server we can use (hence the bare metal)
  • We have a USB key we can format

Nano Server 2016: Prepare installation USB drive on Windows 10

Install: NanoServerImageBuilder.msi
Run: “Nano Server Image Builder” (will download adksetup.msi)
Install: adksetup.msi

We now run “Nano Server Image Builder” again and follow the wizard to “Create a new Nano Server Image”. If all goes well and the wizard finalizes successfully you can skip the next two parts.

We need to select Hyper-V in the packages section.
We need to select Hyper-V in the packages section.

Unfortunately in my case I was stuck with an onboard Intel(R) 82579V network interface that isn’t compatible with Nano Server 2016.
So needed to go on a little D-Tour…

Make a Nano Server 2016 compatible Intel(R) 82579V driver

  • Download the latest Windows 10 (64 bit) NIC drivers from the Intel website.
  • Extract the folder PRO1000\Winx64\NDIS65 (with 7zip)
  • Edit the driver inf file e1c63x64.inf
  • In the [ControlFlags] section delete the 3 lines
  • Select and copy the four %E1503NC lines
  • Paste the 4 lines in the [Intel.NTamd64.10.0] section below the %E1502NC lines

    Comparison of changes made to make the Intel 82579V work as a Windows Nano 2016 Server driver
    Comparison of changes made to make the Intel 82579V work as a Windows Nano 2016 Server driver

Allow Nano Server to install unsigned driver

Due to the manual editing of the driver files the driver lost is original signing. This will brake our Nano Server installation.

Remedy one: enable “Support for development scenarios”

We can just run “Nano Server Image Builder” again and follow the wizard to “Create a new Nano Server Image”.  All we have to do is enable “Support for development scenarios” in the advanced configuration section.
Side-effect of this is that it will disable the “Recovery Console” and enable a whole bunch of debugging stuff we don’t need.

We can enable the “Support for development scenarios” feature to allow installation of unsigned drivers

Remedy two: tweak “NanoServerImageGenerator.psm1”

To retain the default behavior like starting into “Recovery Console” we need to do some manual hacking because this isn’t supported natively.

Beware, this remedy only works when creating a .wim image.

If you are familiar with PowerShell scripting you can easily create you’re own patch file for creating vhd/vhdx images.
For now this was all I needed…

  • Copy .\NanoServer\NanoServerImageGenerator folder from the Windows 2016 Server CD to C:\NanoServerImageGenerator
  • Create the patch file “NanoServerImageGenerator.psm1.patch”:
    737a738,741
    >             $BCDPath = $Null
    >             $BCDTemplatePath = "$Script:TargetMountPath\windows\system32\config\bcd-template"
    >             Enable-TestSigning $BCDPath $BCDTemplatePath
    >
    1160a1165,1168
    >             $BCDPath = $Null
    >             $BCDTemplatePath = "$Script:TargetMountPath\windows\system32\config\bcd-template"
    >             Enable-TestSigning $BCDPath $BCDTemplatePath
    >
    1949,1950d1956
    <         if ($Development)
    <         {
    1952d1957
    <         }
    
  • Patch the file “NanoServerImageGenerator.psm1”
    cd C:\NanoServerImageGenerator\
    patch.exe NanoServerImageGenerator.psm1 NanoServerImageGenerator.psm1.patch
    
  • Run the “Nano Server Image Builder” again and follow the wizard to “Create a new Nano Server Image”.
  • Copy the “Nano Server image creation PowerShell command”. When we are at the end of the wizard in the Confirmation section we can click create. The wizard will then start creating you’re image (and eventually error out with some error code…). This behaviour is to be expected as the wizard isn’t aware of our patched NanoServerImageGenerator.psm1 script.

    We can copy the “Nano Server image creation PowerShell command” from the wizard
  • Run PowerShell as Administrator
    Set-ExecutionPolicy Unrestricted
    
  • Close the PowerShell windows and then Re-open a new session.
    cd C:\NanoServerImageGenerator\
    Import-Module .\NanoServerImageGenerator -Verbose
    New-NanoServerImage -MediaPath 'E:\' -Edition 'Datacenter' -DeploymentType Host -TargetPath 'C:\NanoServerImage\NanoServer.wim' -SetupUI ('NanoServer.Compute', 'NanoServer.OEM-Drivers') -DriverPath ('C:\Users\Wouter\Downloads\PROWinx64\PRO1000\Winx64\NDIS65\e1c65x64.inf') -ComputerName 'hyperv' -SetupCompleteCommand ('tzutil.exe /s "W. Europe Standard Time"') -LogPath 'C:\Users\Wouter\AppData\Local\Temp\NanoServerImageBuilder\Logs\2016-10-16 22-02'
    

Finalize USB media creation

We can now finalize our USB installation media.
This step is straight forward, just run “Nano Server Image Builder” again and select “Create bootable USB media”.
Now we can just follow the steps in the wizard…
Voilá, we have got our-self a nice USB installation key with Nano Server 2016.

Nano Server 2016: Install on bare metal

The initial hard part is over now, we have got our USB key, all we have to do now is put it in the server, power onn, and make sure your server boots from the USB key. rest of the installation is automated. It will finally reboot your server when its done. We can now safely remove the USB key.

Little trap for young players: the installation process will remove the boot capability from the USB key, so if you want to repeat the installation process again you have to recreate the key using the wizard.

Congratulations, you have just installed your Nano Server 2016 – Hyper-V host!

Next post, Enable remote PowerShell management.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s