{"id":2476,"date":"2018-03-21T17:59:58","date_gmt":"2018-03-21T17:59:58","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2476"},"modified":"2018-03-21T17:59:58","modified_gmt":"2018-03-21T17:59:58","slug":"building-and-deploying-nano-servers","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2476","title":{"rendered":"Building and Deploying Nano Servers"},"content":{"rendered":"<p>Microsoft has introduced an installation option of Windows Server 2016 that provides an operating system designed and optimized for Cloud operations. Microsoft&#8217;s Nano Server is intended to support and run born-in-the-cloud applications and containers. In this article, I will explain how to easily and quickly you can deploy Nano Servers in your server environment, using either PowerShell or a GUI.<\/p>\n<p>Nowadays, IT personnel spend a lot of time on repetitive tasks to accomplish various jobs such as:<\/p>\n<ul>\n<li>Managing hosts,<\/li>\n<li>Deploying and maintaining servers,<\/li>\n<li>Creating an account for a new collaborator,<\/li>\n<li>and so on\u2026<\/li>\n<\/ul>\n<p>I believe that one of the best ways of avoiding this type of repetitive job is to be able to automate most of your day-to-day tasks. A big advantage of automation is to be able to simultaneously execute administration tasks in order to optimize the use of your time. Another advantage is to be able to quickly and easily reproduce tasks. In a world of work that requires maximum efficiency, datacenter administrators simply don\u2019t have the time to configure and deploy servers individually. So, the more your tasks are automated, the more time that you will save.<\/p>\n<p>As you probably know, Microsoft has released Windows Server 2016 which offer a new installation option called \u201c<strong>Nano Server<\/strong>\u201d which has been designed as a server dedicated for Cloud operations. Installing this seems like a potentially repetitive task that could be automated!<\/p>\n<h3>What is Nano Server?<\/h3>\n<p>Nano Server is a remotely administered server operating system that is 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. Nano Server is optimized as a lightweight operating system for running \u201ccloud-native\u201d. It means that the goal of Nano Server is to be quickly and easily deployed by every sysadmin.<\/p>\n<h2>How to deploy Nano Server?<\/h2>\n<p>Significantly, Nano Server is part of the full ISO image of Windows Server 2016. You can\u2019t download Nano Server as a single ISO image.<\/p>\n<p>So after downloading and extracting Windows Server 2016, you will notice a folder called \u201cNano Server\u201d which contain \u201c<strong>NanoServer.Wim<\/strong>\u201d. The WIM image will let you build your own Nano Server.<\/p>\n<h3>Nano Server Image Builder<\/h3>\n<p>The first way to build and deploy your Nano Server is \u201c<strong>Nano Server Image Builder<\/strong>\u201d. Nano Server Image Builder is a graphical interface that is provided to create Nano Server images and bootable USB drives. Let\u2019s start by downloading the installer from the Microsoft website:\u00a0<a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=54065\">https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=54065<\/a><\/p>\n<p>Once the installation is done, you must choose if you want to create a new Nano Server image or a bootable USB media.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-72343\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2017\/08\/word-image-116.png\" \/><\/p>\n<p>Next, you must select the installation media that you need. The Nano Server Image Builder needs the Windows Server 2016 OS files to build a custom image. You must point to a valid location for your media source. It can be the ISO file itself. A valid location must contain a \u201c<strong>NanoServer\u201d<\/strong>\u00a0folder. Next, you must select the type of machine the image will be deploy to. In this case, I will choose a Virtual Machine Image:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-72344\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2017\/08\/word-image-117.png\" \/><\/p>\n<p>The file extension of the output filename determines whether it creates an MBR-based VHD for Generation 1 virtual machines versus a GPT-based VHDX for Generation 2 virtual machines.<\/p>\n<p>The next part is more interesting because you can customize your Nano Server Image by selecting the Nano Server Edition. Depending the edition, you can add some optional packages such as:<\/p>\n<ul>\n<li>Containers<\/li>\n<li>Hyper-V<\/li>\n<li>DNS Server<\/li>\n<li>Failover Clustering Service<\/li>\n<li>Web Server IIS<\/li>\n<li>Windows PowerShell DSC<\/li>\n<li>\u2026<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"wp-image-72345\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2017\/08\/word-image-118.png\" \/><\/p>\n<p>If your virtual machine requires specific device drivers, you can include them in this Nano Server Image and the Nano Server will then attempt to load each device driver during boot.<\/p>\n<p>Note that the Virtual Machine integration components for Hyper-V have been selected automatically. Finally, you can configure the computer name, the time zone and the network.<\/p>\n<p>Nano Server Image Builder will create your VHD or VHDX file. You then just have to import this into your Hyper-V manager console. Select \u201cQuick Create\u201d and point to the VHD file previously created:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-72346\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2017\/08\/word-image-119.png\" \/><\/p>\n<p>You can now easily rerun Nano Server Image Builder to create as many new Nano Server Images as you need.<\/p>\n<h3>Nano Server Image Generator<\/h3>\n<p>The GUI is great for performing a manual deployment task, but you will soon be very likely to need to deploy many Nano Servers. In order to automate the provisioning process, there is a PowerShell module called \u201c<strong>Nano Server Image Generator<\/strong>\u201d which lets you create your VHD file using the command-line. Let\u2019s see how to use it.<\/p>\n<p>Firstly, you need to import the module which is located inside the \u201c<strong>NanoServerImageGenerator<\/strong>\u201d folder:<\/p>\n<div id=\"crayon-5ab29bcdc6812467970163\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc6812467970163-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-r \">Import-Module<\/span> <span class=\"crayon-i\">C<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-i\">NanoServer<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-i\">NanoServerImageGenerator<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-i\">NanoServerImageGenerator<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-i\">psd1<\/span> <span class=\"crayon-cn\">-verbose<\/span><\/div>\n<div id=\"crayon-5ab29bcdc6812467970163-2\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span><span class=\"crayon-i\">VERBOSE<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">Loading <\/span><span class=\"crayon-e\">module <\/span><span class=\"crayon-e\">from <\/span><span class=\"crayon-i\">path<\/span> <span class=\"crayon-s\">&#8216;C:\\NanoServer\\NanoServerImageGenerator\\NanoServerImageGenerator.psd1&#8217;<\/span><span class=\"crayon-sy\">.<\/span><\/div>\n<div id=\"crayon-5ab29bcdc6812467970163-3\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span><span class=\"crayon-i\">VERBOSE<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">Importing <\/span><span class=\"crayon-st\">function<\/span> <span class=\"crayon-s\">&#8216;Edit-NanoServerImage&#8217;<\/span><span class=\"crayon-sy\">.<\/span><\/div>\n<div id=\"crayon-5ab29bcdc6812467970163-4\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span><span class=\"crayon-i\">VERBOSE<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">Importing <\/span><span class=\"crayon-st\">function<\/span> <span class=\"crayon-s\">&#8216;Get-NanoServerPackage&#8217;<\/span><span class=\"crayon-sy\">.<\/span><\/div>\n<div id=\"crayon-5ab29bcdc6812467970163-5\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span><span class=\"crayon-i\">VERBOSE<\/span><span class=\"crayon-o\">:<\/span> <span class=\"crayon-e\">Importing <\/span><span class=\"crayon-st\">function<\/span> <span class=\"crayon-s\">&#8216;New-NanoServerImage&#8217;<\/span><span class=\"crayon-sy\">.<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>There are three cmdlets at your disposal.<\/p>\n<ul>\n<li><strong>New-NanoServerImage:\u00a0<\/strong>Creates a Nano Server installation image.<\/li>\n<li><strong>Get-NanoServerImage:\u00a0<\/strong>Get available packages for a Nano Server installation image.<\/li>\n<li><strong>Edit-NanoServerImage:\u00a0<\/strong>Modify a Nano Server installation image.<\/li>\n<\/ul>\n<p>If you need some additional help, you can use the\u00a0<strong>Get-Help<\/strong>\u00a0cmdlet followed by one of these cmdlets.<\/p>\n<div id=\"crayon-5ab29bcdc6819366061477\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc6819366061477-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-r \">Get-Help<\/span> <span class=\"crayon-r \">New-NanoServerImage<\/span> \u2013<span class=\"crayon-i\">full<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Let\u2019s see how to create a basic Nano Server image. Below is an example:<\/p>\n<div id=\"crayon-5ab29bcdc681c898276490\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc681c898276490-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-r \">New-NanoServerImage<\/span> <span class=\"crayon-cn\">-DeploymentType<\/span> <span class=\"crayon-i\">Guest<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-2\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-Edition<\/span> <span class=\"crayon-i\">Datacenter<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-3\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-MediaPath<\/span> <span class=\"crayon-s\">&#8220;C:\\Media\\WindowsServer2016\\&#8221;<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-4\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-BasePath<\/span> <span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-i\">Base<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-5\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-TargetPath<\/span> <span class=\"crayon-s\">&#8220;C:\\Tmp\\MyNanoServer.vhd&#8221;<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-6\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-MaxSize<\/span> 10737418240 <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-7\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-ComputerName<\/span> <span class=\"crayon-s\">&#8220;Nano01&#8221;<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-8\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-Clustering<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-9\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-Package<\/span> <span class=\"crayon-r \">Microsoft-NanoServer<\/span><span class=\"crayon-cn\">-ShieldedVM<\/span><span class=\"crayon-cn\">-Package<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-10\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-EnableRemoteManagementPort<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681c898276490-11\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-AdministratorPassword<\/span> <span class=\"crayon-v\">$SecurePassword<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>In the above example, the command will create a Virtual Machine Nano Server image using the<strong>\u00a0-DeploymentType\u00a0<\/strong>parameter. Two values are possible:<\/p>\n<ul>\n<li>\u201cGuest\u201d is a Virtual Machine<\/li>\n<li>\u201cHost\u201d is a Physical Machine<\/li>\n<\/ul>\n<p>We create a Datacenter edition with the\u00a0<strong>-Edition<\/strong>\u00a0parameter. It will have the clustering feature added, support for a shielded VM using the\u00a0<strong>-Package<\/strong>\u00a0parameter, and support for remote management over WinRM will be enabled. Finally, the administrator password will need to be a secure string variable which you can easily convert from a plain-text password.<\/p>\n<p>Note that some of the more popular server features have their own switches such as \u201cclustering\u201d but these can also be added with the\u00a0<strong>-Package\u00a0<\/strong>parameter.<\/p>\n<p>Now, imagine that you want to update an existing Nano Server Image rather than rebuild a new image. You can use the\u00a0<strong>Edit-NanoServerImage\u00a0<\/strong>cmdlet to update your Nano Image. The cmdlet operates on an image produced by the\u00a0<strong>New-NanoServerImage\u00a0<\/strong>cmdlet and you can use the same parameters.<\/p>\n<div id=\"crayon-5ab29bcdc681f183770975\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc681f183770975-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-r \">Edit-NanoServerImage<\/span> <span class=\"crayon-cn\">-TargetPath<\/span> <span class=\"crayon-s\">&#8220;C:\\Tmp\\MyNanoServer.vhd&#8221;<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681f183770975-2\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-BasePath<\/span> <span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">\\<\/span><span class=\"crayon-i\">Base<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681f183770975-3\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-ComputerName<\/span> <span class=\"crayon-s\">&#8220;Nano02&#8221;<\/span> <span class=\"crayon-sy\">`<\/span><\/div>\n<div id=\"crayon-5ab29bcdc681f183770975-4\" class=\"crayon-line\"><span class=\"crayon-h\">\u00a0\u00a0<\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<span class=\"crayon-cn\">-AdministratorPassword<\/span> <span class=\"crayon-v\">$NewSecurePassword<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>The first thing that this cmdlet will perform is mounting the VHD file. Then the VHD file will be updated and dismounted once the modifications are done.<\/p>\n<p>If you are wondering how to find all the available parameters? Well, we will use the\u00a0<strong>Show-Command<\/strong>cmdlet to show you how easy it is to deploy your Nano Server using the\u00a0<strong>New-NanoServerImage<\/strong>cmdlet.<\/p>\n<p>Building a new Nano Server has been made easier with the\u00a0<strong>Show-Command<\/strong>\u00a0cmdlet from PowerShell 5.0:<\/p>\n<div id=\"crayon-5ab29bcdc6821730208529\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc6821730208529-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-r \">Show-Command<\/span>\u00a0<span class=\"crayon-cn\">-Name<\/span>\u00a0<span class=\"crayon-r \">New-NanoServerImage<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Here is a screenshot of the GUI:<\/p>\n<p><img decoding=\"async\" class=\"wp-image-72347\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/2017\/08\/word-image-120.png\" \/><\/p>\n<p>Enter all your values, select which parameters you need, and click \u201cCopy\u201d to get the PowerShell command ready to be used!<\/p>\n<h3>Nano Server as a Container base OS Image<\/h3>\n<p>Microsoft announced in mid-June the future direction for Nano Server by publishing the announcement of the forthcoming feature update (1709)\u00a0<a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-server\/get-started\/nano-in-semi-annual-channel\">https:\/\/docs.microsoft.com\/en-us\/windows-server\/get-started\/nano-in-semi-annual-channel<\/a>. Microsoft has refocused Windows Server 2016 Core and Desktop as its primary bare metal, while Nano is now focused on containers. It means that Nano Server will be available only as a container-based OS image.<\/p>\n<p>You will must run it as a container in a container host. Running a container based on Nano Server in the new feature release differs from earlier releases in these ways:<\/p>\n<ul>\n<li>Nano Server has been optimized for .NET Core applications<\/li>\n<li>Nano Server is even smaller than the Windows Server 2016 version<\/li>\n<li>Windows PowerShell, .NET Core, and WMI are no longer included by default, but you can include PowerShell and .NET Core container packages when building your container<\/li>\n<li>There is no longer a servicing stack included in Nano Server. Microsoft publishes an updated Nano container to Docker Hub that you redeploy<\/li>\n<li>You troubleshoot the new Nano Container by using Docker<\/li>\n<li>You can now run Nano containers on IoT Core<\/li>\n<\/ul>\n<p>It means that you must use Nano Server as a Windows Container instead of a Virtual or Physical Machine.<\/p>\n<p>&nbsp;<\/p>\n<p>Here is a brief overview. First, you must pull a\u00a0<strong>NanoServer<\/strong>\u00a0Container image by running the following command:<\/p>\n<div id=\"crayon-5ab29bcdc6824372557552\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc6824372557552-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-e\">docker <\/span><span class=\"crayon-e\">pull <\/span><span class=\"crayon-i\">microsoft<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-i\">nanoserver<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>You can list all available images using Docker:<\/p>\n<div id=\"crayon-5ab29bcdc6828522112909\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc6828522112909-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-e\">docker <\/span><span class=\"crayon-i\">images<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Now you can create a new\u00a0<strong>Nano Server<\/strong>\u00a0container from the image using Docker:<\/p>\n<div id=\"crayon-5ab29bcdc682a567630590\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc682a567630590-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-e\">docker <\/span><span class=\"crayon-i\">create<\/span> <span class=\"crayon-cn\">-t<\/span> <span class=\"crayon-o\">&#8212;<\/span><span class=\"crayon-e\">name <\/span><span class=\"crayon-i\">MyNanoServer<\/span> <span class=\"crayon-cn\">-h<\/span> <span class=\"crayon-i\">NanoServer<\/span> <span class=\"crayon-cn\">-i<\/span> <span class=\"crayon-i\">microsoft<\/span><span class=\"crayon-o\">\/<\/span><span class=\"crayon-i\">nanoserver<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Now that we have prepared the container, we can start the container and enter into the\u00a0<strong>Nano Server<\/strong>container session interactively:<\/p>\n<div id=\"crayon-5ab29bcdc682c295459034\" class=\"crayon-syntax crayon-theme-powershell-output crayon-font-courier-new crayon-os-pc print-yes notranslate crayon-wrapped\" data-settings=\" minimize scroll-mouseover disable-anim wrap\">\n<div class=\"crayon-plain-wrap\"><\/div>\n<div class=\"crayon-main\">\n<table class=\"crayon-table\">\n<tbody>\n<tr class=\"crayon-row\">\n<td class=\"crayon-nums \" data-settings=\"hide\"><\/td>\n<td class=\"crayon-code\">\n<div class=\"crayon-pre\">\n<div id=\"crayon-5ab29bcdc682c295459034-1\" class=\"crayon-line\"><span class=\"crayon-r \">PS<\/span> <span class=\"crayon-o\">&gt;<\/span> <span class=\"crayon-e\">docker <\/span><span class=\"crayon-i\">start<\/span> <span class=\"crayon-cn\">-i<\/span> <span class=\"crayon-i\">MyNanoServer<\/span><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>You can now work inside the\u00a0<strong>Nano Server<\/strong>\u00a0container interactively.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft has introduced an installation option of Windows Server 2016 that provides an operating system designed and optimized for Cloud operations. Microsoft&#8217;s Nano Server is intended to support and run born-in-the-cloud applications and containers. In this article, I will explain how to easily and quickly you can deploy Nano Servers in your server environment, using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[65],"tags":[],"class_list":["post-2476","post","type-post","status-publish","format-standard","hentry","category-nano-server-nano-server"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2476","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2476"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2476\/revisions"}],"predecessor-version":[{"id":2477,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2476\/revisions\/2477"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2476"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2476"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2476"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}