The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • about.me

    about.me/mikaelnystrom

  • Archives

  • Meta

Posts Tagged ‘Windows Server 2016’

Just because it is possible – Converged Hypervisor with Storage Spaces Direct on HP ProLiant Microserver

Posted by Mikael Nystrom on September 27, 2016

Earlier today at Microsoft Ignite, Microsoft announced Windows Server 2016 (see earlier posts). I was curies to see if it was possible to install Windows Server 2016 Datacenter, using Hyper-V and Storage Spaces direct to build an Converged Hypervisor based solution on 2 HP ProLiant Microservers and it did work. It is not usably in reality, since the servers are not suitable as Converged Hypervisors, but it works, and it is so fun to play with.

image
Storage Spaces Direct in Server Manager.

image

The Enclosure View from Failover-Cluster manager.

image

The highly available virtual machine in the converged hypervisor cluster

/mike

Posted in Storage Spaces, Windows Server 2016 | Tagged: , | Leave a Comment »

Nice to Know – Free Windows Server 2016 Datacenter licenses for retired “vSphare hosts”

Posted by Mikael Nystrom on September 26, 2016

Microsoft is really trying to get customers to give up on VMWare. If you change from VMware to Hyper-V your Windows Server 2016 Datacenter licenses are for free. But as always, you need to read all the fine print.

Read more here: https://www.microsoft.com/en-us/cloud-platform/cloud-tco

image

/mike

Posted in Windows Server 2016 | Tagged: | 2 Comments »

Nice to Know – The Ultimate Guide to Windows Server 2016

Posted by Mikael Nystrom on September 26, 2016

If you want to know more about Windows Server 2016, Microsoft has created a eBook as .pdf that you can download.

Go to https://info.microsoft.com/TheUltimateGuideToWindowsServer2016.html and fill out the form, download and learn.

image

There is also an other e-book that you can download from here: https://blogs.msdn.microsoft.com/microsoft_press/2016/09/26/free-ebook-introducing-windows-server-2016/

and here is the What’s New in Windows Server 2016, it has not been updated today so it still points to TP5 https://technet.microsoft.com/windows-server-docs/get-started/what-s-new-in-windows-server-2016-technical-preview-5

 

/mike

Posted in Windows Server 2016 | Tagged: | 2 Comments »

Nice to know – Windows Server 2016 is GA – Download Evaluation

Posted by Mikael Nystrom on September 26, 2016

Today at Microsoft Ignite Windows Server 2016 was announced. You can download it here to start the evaluation process.

https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2016

image 

/mike

Posted in Windows Server 2016 | Tagged: | Leave a Comment »

Windows Server 2016 Technical Preview 5 is available for download

Posted by Mikael Nystrom on April 28, 2016

Compared to TP4, yes there are improvement’s, that is for sure.

Your can read most of it here https://technet.microsoft.com/en-us/library/dn765472(v=ws.12).aspx 

image

However, there is also a “release notes” that you must read, it mention one very important piece!

“Install Cumulative Update for Windows Server 2016 Technical Preview 5 (KB3157663) before installing any server roles, features, or other products. If you install roles before installing the update, a variety of issues can occur. If this happens, reinstall the preview release and then immediately install the update.”

You can read more about that update here https://support.microsoft.com/en-us/kb/3157663 and download it from Microsoft Catalog:

image

/mike

Posted in Windows Server 2016 | Tagged: | 2 Comments »

Windows Server 2016 – Create a NAT network using the Hyper-V switch

Posted by Mikael Nystrom on March 3, 2016

In Windows Server 2016 (TP4) and Windows 10 1511 it is possible to create a Hyper-V Switch with NAT functionality, including publishing rules. The purpose is to run containers, but it can of course be used to run normal virtual machines. This means that you can very easy build an infrastructure environment with access to Internet and reverse without having a virtual router or firewall, pretty neat IMHO. Currently, the only way to create the switch is using PowerShell, but hey, I don’t mind…

Create the Switch

The following command will create a VM Switch for NAT usage with a subnet of 192.168.1.0/24. The net result will be a switch and an Internal network adapter with the IP address 192.168.1.1

New-VMSwitch -Name ViaMonstraNAT -SwitchType NAT -NATSubnetAddress 192.168.1.0/24

Create the NAT rule to get out

The following command will create a NAT rule for all machines connected to the Switch that uses the default gateway to get out.

New-NetNat -Name ViaMonstraNAT -InternalIPInterfaceAddressPrefix 192.168.1.0/24

Create a publishing rule

The following rule will open the “firewall” and redirect traffic on the hyper-v host port tcp/80 to the machine on the VM Switch with the IP address 192.168.1.200 to tcp/80

Add-NetNatStaticMapping -NatName ViaMonstraNAT -Protocol TCP -ExternalPort 80 -InternalIPAddress 192.168.1.200 -InternalPort 80 -ExternalIPAddress 0.0.0.0

Check if it works

You can use the following PowerShell commandlets to see the configuration after it has been done.

image
Get-VMSwitch will show you the switch with SwitchType NAT.

image
Get-NetNat will show you the NAT configuration bound to the switch.

image
Get-NetNatStaticMapping will show you the publishing rule.

image
Get-NetNatSession will show you current NAT sessions.

/Mike

Posted in Hyper-V, Windows 10, Windows Server 2016 | Tagged: , , | 3 Comments »

Working in the Datacenter–Enable Virtual TPM in Hyper-V gives you the ability to test bitlocker in a VM

Posted by Mikael Nystrom on January 26, 2016

Last night a friend contaced me and said “-Did you ever post the vTPM thing?”, i did say yes, but i was wrong, so here it is…

Simple, without testing and verfication, a deployment solution will fail. One of the tasks that takes a lot of time to test and verify is BitLocker and that also includes TPM. Windows 10 and Windows Server 2016 gives you the ability to create Virtuial Machines with a Virtual TPM Chip 2.0.

image
A VM running Windows Server 2012 R2 with a vTPM chip, The VM is running on Windows Server 2016.

The How-To Part

You need to run Windows Server 2016 TP4 or Windows 10.

On the host, add Isolated UserMode, Hyper-V and Hostguardian Services, by running the following powershell command(elevated):

Add-WindowsFeature -Name “Isolated-UserMode”,”Hyper-V”,”HostGuardian” -IncludeAllSubFeature –IncludeManagementTools

If needed, restart the host.

Before you can enable the vTPM you need to have a Guardian Service guardian object and with that you can crerate a Key Protector.

New-HgsGuardian -Name ‘Guardian’ -GenerateCertificates
$Owner = Get-HgsGuardian -Name ‘Guardian’
$KeyProtector = New-HgsKeyProtector -Guardian $Owner -Owner $Owner –AllowUntrustedRoot

Great, the last piece is to enable the vTPM

Set-VMKeyProtector -VMName ‘WSUS01’ -KeyProtector $KeyProtector.RawData
Enable-VMTPM -VMName ‘WSUS01’

/Mike

Posted in Deployment, Hyper-V, OSD, Windows 10, Windows Server 2016, Windows Server vNext | Tagged: , , , , , | 4 Comments »

Working in the Datacenter – Add-DVDDrive does not work correctly in Windows Server 2016 TP4 (or in Windows 10)

Posted by Mikael Nystrom on December 17, 2015

Update 2015-12-17 : This is now a confirmed bug, and as soon as I know more I will update this post.

It seems to be a bug, hopefully it will be fixed soon. The issue is very simple. If you try to run Add-VMDvdDrive the –path must be specified, in previous version that could be left alone. This problem is more common when you create VM Gen 2, since it does not have a DVD by default, and yes when we build VM’s they usually have a empty DVD for various reasons. According to help in the command let, there is no differences in the cmdlet between 1.1 and 2.0, but in reality it is.

The Issue

The problem is that when using the command Add-VMDvdDrive -VMName $VMName it fails with Add-VMDvdDrive : Exception of type ‘System.ArgumentException’ was thrown because it does not have a path, so i have seen workarounds when you create a small ISO and mount that and then you can remove that, but that sucks. There are some other issues as well.

image
The issue.

The Workaround

Luckily there is 2 different PowerShell modules, 1.1 for older OS and 2.0 for Windows 10/Windows server 2016 TP4 so the only thing you need to do is unload the new PowerShell module for Hyper-V and load the old one, and when you are done, you can load the new module again.

(if you would like to know why there is 2 versions, here you go: http://blogs.msdn.com/b/virtual_pc_guy/archive/2015/11/16/why-are-there-two-hyper-v-powershell-modules-in-windows-10.aspx)

image
We run this in the beginning of the script to replace the module.

image
We run this in the end of the script to restore the module.

/mike

Here is the code on GHitHub

Posted in Datacenter, Hyper-V, PowerShell, Windows 10, Windows Server 2016 | Tagged: , , , | 1 Comment »

Working in the Datacenter – Creating a Reference Image of Windows Server 2016 TP4

Posted by Mikael Nystrom on December 2, 2015

Yes, you really need a reference Image, if not today, you will need it later. If you just deploy VM’s in an isolated environment, well in that case you might not, but for me testing is all about “Non Contoso” testing. What I mean is that I really need to play/test/learn how to run Windows Server 2016 in VM’s, as Hyper-V, with vendors software (like software from Dell, HP and such), so here it is, some kind of step by step guide to create a reference image for Windows Server 2016 TP4. There is a detailed description on how to create a reference image for Windows 10 on TechNet https://technet.microsoft.com/en-us/library/mt297533(v=vs.85).aspx.

MDT 2013 Update is not installed:

Download and Install the following:

ADK 10 – http://go.microsoft.com/fwlink/p/?LinkId=526740

MDT 2013 Update 1 – https://www.microsoft.com/en-us/download/details.aspx?id=48595

I usually have a dedicated “image factory” server/machine, but you can do this on basically any Windows computer running Windows 7 or above. If you are looking for an image factory, here is the story:https://deploymentbunny.com/2014/01/06/powershell-is-king-building-a-reference-image-factory/

MDT 2013 Update 1 is already installed:

Download the following:

Windows Server 2016 Technical Preview 4 – https://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-technical-preview

Visual C++ – https://deploymentbunny.com/2014/08/05/powershell-is-king-download-all-vc-runtimes-using-a-script/

Configure MDT

Mount the ISO and import the Operating System.

Import the VC++ runtimes as applications – https://deploymentbunny.com/2014/09/25/nice-to-havevb-script-wrapper-for-all-vc-installers-to-be-used-in-mdt/

Create a new Task Sequence for Windows Server 2016 Technical Preview 4 and perform the following modifications:

Add the product key

image

The product key is located on the media in the folder \Sources\pid.txt (It works with the Datacenter Edition, NOT the standard, don’t use standard for TP4)

Disable the Maps Broker

image

This step is actually  an application that basically runs a PowerShell script that does disable the service, the reason for having a script is that it is easy to open script, modify, set conditions and similar things in a script, that way I don’t need to modify the task sequence when a change is needed. You can download the script here: https://github.com/DeploymentBunny/Files/blob/master/Tools/Configure%20-%20Disable%20Services%20for%20Windows%20Server/Configure-DisableServicesforWindowsServer.ps1

You then need to create an application in the workbench with the following settings:

Quit Install Command: PowerShell.exe -ExecutionPolicy Bypass -File Configure-DisableServicesforWindowsServer.ps1

image

The services currently makes no sense to have in a UI server and it does not start at all, so instead of having error in the Server Manager I rather disable the service. Of course you can disable the service in any other way, but I don’t like to have a long list of disable commands in the task sequence.

Add .NET framework 3.5.1 (includes 2.0)

image

A massive amount of server applications, toolkit, drivers does require .Net framework

Add VC++ runtimes

image

In the beginning of the post I explained how to download all VC++ and how to import an application that that installs all VC++

Basically every agent invented is written in C++ (it seams that way)

Cleanup before SysPrep

image

Currently the savings are not that great, but as a best practice I always try to make the image as small as possible to make it fast to deploy.

The story is here: https://deploymentbunny.com/2014/06/05/nice-to-know-get-rid-of-all-junk-before-sysprep-and-capture-when-creating-a-reference-image-in-mdt/:

Add Updates

image

You can add updates by downloading the from http://catalog.update.microsoft.com/v7/site/Search.aspx?q=KB3118754, this works when the number of update are small and the update is a .CAB file, but you should configure MDT to use a WSUS server in customsetings.ini, like this:

image

/Mike

Posted in Datacenter, Deployment, OS Deployment, OSD, Windows Server 2016 | Tagged: , , , | 5 Comments »

Working in a Datacenter – Nested Hyper-V or Running Hyper-V in Hyper-V

Posted by Mikael Nystrom on November 21, 2015

image

There are many reason where it make sense to run Hyper-V in Hyper-V, one of them being to enable Credential Guard (VSM) in Windows Server 2016 TP 4 and later. For training, demos, test. R&D it is great. For Windows Server 2016 TP4 it needs to be enable and configured to work and that means PowerShell. Currently there are also some limitations.

On the Host:

Device Guard Disable
Credential Guard Disable
Hyper-V Enabled
Hardware Intel VT-x
Windows Version Build 10565 or greater

 

In the VM:

Dynamic Memory No
Change memory while VM is running No
Using any kind of Checkpoint No
Live Migration No
Save/Resume No

 

You can read the fine print here: https://msdn.microsoft.com/en-us/virtualization/hyperv_on_windows/user_guide/nesting

The PowerShell Function/Script:

This script will enable Nested Hyper-V an a VM
Invoke-WebRequest "https://raw.githubusercontent.com/DeploymentBunny/Files/master/Tools/Enable-NestedHyperV/EnableNestedHyperV.ps1" -OutFile ~/EnableNestedHyperV.ps1
Import-Module ~/EnableNestedHyperV.ps1
Enable-NestedHyperV -VMname TEST100
This Script (Provided be Microsoft) will verify configuration
Invoke-WebRequest "https://raw.githubusercontent.com/Microsoft/Virtualization-Documentation/master/hyperv-tools/Nested/Get-NestedVirtStatus.ps1" -OutFile ~/Get-NestedVirtStatus.ps1
~/Get-NestedVirtStatus.ps1

/mike

Posted in Datacenter, Hyper-V, Windows 10, Windows Server, Windows Server 2016, Windows Server vNext | Tagged: , , , , | 1 Comment »