(10/12/2016 - Refreshing blog content and steps now that WS 2016 is GA!)
Nano Server is an exciting new installation option in Windows Server 2016.
Here’s a quote from the Get Started with Nano Server Guide that summarizes Nano Server pretty well :
“Nano Server is a remotely administered server operating system optimized for private clouds and datacenters. It is similar to Windows Server in Server Core mode, but significantly smaller, has no local logon capability, and only supports 64-bit applications, tools, and agents. It takes up far less disk space, sets up significantly faster, and requires far fewer updates and restarts than Windows Server. When it does restart, it restarts much faster.”
So Nano is much smaller on disk. Faster. Less reboots. Uses less memory. What’s not to like? :)
Here are some good blogs from the Windows Server team that talk about Nano Server.
IIS on Nano Server
With General Availability of Windows Server 2016, I’m pleased to announce that IIS is now available as a role in Nano Server, for everyone to try out. With smaller memory and dramatically smaller disk footprint, web workloads are particularly suited to running on Nano Server, especially for high density hosting.
- Start with the ‘Getting Started with Nano Server’ steps
- The IIS Nano documentation can be found at https://technet.microsoft.com/en-us/windows-server-docs/get-started/iis-on-nano-server
- You can also get to it via the tree menu on the left hand side of the ‘Deploy Nano Server’ (expand it)
- The specifics of how to install IIS on Nano can be found in the link above.
But essentially, the most common way of creating a Nano Server vhd(x) is via the New-NanoServerImage cmdlet.
To enable IIS, we just pass in
Microsoft-NanoServer-IIS-Package as an argument to the Package parameter. e.g.
New-NanoServerImage -Edition Standard -DeploymentType Guest -MediaPath f:\ -BasePath .\Base -TargetPath .\Nano1.vhd -ComputerName Nano1 -Package Microsoft-NanoServer-IIS-Package
Key Differences between IIS on Nano and Regular Server
We have made a lot of changes in IIS for Nano to support both online and offline install. By ‘online’ we mean when the machine is ‘running’ (we don’t mean online in the network connectivity sense) and by ‘offline’ we mean when the machine is not running.
Historically and on regular Server, IIS can only be installed online (machine running). When preparing a machine with IIS you would typically follow a sequence such as:
- Install OS
- Wait for install to complete
- Enable IIS Role
- Wait for IIS role to complete
- Configure settings – e.g. authentication settings, modules, Asp.Net
With Nano Server, setup can be provisioned offline, therefore dramatically simplifying and speeding up steps 1 thru 4 above.
When using New-NanoServerImage to create a vhd(x) with Microsoft-NanoServer-IIS-Package we configure a default working install of IIS
- IIS Services installed (e.g. WAS, W3SVC)
- A default set of IIS sub-features enabled, such as Default Document, Static content, HTTP logging etc.
- Refer to chart for which sub-features are enabled by default.
- Firewall rule enabled for default 80/443 ports
It becomes extremely fast to provision new web server machines when using the generated vhd(x) image that has IIS already baked-in. On my office desktop machine, I was able to create new VMs, do offline specialization, boot up and be serving web requests all in about 25 seconds. Trying to do the same with Server Core would’ve taken many times that.
As of WS 2016 GA version, configuring IIS sub-features such as authentication and logging is similar as for regular server.
e.g. dism /online /enable-feature /all /featurename:IIS-WindowsAuthentication
To list enabled features: dism /online /get-features
In Preview versions of WS 2016 it was required to manually configure sub-features through editing applicationHost.config, but this is no longer required with the GA version.
The most notable difference between Nano and regular Server is that Nano targets Asp.Net Core (formerly known as Asp.Net 5). Classic Asp will not run on Nano and neither will full .Net Framework applications such as Asp.Net <=4.
Java applications can be hosted on IIS via HttpPlatformHandler.
My co-worker Jeong Hwan has a blog post here on how to get Java working with IIS on Nano
PHP on IIS runs the same on Nano the same as on regular server (e.g. through FastCgi).
Here's a blog post from Jeong Hwan on how to get a PHP (WordPress) application running on Nano with WinCache and IIS.
Supporting Asp.Net Core, Java and PHP on IIS Nano is a great start though we do have plans to get additional platforms supported. The HttpPlatformHandler is a general purpose module for managing and sending requests to http listeners, so there could well be more platforms that can run well on Nano that we haven’t tested and so haven’t listed.
If you do try this (e.g. with Ruby or Node) and get it working let us know!
Nano Server is a ‘headless’ OS – there is no GUI on the server itself. PowerShell is front and center of the Nano management experience. Of course this means you will be able to manage IIS on Nano using our IIS PowerShell cmdlets.
I should clarify that as of IIS 10.0 there are 2 IIS PowerShell modules:
- The older WebAdministration module
- The new IISAdministration module
Nano Server is a clean server platform for the future and so we currently have no plans to include the older legacy WebAdministration module at this time. Instead we will provide the new IISAdministration module.
In addition to PowerShell (IISAdministration), using appcmd.exe to manage IIS is also an option.
For GUI client, Inetmgr is not available for Nano. Running Inetmgr on a regular non-Nano WS2016 server connecting to Nano IIS will not work.
Microsoft IIS Administration:
There is an exciting new IIS Management project (Microsoft IIS Administration) from the IIS team that does provide multiple additional options for you to manage Nano IIS, including a Web UI!.
You can read more about this in the following blogs:
You can get started here: https://manage.iis.net