Replicate Hyper-V virtual machines to #Azure using Azure Site Recovery #ASR #BCDR #winserv #Cloud #MSOMS   1 comment

Site Recovery is an Azure service that contributes to your business continuity and disaster recovery (BCDR) strategy. Site Recovery orchestrates replication of on-premises physical servers and virtual machines to the cloud (Azure), or to a secondary datacenter. When outages occur in your primary location, you fail over to the secondary location to keep apps and workloads available. You fail back to your primary location when it returns to normal operations.  Using ASR can be directly from the Azure Portal or Using OMS.

Azure Site Recovery

One or more Hyper-V server, running at least Windows Server 2012 R2 with the latest updates and the Hyper-V role enabled, or running Microsoft Hyper-V Server 2012 R2, with the latest updates. Hyper-V hosts need internet access, and need to be able to access specific URLs directly, or via a proxy.

Individual disk capacity on protected machines shouldn’t be more than 1023 GB. A VM can have up to 64 disks (thus up to 64 TB).

In this case I build a replica between a Hyper-v server and Azure.

In the Azure portal we search for backup.

image         Azure Site Recovery

Picked the Backup and Site Recovery (OMS) and create a Recovery vault. That’s it.. well .. close.

Opening this vault or if you don’t know where it is select the resource group and go from there to the ASR.

Azure Site Recovery

Selecting our ASR vault brings us to the backup and ASR.

Azure Site Recovery

It is a very busy menu and a lot of options are there and still new options may appear. And there are several ways to start with ASR.

 

imageAzure Site Recovery

Selecting the Site Recovery Infrastructure a new menu opens and already there are 3 configs. Hyper-v , vmware or VMM

We do the Hyper-v option.

image

imageAzure Site Recovery

It is all step by step and seams all very easy but you need to take care of some steps before you can complete the steps.

Register your Hyper-V host(s)

On-premises

  1. Make sure the host is running Windows Server 2012 R2 or above.

  2. Download the Agent

  3. the installer for the Microsoft Azure Site Recovery Provider.

  4. Download the vault registration key to register the host in a Hyper-V site

image

This download is replication agent to Azure and need to be installed on the Hyper-v Server

imageAzure Site Recovery

Selecting the Site Recovery and start with Step 1

image

In this step We select our Protection goal select To Azure, and select Yes, with Hyper-V. Select No to confirm you’re not using VMM.

image

We need to create a Site of this hyper-v server. this is a Cosmetic name and points to the Hyper-v server or servers, if this is a Test server then this should be HVtest etc.

Azure Site Recovery

My site is Single Hyper-v server and already there a a few steps I need to install the Agent downloaded earlier and use the vault keys to connect to Azure.Also downloaded here

image

Installing the Hyper-v Agent

Use the Exe just downloaded and follow the steps.

Azure Site Recovery

image

Use a location be careful  if not installing on the C drive and not replication the other drive there can be miscommunication in the VM. Better leave this default.

Azure Site Recovery

But in case You already played with this or want different naming and started all over the may be an issue “ the server is already registered”

image

To fix this error and enable the ASR Provider and agent setup to complete successfully, follow these steps:

  1. Go to the Register
  2. Make a backup of the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Azure Site Recovery

Azure Site Recovery

  1. Delete the registry key that you backed up in step 2.
  2. Restart the Provider and agent setup.

Azure Site Recovery

Use the downloaded Keys and import them.

image

Azure Site Recovery

Checking the Register you can see that the key is valid and all the info is there.

Azure Site Recovery

image

And the installation is done. It can take some time to add the server to Azure maybe several hops back and forth to the menu

Azure Site Recovery

 

image

You can see the process running in the Task manager.

 

image

Jumping back and to the step 2 you can see the Hyper-v server is added to the Vault.

Azure Site Recovery

Added a storage account and a network. If this is not the storage account or network you want no worry you can change this befor the replication starts.

image

Check this if you want a new account or different network.

Azure Site Recovery

Next step would be creating a replication policy.

image

  1. In Create and associate policy specify a policy name.
  2. In Copy frequency specify how often you want to replicate delta data after the initial replication (every 30 seconds, 5 or 15 minutes).
  3. In Recovery point retention, specify in hours how long the retention window will be for each recovery point. Protected machines can be recovered to any point within a window.
  4. In App-consistent snapshot frequency specify how frequently (1-12 hours) recovery points containing application-consistent snapshots will be created. Hyper-V uses two types of snapshots — a standard snapshot that provides an incremental snapshot of the entire virtual machine, and an application-consistent snapshot that takes a point-in-time snapshot of the application data inside the virtual machine. Application-consistent snapshots use Volume Shadow Copy Service (VSS) to ensure that applications are in a consistent state when the snapshot is taken. Note that if you enable application-consistent snapshots, it will affect the performance of applications running on source virtual machines. Ensure that the value you set is less than the number of additional recovery points you configure.
  5. In Initial replication start time specify when to start the initial replication. The replication occurs over your internet bandwidth so you might want to schedule it outside your busy hours.

Azure Site Recovery

As you can see the policy’s are applied but you can create multiple but you can use only one at each site.

image

Site Recovery performs optimally when sufficient network bandwidth and storage are provisioned. Allocating insufficient capacity can lead to replication issues. Site Recovery provides a capacity planner to help you allocate the right resources for your source environment, the site recovery components, networking and storage. You can run the planner in quick mode for estimations based on an average number of VMs, disks, and storage, or in detailed mode in which you’ll input figures at the workload level.

Get the Azure Site Recovery Capacity planner here : Download

 

Azure Site Recovery

A quick overview of the Azure Site Recovery Capacity planner

If you skip this or thinking this will be fine I’ll show you later what can happen.

imageNow that all steps are completed in the ASR infrastructure we can start with step 2.

Azure Site Recovery

The replication can’t be Throttled only for backup operations you can Enable internet bandwidth usage throttling.

image

Selecting the Right networks for the replicated VM’s and subnets and the correct Storage account.

 

image

Next is selecting what VM’s I need to replicate. If there is no VM list then there is something wrong with your connection.

Azure Site Recovery

As my DPM machine has a disk larger than 1023 GB this can’t be replicated.

image

image 

Selecting a few VM’s you can see even the names can be changed to the right Azure style or if there a characters in the name that are not supported.

Azure Site Recovery

In the old days you could only replicated one disk but now 64 Disks are supported. and you can select what disk you want and what to skip.

image

After these final steps we are ready to replicate

imageimage

In a quick overview we can start the replication.

image

the replication is started and as you can see here comes the ASR Capacity planner.

Azure Site Recoveryimage

imageAzure Site Recovery

OK this seams to be an issue for my other running VM’s on this hyper-v server.

image

Checking the Hyper-v server you can see the progress there or in Azure

Azure Site Recovery

Azure Site Recovery

image

But As ASR is using ASR you can also drill down on the replica options.

image

When the replica is done you can change the Azure VM in any way change the network , VM size the VM can be better than on prem.

image

As ASR stands for recovery you can do a test failover or planned. As you are not using VMM the Azure portal is the Orchestrator for the Failover.

Azure Site Recovery

Testing the VM is easy a you can run the VM Side by Side and you can change all the settings. A great option to get started with Azure.

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted February 7, 2017 by Robert Smit [MVP] in Azure Site Recovery

Tagged with

Windows Server 2016 With Hyper-v Yellow exclamation on Microsoft Virtual Machine Bus #winserv #HyperV #Windows   Leave a comment

Don’t you love it when you are running Hyper-v and you can adjust the VM en reboot your cluster and everything is redundant.

Well except the VM after a reboot of the VM it has a Yellow exclamation on Microsoft Virtual Machine

clip_image002 clip_image002[4]

So it seems the VM integration services is not there at all.  and the Update-VMVersion VMNAME –Force is not helping

image 

So this seems like an old issue but it isn’t tried to delete the network keys in the register and no results.  BUT DON’T DO that !!

image

All my VM’s are running the latest patches could this be the issue ? recently there is KB3216755 which has some issues with DeDupe https://support.microsoft.com/en-us/help/4011347/windows-10-update-kb3216755

Placed a snapshot back from before the updates and guess what Same issue eh.. so it is not the VM ? can it be the Hyper-v Server it self ? Patched this server before the VM’s a few days ago.  

image Ok my hyper-v server is not sleeping Winking smile

But checking the problem VM’s I see something unusual why is the VM sitting on his default memory. I use Dynamic memory and the startup memory is 512 MB yes it is low but still ?

image

Odd why <> well there is no network so basically the VM does nothing

image

changed it and this was working on 1 VM so still no solution.

image

the one that worked is delete the Network Adapter in the VM settings, Boot the VM <>shutdown.

Add the Nic’s and boot the VM and you are ready to go. 

image

Well you need to reconfig the network adapter again. but that are just a few Powershell Lines.

Hope this helps you solving your issue

 

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted January 31, 2017 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Deploy a Software Defined Network infrastructure using VMM SDN Express #SCVMM #SDN #Sysctr   Leave a comment

As VMM is a great tool to deploy VM with and with Windows Azure Pack it has a central role, but now in Azure Stack there is no place for VMM.

Unless you are using it to deploy VM’s for Software defined networking RRAS,SLB,Network Controllers, Storage Spaces Direct, SOFS. So plenty of options there. Recently on the Github site Microsoft placed some SDN templates for VMM called VMM Express. these templates are a perfect start for a Network Controller,RAS Gateway for SDN or Software Load Balancing (SLB) for SDN.

 

System Center 2016 Virtual Machine Manager (VMM) can be used to deploy and manage a Software Defined Network (SDN) infrastructure.

SDN virtualizes your network to abstract physical hardware network elements such as switches and routers. Using SDN you can dynamically manage your datacenter networking to meet workload and app requirements. Network policies can be implemented consistently, at scale, even as you deploy new workloads, or move workloads across virtual or physical networks.

If you deploy SDN in the VMM fabric you can:

  • Provision and manage virtual networks at scale.
  • Deploy and manage the SDN infrastructure, including network controllers, software load balancers, and gateways.
  • Define and control virtual network policies centrally and link them to your applications or workloads. When your workload is deployed or moved, the network configuration adjusts itself automatically. This is important because it removes the need for manual reconfiguration of network hardware, thereby reducing operational complexity while saving your valuable resources for higher-impact work.
  • Control traffic flow between virtual networks, including the ability to define guaranteed bandwidth for your critical applications and workloads.

SDN combines a number of technologies, among them:

  • Network Controller:The network controller allows you to automate configuration of your network infrastructure, instead of manually configuring network devices and services.
  • RAS Gateway for SDN: RAS Gateway is a software-based, multitenant, BGP capable router in Windows Server 2016 that is designed for CSPs and Enterprises that host multiple tenant virtual networks using HNV.
  • Software Load Balancing (SLB) for SDN: (SDN) in Windows Server 2016 can use Software Load Balancing (SLB) to evenly distribute tenant and tenant customer network traffic among virtual network resources. The Windows Server SLB enables multiple servers to host the same workload, providing high availability and scalability.

 

There are just a few easy steps to start with.

You can create or download a prepared virtual hard disk in vhd or vhdx format.  Import the vhd/vhdx files to the VMM library.

And now the best part you will need VMM Express for this VMM SDN Express these files are on github download it and extract it an import this on your VMM library.

image 

Now that the files are on the VMM library we can import the templates

image Check the import Template and navigate to the extracted VMM Express Files.

image

For Creating Certificates I used the Selfsigned option as below

$cert = New-SelfSignedCertificate -KeyUsageProperty All -Provider "Microsoft Strong Cryptographic Provider" -FriendlyName "MultiNodeNC" -DnsName @("192.168.2.34") Export-Certificate -Cert $cert -FilePath c:\MultiNodeNC.cer $PlainPassword = "123456" $SecurePassword = $PlainPassword | ConvertTo-SecureString -AsPlainText -Force Export-PfxCertificate -Cert $cert -FilePath c:\MultiNodeNC.pfx -Password $securepassword -ChainOption BuildChain copy C:\MultiNodeNC.pfx \\localhost\MSSCVMMLibrary\ServerCertificate.cr\ copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\TrustedRootCertificate.cr\ copy C:\MultiNodeNC.cer \\localhost\MSSCVMMLibrary\NCCertificate.cr\

imageimage

Now that the Template is loaded is shows a interim mode first you have to reconnect the template items to your library.

image

The items with out the X mark you need to reconnect. as the name is different than in my library like winserver.vhdx is now ws2016,vhdx.

this is a one time step only! pick the right image and files. As you can see there are several steps that we must for fill to complete the template

imageimageimage

Now that all the steps are Completed the Template is ready for deployment in VMM

image

As I imported all the VMM SDN templates, keep in mind that there are two types V1 ( gen 1) and V2 ( gen2 ) vm’s you can’t mix them and you need the right VHDX for this

image

Next step is deployment.

Opening the template in the designer you can see what is deployed and the instance count you can change and some hardware changes unless they have dependency’s then you will need to change the XML before the import. But test first with sample template before create your own and ends up in a failure.

image

imageimage

Starting the deployment right click on the template.

image

The first question is pick a name and choose your management network. Remember this name is later been used in the connection string.

image

the next step is give all the template variables a value and start the deployment

image

I used

image

Run this on a Hyper-v Host with plenty of memory the basic VM’s are consuming 8 GB per VM and default not dynamic. learned from that.

 

Then click the button “Refresh”. Now you could click the button “Deploy Service”.

imageimage

Now that the VM’s are deployed and are up and running ( check your job log in VMM ) We can add a Network Services

imageimage

image This is almost next next Finish.

Next step seems always difficult what is my connection string samples are given but how do I use it ?

image

well you need a Server Url in this case it is the IP address that is used as restendpoint earlier.
serverurl=https://192.168.20.34;SouthBoundIPAddress=192.168.20.34;servicename=Sample NC01

image

The connection string is in place and testing

image image

Select a host to place this.

Next step is creating a logical network for network virtualization.

Create a new logical network

image 

image

Check the box Managed by Network controller.

image

Add a network to the Logical network ( use your own network and VLAN)

imageimage

This is just like any other Logical network Fill in the address space and Gateway with DNS

image

imageimage

Done NOW yes another step is add this network to the Hyper-v Switch

image

Adding the network to the Hyper-v switch so you can use the network in the VM’s as you can see there are a lot of networks and IP/ Vlans involved.  befor you start create a test and see how all the IP’s will fit in your environment. Make a design of the IP’s

Just create a new VM network and use this for the VM’s that are running in the network.  Next time I will go deeper into the usage and where the VM’s live.

image

 

The VMM express templates a re a great way to start but the network part is always a pain there is no easy wizard that creates it all for you. eh powershell. hope this is helpful , it helped me during the blog building rebuilding and maybe I forgot something in the blog I rebuild this several times and run out of compute on my hyper-v server, guess I need a bigger server( more memory)

But you will need to test this But there are great guidance’s on the Microsoft site and even a great video tutorial for deploying a network controller.

https://channel9.msdn.com/blogs/hybrid-it-management/demo-deploy-network-controller

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted December 30, 2016 by Robert Smit [MVP] in SDN

Tagged with ,

Building a Windows Server 2016 Domain Controller #winserv #Hybrid #cloud #Azure #powershell   Leave a comment

Building a Domain Controller is not that Difficult but what about building this with Powershell and use the 2016 Bits.

Well lets take a peek at the Technet site https://technet.microsoft.com/en-us/library/hh974720(v=wps.630).aspx nothing about 2016.

-DomainMode<DomainMode>

Specifies the domain functional level of the first domain in the creation of a new forest. Supported values for this parameter can be either a valid integer or a corresponding enumerated string value. For example, to set the domain mode level to Windows Server 2008 R2, you can specify either a value of 4 or Win2008R2. So

The following are the supported values:
     — Windows Server 2003: 2 or Win2003
     — Windows Server 2008: 3 or Win2008
     — Windows Server 2008 R2: 4 or Win2008R2
     — Windows Server 2012: 5 or Win2012
     — Windows Server 2012 R2: 6 or Win2012R2

Well it makes sense that the Next line would be  — Windows Server 2016: 7 or Win2016

Le me try that in Azure.

First I deploy the windows feature Active Directory

Install-windowsfeature AD-domain-services -IncludeAllSubFeature –IncludeManagementTools

The next step would be Deploy Active Directory and at the end you will be asked for a recovery password.

Install-ADDSForest `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "7" `
-DomainName "mvpdemo01.local" `
-DomainNetbiosName "mvpdemo01" `
-ForestMode "7" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

I did a Force:$true So a reboot is following so no time for a screenshot and wait for things.!

But After the reboot you will have a DC

image

and Joining a DC Member : Add-WindowsFeature AD-Domain-Services

Install-windowsfeature AD-domain-services -IncludeAllSubFeature –IncludeManagementTools

Add-WindowsFeature AD-Domain-Services `
-CreateDnsDelegation:$false `
-DatabasePath "C:\Windows\NTDS" `
-DomainMode "7" `
-DomainName "mvpdemo01.local" `
-DomainNetbiosName "mvpdemo01" `
-ForestMode "7" `
-InstallDns:$true `
-LogPath "C:\Windows\NTDS" `
-NoGlobalCatalog:$false `
-NoRebootOnCompletion:$false `
-SysvolPath "C:\Windows\SYSVOL" `
-Force:$true

 

Joining a Member server

I created a noob account that is only allowed to join a server to the domain

 

Write-Host "Hostname / Node Names" -ForegroundColor yellow
$domain = "mvpdemo01.local"
$password = "Password01" | ConvertTo-SecureString -asPlainText -Force
$username = "$domain\noob"
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
Add-Computer -DomainName $domain -Credential $credential
restart-computer -force

image

See how easy things can be.

 

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted November 1, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Upgrading Hyper-v Server 2012R2 to Server 2016 now what ? #hyperv #winserv #RollingOS   2 comments

So you have done a rolling Upgrade – see Cluster operating system rolling upgrade To all your Hyper-V servers but other than a different logon screen you see no difference. Where are all the options ? Well you will need to do some extra steps. To get the full Hyper-v 2016 Server.

Illustration showing the three stages of a cluster OS rolling upgrade: all nodes Windows Server 2012 R2, mixed-OS mode, and all nodes Windows Server 2016

All the VM options are the Same Did I miss something or is there another configuration option as I created a new VM it has all the new options.

Do I need to recreate all the VM’s ?, where is the hidden option to change this ? a while a go I created a blog post on

Windows Server 2016 with Hyper-v Upgrading Configurations —Windows Server 2016 with Hyper-v Integrations tools & configuration versions

Well this was still on a TP version so the numbers has changed but not the methods. But there is no gui option in the Hyper-v Server that can flip the bit to the new Configuration version. It is done only by Powershell. with that Let us see how this is changed.

image image

Old VM settings vs the New VM Settings.

Do I need to recreate all the VM ? NO are you nuts. this would be odd. Lets dive in a little bit deeper.

In the Hyper-v Manager you can see the configuration and generation version in the 2012R2 this is version 5.0

image

In windows server 2016 the Hyper-v configuration version is now 8.0

image

With the get-VM we can see the Configuration version of the VM

Get-VM | ft Name, IntegrationServicesVersion,version 

image

as you can see I have a version 5.0 and a 8.0 just as in the screen shots above.

Now changing this is a ONEWAY thing and If you have an OLD none 2016 version in your Cluster then the VM would fail if it runs on this node. Version 8.0 runs only on Hyper-V 2016 !

To list all the Supported Configurations On this Server we can do a “ Get-VMHostSupportedVersion “

 

image

So there are Currently seven different versions. With all the options why should I care setting this.

Well there are a couple of reasons why you should set this option. Make the latest Hyper-V features available on your virtual machines by upgrading the configuration version. Don’t do this until:

  • You upgrade your Hyper-V hosts to the latest version of Windows or Windows Server.
  • You upgrade the cluster functional level.
  • You’re sure that you won’t need to move the virtual machine back to a Hyper-V host that runs a previous version of Windows or Windows Server.

And you you replicate from a Hyper-v 2016 Server to a Hyper-v 2012 Server for DR then make sure you don’t run in a higher version than 5.0

When you move or import a virtual machine to a computer that runs Hyper-V on Windows Server 2016 or Windows 10, the virtual machine’s configuration isn’t automatically updated. This means that you can move the virtual machine back to a Hyper-V host that runs a previous version of Windows or Windows Server. But, this also means that you can’t use some of the new virtual machine features until you manually update the configuration version. You can’t downgrade the virtual machine configuration version after you’ve upgraded it.

The virtual machine configuration version represents the compatibility of the virtual machine’s configuration, saved state, and snapshot files with the version of Hyper-V. When you update the configuration version, you change the file structure that is used to store the virtual machines configuration and the checkpoint files. You also update the configuration version to the latest version supported by that Hyper-V host. Upgraded virtual machines use a new configuration file format, which is designed to increase the efficiency of reading and writing virtual machine configuration data. The upgrade also reduces the potential for data corruption in the event of a storage failure

Building a VM based on Windows 2012R2 configuration You should use this PowerShell command as you could see the 8.0 Configuration is default.

New-VM -Name “DemoVM17” -Version 5.0

When listing the VM Configurations you can see the difference. and easily see the 5.0 Version VM’s  config.XML

Virtual machine configuration information that is stored in binary file format. File name extension: .vmcx

image

But what if I want to upgrade the VM’s ? yes you can but only to the default level and PowerShell Only

Update-VMVersion “VM Name”

image

as you can see the DemoVm06 is already at the max level but when updating the DemoVM01 which has Version 5.0 it will be upgraded to Version 8.0 and the Config file will be transferred this can’t be undone!

Virtual machine configuration information that is stored in binary file format. File name extension: .vmcx

you can automate this and do all upgrades in onetime or have a pick list to do this. But the VM needs to be OFF no running VM can be upgraded.

TO upgrade all VM’s   Update-VMVersion * -force

Or pick the VM by yourself with a before and after version.

#Select a VM to upgrade
$vm2016= (Get-VM | select Name, Status, version | Out-GridView -Title "Select VM for update the configuration version" -PassThru).Name
#list VM configuration Version
Get-VM $vm2016 | ft Name, IntegrationServicesVersion,version 
#Convert the Config TO the default Configuration
Update-VMVersion $vm2016 -Force -Verbose
#list VM configuration Version
Get-VM $vm2016 | ft Name, IntegrationServicesVersion,version 

image

 

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted October 31, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with

Windows Server 2016 NLB Network Load Balancing non-SDN or Software Load Balancing (SLB) for SDN #NLB #SLB #SDN   Leave a comment

Windows Server 2016 Network Load Balancing. You can use Network Load Balancing to manage two or more servers as a single virtual cluster. Network Load Balancing enhances the availability and scalability of Internet server applications such as those used on web, FTP, firewall, proxy, virtual private network (VPN), and other mission-critical servers.

New in Windows Server 2016 is it includes a new Azure-inspired Software Load Balancer (SLB) as a component of the Software Defined Networking (SDN) infrastructure. Use SLB instead of NLB if you are using SDN, are using non-Windows workloads, need outbound network address translation (NAT), or need Layer 3 (L3) or non-TCP based load balancing. You can continue to use NLB with Windows Server 2016 for non-SDN deployments.

So We got now two Load Balancing features :

Network Load Balancing (NLB) for non-SDN

Software Load Balancing (SLB) for SDN

Software Defined Networking (SDN) provides a method to centrally configure and manage physical and virtual network devices such as routers, switches, and gateways in your datacenter. Virtual network elements such as Hyper-V Virtual Switch, Hyper-V Network Virtualization, and Windows Server Gateway are designed to be integral elements of your software defined networking infrastructure. While you can still use your existing physical switches, routers, and other hardware devices, you can achieve deeper integration between the virtual network and the physical network if these devices are designed for compatibility with software defined networking.

Network Load Balancing (NLB) for non-SDN

For this demo I created a NLB script that can be found here Create a Windows Server 2016 NLB Network Load Balancing farm https://gallery.technet.microsoft.com/Create-a-Windows-Server-05a13f14

I use a couple of Windows Server 2016 server for the Load Balancing each node has two network adapters and runs IIS with a default website

Network Load Balancing and other software components

 

Network Load Balancing is not nic teaming as nic teaming is on the same host and Network Load Balancing is combining all nodes to one VIP Virtual IP address.

First we install the NLB feature on each node.

Install-WindowsFeature NLB –IncludeManagementTools

To view a complete list of NLB CMDlets type the following CMDlet, Get-command -module NetworkLoadBalancingClusters

image

To Create a New NLB Cluster you can do this in the GUI or in Powershell

image

First I rename the Network Adapter to get a better overview

#Rename NIC
Rename-NetAdapter -Name "Ethernet" -NewName "NLB"

#Create NLB
New-NLBCluster –Interface “NLB” -OperationMode Unicast -ClusterPrimaryIP  -ClusterName WS2016NLB –verbose

Showing the NLB cluster info

Get-NLBClusterNode | Format-List *

image

then I removed all the default rules why would you NLB all the ports ?

#Removing default port rule for the NLB Cluster
Write-Host "Removing default port rule…" -ForegroundColor yellow
Get-NlbClusterPortRule -HostName . | Remove-NlbClusterPortRule -Force

#Adding port rules 80
Write-Host "Added port rule for http (tcp 80)" -ForegroundColor yellow
Add-NlbClusterPortRule -Protocol Tcp -Mode Multiple -Affinity Single -StartPort 80 -EndPort 80 -InterfaceName $InterfaceName -IP $ClusterPrimaryIP| Out-Null
#Adding port rules 443
Write-Host "Added port rule for https (tcp 443)" -ForegroundColor yellow
Add-NlbClusterPortRule -Protocol Tcp -Mode Multiple -Affinity Single -StartPort 443 -EndPort 443 -InterfaceName $InterfaceName -IP $ClusterPrimaryIP| Out-Null

Now that Port 80 and 443 are in the NLB we can add some nodes

As I added the -Affinity Single option keep in mind that your application support this option. Running websites parts from different servers is sometimes a pain for the developer.

The Affinity parameter is applicable only for the Multiple hosts filtering mode.

  • The None option specifies that multiple connections from the same client IP address can be handled by different cluster hosts (there is no client affinity). To allow Network Load Balancing to properly handle IP fragments, you should avoid using None when selecting UDP or Both for your protocol setting.
  • The Single option specifies that NLB should direct multiple requests from the same client IP address to the same cluster host. This is the default setting for affinity. You can optionally modify the NLB client affinity to direct all client requests from a TCP/IP Class C address range (instead of a single IP address) to a single cluster host by enabling the Network option instead of the Single option. This feature ensures that clients that use multiple proxy servers to access the cluster can have their TCP connections directed to the same cluster host.
  • The Network option specifies that NLB direct multiple requests from the same TCP/IP Class C address range to the same cluster host. Enabling Network affinity instead of Single affinity ensures that clients that use multiple proxy servers to access the cluster have their TCP connections directed to the same cluster host.
    The use of multiple proxy servers at the client’s site causes requests from a single client to appear to originate from different computers. Assuming that all of the client’s proxy servers are located within the same address range, Network affinity ensures that client sessions are properly handled. If you do not need this capability, use Single affinity to maximize scaled performance.

 

adding a second node is easy in Powershell or do this in the GUI add node and follow the steps.

$InterfaceName = “NLB”
$Node2Fqdn=”MVPNLB502.mvp.local”

Get-NlbCluster -HostName $env:COMPUTERNAME | Add-NlbClusterNode -NewNodeName $Node2Fqdn -NewNodeInterface $InterfaceName –Verbose

image

and as you can see if you don’t rename all the nic adapters it looks a bit messy. If you ever need to troubleshoot then it is easy to get NLB traffic and or other network traffic.

Now that the NLB cluster is ready we can use it for say a webserver. make sure the DNS Record is created in the DNS and If you are using multiple Cluster Virtual IP’s make sure they are also in the DNS. I always use an IP for the cluster and for the websites I use separate IP’s and all sites running on different IP’s / NLB VIP If I need to change some thing on the webserver it has no impact on all the other servers. I also Added a few more NLB nodes. that has already a configured website.

 

Now to get this to work with IIS

image

That is right page not found. Check the DNS see if the record is created. and make sure the website IIS is running on this IP

Go to the IIS manager and check the website bindings, default it is listening on all IP but this is not the behavior that I want I want a NLB. So we need to set the website on the NLB IP configured earlier.  When Having multiple IP on the NLB pick the right IP!

imageimageimage

Remember this you need to do this on all the Webservers!

image

For creating a NLB farm you can use my script that is posted in the TechNet gallery.

 Create a Windows Server 2016 NLB Network Load Balancing farm https://gallery.technet.microsoft.com/Create-a-Windows-Server-05a13f14

 

 

Flickr Tags: Windows Server 2016,CloudOS

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted October 27, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with , ,

Upgrading to Windows Server 2016 Failure or Success #Windows2016 #Server #CloudOS   Leave a comment

How ever Windows Server 2016 is supporting Rolling Upgrades Upgrading to Windows Server 2016 but this is only for a Cluster.

For other Servers you can upgrade your server or better reinstall. Bet you all choose for the Clean install.

image

Installation is the basic concept of getting the new operating system on your hardware. Specifically, a clean installation requires deleting the previous operating system. For information about installing Windows Server 2016, see System Requirements and Installation Information for Windows Server 2016. For information about installing other versions of Windows Server, see Windows Server Installation and Upgrade.

https://technet.microsoft.com/en-us/windows-server-docs/get-started/supported-upgrade-paths

Well in this case I try a sample Domain controller. This has several roles and is migrated from 2008<>2012<>2012R2 and now to 2016 so is this the best option ? Well this DC has ADFS,CA,had Identity Management for UNIX. So a not so typical DC.

image

So I removed all unneeded components like ADFS and the Identity Management for UNIX was not available on my DC. ( did not make a screenshot )

no mater what I did I need to deinstall the components the following article was a help https://msdn.microsoft.com/en-us/library/cc731178(v=ws.11).aspx

Well not totally the message was still there reboot / showdown nothing. Was there anything stuck on this DC ?

Well this the DC is getting replaced the fastest way Clean install. I build a new DC with Windows Server 2016 installed the AD role on the server. Important is moving the FSMO roles.

After I did a Forest prep and Domain prep I joined the Server to the domain.

Finding the FSMO roles

netdom query fsmo

image

Moving the Roles can done in the old way but also in powershell

Move-ADDirectoryServerOperationMasterRole -Identity “Your-DC” -OperationMasterRole SchemaMaster,RIDMaster,InfrastructureMaster,DomainNamingMaster,PDCEmulator

After I moved the FSMO roles and rebooted and Updated both DC’s I thought lets find why the upgrade won’t work on the original Domain controller.

After I started the upgrade I was shocked that the Upgrade had no Issues anymore. Leasons learned In case of Upgrading the Domain controller and you have some Issues : create a new DC and Join move the FSMO roles reboot the DC’s and try again if you really need this DC. but a Clean OS install is much faster and better but you will need to install some apps again or tools. maybe this is a good time to automate this. 

image

Installing or removing Identity Management for UNIX by using a command line

https://blogs.technet.microsoft.com/activedirectoryua/2016/02/09/identity-management-for-unix-idmu-is-deprecated-in-windows-server/

Quick reference table of supported upgrade paths from older Windows Server retail editions to Windows Server 2016 retail editions:

If you are running these versions and editions: You can upgrade to these versions and editions:
Windows Server 2012 Standard Windows Server 2016 Standard or Datacenter
Windows Server 2012 Datacenter Windows Server 2016 Datacenter
Windows Server 2012 R2 Standard Windows Server 2016 Standard or Datacenter
Windows Server 2012 R2 Datacenter Windows Server 2016 Datacenter
Hyper-V Server 2012 R2 Hyper-V Server 2016 (using Cluster OS Rolling Upgrade feature)
Windows Server 2012 R2 Essentials Windows Server 2016 Essentials
Windows Storage Server 2012 Standard Windows Storage Server 2016 Standard
Windows Storage Server 2012 Workgroup Windows Storage Server 2016 Workgroup
Windows Storage Server 2012 R2 Standard Windows Storage Server 2016 Standard
Windows Storage Server 2012 R2 Workgroup Windows Storage Server 2016 Workgroup

 

License conversion

You can convert Windows Server 2016 Standard (retail) to Windows Server 2016 Datacenter (retail).

You can convert Windows Server 2016 Essentials (retail) to Windows Server 2016 Standard (retail).

You can convert the evaluation version of Windows Server 2016 Standard to either Windows Server 2016 Standard (retail) or Datacenter (retail).

You can convert the evaluation version of Windows Server 2016 Datacenter to Windows Server 2016 Datacenter (retail).

 

Upgrading to Windows Server 2012 R2

For details, including important caveats and limitations on upgrade, license conversion between editions of Windows Server 2012 R2, and conversion of evaluation editions to retail, see Upgrade Options for Windows Server 2012 R2.

Quick reference table of supported upgrade paths from older Windows Server retail editions to Windows Server 2012 R2 retail editions:

If you are running: You can upgrade to these editions:
Windows Server 2008 R2 Datacenter with SP1 Windows Server 2012 R2 Datacenter
Windows Server 2008 R2 Enterprise with SP1 Windows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Windows Server 2008 R2 Standard with SP1 Windows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Windows Web Server 2008 R2 with SP1 Windows Server 2012 R2 Standard
Windows Server 2012 Datacenter Windows Server 2012 R2 Datacenter
Windows Server 2012 Standard Windows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Hyper-V Server 2012 Hyper-V Server 2012 R2

License conversion

You can convert Windows Server 2012 Standard (retail) to Windows Server 2012 Datacenter (retail).

You can convert Windows Server 2012 Essentials (retail) to Windows Server 2012 Standard (retail).

You can convert the evaluation version of Windows Server 2012 Standard to either Windows Server 2012 Standard (retail) or Datacenter (retail).

Use Full Links :

Upgrade and conversion options for Windows Server 2016 https://technet.microsoft.com/en-us/windows-server-docs/get-started/supported-upgrade-paths

Release Notes: Important Issues in Windows Server 2016 https://technet.microsoft.com/en-us/windows-server-docs/get-started/windows-server-2016-ga-release-notes

What’s New in Windows Server 2016 https://technet.microsoft.com/en-us/windows-server-docs/get-started/what-s-new-in-windows-server-2016-technical-preview-5

Server role upgrade and migration matrix for Windows Server 2016 https://technet.microsoft.com/en-us/windows-server-docs/get-started/server-role-upgradeability-table?f=255&MSPPError=-2147217396

Cluster operating system rolling upgrade https://technet.microsoft.com/windows-server-docs/failover-clustering/cluster-operating-system-rolling-upgrade

 

 

Follow Me on Twitter @ClusterMVP

Follow My blog https://robertsmit.wordpress.com

Linkedin Profile Http://nl.linkedin.com/in/robertsmit

Google Me : https://www.google.nl

Bing Me : http://tinyurl.com/j6ny39w

LMGTFY : http://lmgtfy.com/?q=robert+smit+mvp+blog

Posted October 13, 2016 by Robert Smit [MVP] in Windows Server 2016

Tagged with

  • Twitter

  • %d bloggers like this: