Installing Nano server on Phisical computer

Many of us are testing Nano servers, but as creating VHD is well documented and you can find step-by-step instruction anywhere, deploying Nano server on a host computer is not well documented. I will try to make a step-by-step deployment for deploying a Nano server on a physical server and disk in this post.
All files that you need for deploying a Nano server are located in NanoServer folder on the installation DVD.
For begin deployment you have few possibilities; you can start from Win PE environment, WDS or installation DVD. If you start from DVD or WDS, you have to launch a setup program and then in the first step (where you can choose the language) press Shift + F10 to open command prompt. Actually we do not need installation, but we use it only to access to the command prompt.
Now, we will use diskpart.exe for preparing and partitioning the disk. Here you have to know some limitations: Nano server will start if disk is in formatted GPT mode and here we will prepare the disk to start from UEFI. So, let start and prepare our disk:

Diskpart With this command you will enter in the diskpart mode
List disk Use to locate the disk where you want to install the Nano server. (in my case is number 2)
Select disk 2 Select the right disk
Detail disk Optional – with this command you will receive detailed info about the selected disk
Clean If there are some partition on disk, you have to delete them
Convert GPT This command will convert your disk to GPT

The next step is creating partitions that we need. As we want to use UEFI boot, we need three partitions.

Create Partition MSR Size=128 Create MSR (Microsoft reserved) partition
Create Partition EFI Size=128 Create System partition
Format FS=FAT32 Quick Label=EFI Format System partition
Assign Letter=S Assign letter to System partition
Create Partition Primary Create primary partition
Format FS=NTFS Ouick Label=System Format primary partition
Assign letter=W Assign drive letter to primary partition
Exit Exit from diskpart

With these steps we prepared the disk for deploying server. Now we have all partitions ready, but we still need to deploy the server image and create this disk as bootable.
For deploying the image, we will use DISM. Deploying image with DISM is exactly the same as in previous versions, but you have to remember that when you will log in to Nano server, you will not be able to add or remove functionalities or manage server directly from server – this must be done remotely. For this reason, it is better to deploy packages we need in this step. Of course OEM drivers package is mandatory as we are deploying server to physical server.

For deploing server image on the disk you have to use DISM in this way:

dism /Apply-image /Imagefile:C:\nanoserver\nanoserver.wim /Index:1 /Applydir:W:\

You may have to change the file destination and apply directory based on your configuration.
Now the server image is deployed on the disk, but it is only a basic image and we still have to deploy drivers and functionalities that we need. All of this can be done by deploying packages and drivers. In some cases, you will need to deploy additional drivers (for example RAID drivers). This deployment is also done with DISM, but is not covered in this article.
Packages that are available for Nano server are located in Packages folder on DVD and you can choose which to install. DISM command for installing the package is:

dism /Add-Package /PackagePath:C:\NanoServer\packages\Microsoft-NanoServer-DSC-Package.cab /Image:w:\

Once again you have to change the package location and name and where to deploy it (image parameter), based on your configuration. In this way you have to deploy all packages you need; one by one. This are packages that are available for Nano server:

Compute = Hyper-V Server
OEM-Drivers = Standard OEM Drivers (required if server is host)
Storage = Storage Server
FailoverCluster = FailOver Cluster Server
ReverseForwarders = ReverseForwarders to allow some older App Servers to run
Guest = Hyper-V Guest Tools (reqired if server is virtualized)
Containers = Support for Hyper-V and Windows containers
Defender = Windows Defender
DCB = Data Center Bridging
DNS = DNS Server
DSC = PowerShell Desired State Configuration Support
IIS = Internet Information Server (Web Server)
NPDS = Network Performance Diagnostics Service
SCVMM = System Center VMM
SCVMM-Compute = Sysmte Center VMM Compute

Now remains only to make the disk bootable and we will use BCDBOOT:

bcdboot w:\windows /s s: /f UEFI

Don’t forget that some switches may have to be different and they depend on your configuration. W:\Windows is the folder where you have the deployed server image and S: is the letter of EFI partition.

Finally, we have all done, just reboot the server and use it.
As in all other server installations, on first logon you have to change the Administrator password. Don’t be afraid how, just try to logon with blank password and you will be asked for a new one..

How to compact VHD or VHDX

When we try to compact dynamically expanding VHD or VHDX we have to do few things if we want reach good results.
First we need to know how file system is working. It is important to know that when we delete a file or just a part of the file, those data are not really deleted, you just remove a pointer to that sector. This is important because the compact operation will just remove the free space and simply deleting the file will not free the space on VHD file.
For this reasons you have to prepare VHD before you can compact it. To prepare virtual disk for this operation, three steps are important:

  • Empty Recycle bin – if you have files in Recycle bin it is best practice to delete them before compacting disk as they need space like any other file.
  • Defrag VHD – it is recommended also to defrag the disk for getting best results. This will also speed up your work with VHD.
  • Write zeros to free space – writing zeros on free space you will remove all “deleted” data, so this is a really important step that will free your space.

To write down zeros you need external application as there is no build in application to do it. I am using Rusinovich’s SDELETE (https://support.microsoft.com/en-us/kb/2786067). The usage is very simple; you have just to run sdelete from administrative command prompt with Z switch. For example, if you want to free space on D drive you have to run a command in this way:

Sdelete.exe -z d:

With this command you will free space and now you are ready to compact VHD form Hyper-V manager or PowerShell. Using this steps, you will really decrease a space used by VHD. .

Calculating RAID IOPs

Many times my colleagues ask me how to determinate IOPs on their RAID or storage. There are a lot of posts on internet and for this reason I don’t want to create another copy of the same content.
Of course you have to calculate IOPs based on disks that you have. Not all the disks are the same and real IOPs can vary, based on the model of the disk. How to calculate IOPs of the disk is well explained in this link http://www.techrepublic.com/blog/the-enterprise-cloud/calculate-iops-in-a-storage-array/. But if you want just an approximate calculation of your RAID field, you will like this link http://www.thecloudcalculator.com/calculators/disk-raid-and-iops.html. It is approximatively as IOPs depend on actual mark and model of disks, RAID controller or NAS, but it can be used as a guideline to determinate your configuration..

Essentials server 2012R2 connector update

For anyone who is working with Essentials server is clear, that client computers should be added to domain thru designated connector (connectcomputer). We always have problems here because when new OS is released, this OS it is not supported in the current connector.
Of course it was the same with Windows 10 and Essentials server 2012R2, but now the connector has been released. You can download it here..

Send mail on backup failure with Script

A lot of us, in small environment, is using Windows backup to backup all servers. To be honest, it is a good enough solution, but we have problems with reporting. For me, as an administrator, it is very important to know if a backup was successful or not. There is still another problem, that we have many small environments to check and it would be nice to receive reports thru mail.
As there I didn’t find a solution, I wrote a script, which runs as scheduled task (weekly or daily – as you prefer) and E-Mail me all errors on backup jobs in last X hours. It is working for me and now I am more secure that everything in the system is going in the right way. Be careful how you will use the script; it should be used on any server where you run Windows backup and if you are using Exchange for sending mails take care on authentication or create relay connector to allow the script to send an E-Mail.

Script could be downloaded here..

WP to LinkedIn Auto Publish Powered By : XYZScripts.com