Wednesday, May 3, 2017

Create and configure a Nano Server

The Nano Server is the new darling of Microsoft. Nano Server has a little footprint, it's light, fast and have reduced surface for eventual hacker attack. Is a minimal service system. Well let's install them to make some tests.

First you need a media of Windows Server 2016, an evaluated version can be downloaded from Microsoft web site (here). Make a base install of Windows Server 2016 on your prefered virtualization software (Hyper-V, VMware, VirtualBox, etc) after that, insert your media and let's begin. 

You must copy a directory from media inside your hard drive to have some standard scripts. So assumig that your hard drive is C: and media drive is D: 

Start a PowerShell as Administrator and create a folder on C:

mkdir C:\NanoBase 

Then let's copy the scripts and modules that will be imported later.


copy D:\NanoServer\NanoServerImageGenerator\*.* C:\NanoBase

Now we must import modules in Powershell, just run:


import-module C:\NanoBase\NanoServerImageGenerator.psm1

Let's create a virtual disk that will run Nano Server with Microsoft Web Server (IIS). But some parenthesis here, if you use other virtualization software than Microsoft Hyper-V, you must convert the vhdx disk file to appropriated format that your virtualization software could recognize as a virtual machine. That's for another post!

To create a virtual disk you just run a Powershell cmdLet:


new-NanoServerImage -Edition Standard -mediapath D:\ -Basepath C:\NanoBase -targetpath
C:\NanoBase\nano-test.vhdx -DeploymentType Guest -computername NANO-TEST -storage
-package Microsoft-NanoServer-IIS-Package

Then the command will ask you a password credentials for Administrator that will be used in Nano-TEST machine. Choose one that you wish. Thus, the process of creation will continue, and in the end you will have a virtual disk named: nano-test.vhdx  inside C:\NanoBase

That nano-test.vhdx must be imported for your virtualization software, then run it. When it is started, you will face the Nano Server simple screen, you can make a login and configure few things like rules and address, but remember that Nano Server don't have an elaborated interface, just a simple console. For more configurations you must use other tools like PowerShell remote session (Enter-PSSession), then use the full power of cmdLets. That's for future post.

Enjoy!




No comments:

Post a Comment