Tuesday, 15 January 2019

Cluster OS Rolling Upgrades in Windows Server 2016

Cluster OS Rolling upgrade is a new feature in Windows Server 2016 failover clustering. If a Windows server 2012 failover clusters running the Hyper-V or Scale-Out File Server roles, you can add Windows Server 2016 nodes without taking the failover cluster offline. In earlier Windows Server versions, you had to create a new cluster with the new operating system on all nodes, and then you had to move the clustered services over to the new cluster. This created downtime and made it difficult to quickly complete upgrades. With Windows Server 2016, cluster nodes do not require additional hardware to upgrade, you can take one node at a time offline, upgrade the operating system, and bring the node back into the existing cluster. This changes the cluster to a mixed operating system mode. The process is fully reversible- Windows Server 2016 nodes can be removed from the cluster and Windows Server 2012 R2 nodes can be added to the cluster in this mixed mode. After you upgrade all nodes, you can change the functional level of the entire cluster from the Windows Server 2012 R2 version to Windows Server 2016 version.
Cluster OS Rolling Upgrade Process
This section describes the workflow for performing Cluster OS Rolling Upgrade. Image copy from TechNet.
Before you start Cluster OS Rolling Upgrades, first we should backup cluster database and workload data. Then, verify that Cluster Aware Updates (CAU) is currently running by using Get-CauRun cmdlet. If CAU is currently running, use CAUStop-CauRun cmdlet to stop Cluster Aware Update (CAU).
Stopping Cluster Aware Update (CAU):
If you are running Cluster Aware Update (CAU), verify use the PowerShell, Get-CauRun cmdlet. To stop CAU use the PowerShell, Stop-CauRun cmdlet. But in this demo, you have not installed Cluster Aware Updates (CAU). So it’s WARNING: No Updating Run is currently in progress on cluster.
Verify that all cluster nodes state are Up before remove Node from the Cluster:
Using the cmdlet, Get-ClusterNode to verify the cluster nodes State.
Pause Node | Drain Roles Hyper-V nodes from the cluster:
In the Failover Cluster Manager Windows, select Roles and make sure all the VMs are migrated to another node in the cluster. Here, you are removing KTM-HOST1 node from the cluster.
In the Failover Cluster Manager Windows, in the left-hand pane, select Nodes. In the middle pane, right click on the Node, KTM-HOST1, then select Pause | Drain roles option to drain the node.
Evict the Node from the Cluster:
Once the node is drainedright-click on the node, KTM-HOST1, select More Actions and then click Evict to remove the selected node from the cluster.
In the Evict node KTM-HOST1 dialog box, Are you sure you want to evict node KTM-HOST1 from the cluster? Click Yes.
In the cluster event details, verity that the cluster node KTM-HOST1 has been evicted from the failover cluster.
Clean OS Install:
First remove the currently evicted node from the domain.
Clean Installation of Windows Server 2016:
Format the system drive of the evicted node and perform a clean Installation of Windows Server 2016.
Configure Server Name and Add the Server to the Domain:
Configure the server name as per your previous name and Add the server to the Domain.
Install Hyper-V Role, Multipath I/O, Failover Clustering Feature:
After you have joined KTM-HOST1 to the domain, msserverpro.com, you can install Hyper-V roleMultipath I/O, and Failover Clustering feature on KTM-HOST1.


Configure Network and Storage Connectivity:
Configure network connectivity and virtual switch as per previous configuration.
Connect to Shared Storage:
Connect the server to shared storage as per previous configuration. For share storage connection I will share on the coming article.
Add the Node to the original Cluster:
After completed installation and configurations, it’s time to add Hyper-V Host to the failover clustering.
In the Failover Cluster Manager Windows, in the left side, right click on Nodes, select Add Node…
On the Before You begin page, click Next.
On the Selected Servers page, type the required server name under Enter server name box and click Add
On the Validation Warning page, select No, I do not require support from Microsoft for this cluster, and therefore do not want to run the validation tests. When I click Next, continue adding the nodes(s) to the cluster and click Next.
On the Confirmation page, make sure check mark is selected in Add all eligible storage to the cluster and click Next.
On the Configure the Cluster page, please wait while the cluster is configured….
On the summary page, click View report and click Finish.
Verify the KTM-HOST1 Operating System is Microsoft Windows Server 2016 Datacenter and KTM-HOST2 Operating System is Microsoft Windows Server 2012 R2 Datacenter.

On the Failover Cluster Manager Windows, click Cluster Events to view the cluster Event Details message, shows that Failover Cluster runs in mixed mode, which is compatible version of the cluster service software. It is recommended that the same version of the cluster service software be installed on all nodes in the cluster”
Verify the ClusterFunctionalLevel, from a Windows Server 2016 cluster node that belongs to a failover cluster:
Verify the OS Version and the current ClusterFunctionalLevelIf the ClusterFunctionalLevel value set to 8, then the cluster at Windows Server 2012 R2.


Now Remove NODE 2, Windows Server 2012 R2 from the cluster:
Ensure that the VMs are migrated from NODE2 to NODE1 in the failover cluster before you can evict NODE 2 from the failover cluster.

Verify all the VMs are in NODE1, KTM-HOST1.
Suspend the node from the cluster using PowerShell:

Remove the node from the cluster using PowerShell:
In the Cluster Events Details, make sure that “Cluster node KTM-HOST2 has been evicted from the failover cluster”.
Remove the Server from the Domain, Clean Installation of Windows Server 2016, and Configure Server Name and Add the Server to the Domain, msservepro.com.
Add the Node to the original Cluster (node rejoins the cluster) using PowerShell
We can also add the node to the cluster by using the PowerShell cmdlet Add-ClusterNode.


After the Windows Server 2016 node is successfully added to the cluster, you can (optionally) move some of the cluster VMs to the newly added node in order to rebalance the workload across the cluster using Move-ClusterVirtualMachineRolecmdlet given below: 
Move-ClusterVirtualMachineRole -Name KTM-DB1 -Node KTM-HOST2
Updating the Cluster Functional Level:
Until the Update-ClusterFunctionalLeve cmdlet to run, cluster runs in mixed mode, this process is fully reversible and Windows Server 2012 R2 nodes can be added to this cluster and Windows Server 2016 nodes can be removed.
ClusterFunctionalLevel
8= Windows Server 2012 R2 Functional Level (compatibility or mixed-OS mode)
9= Windows Server 2016 Functional Level
Use Get-Cluster | Select ClusterFunctionalLevel to display state
Once all cluster members are running Windows Server 2016, use Update-ClusterFunctionalLevel PowerShell cmdlet (one-way trip) is run, new features are available.

Finally, Microsoft recommends finishing this Cluster OS Rolling upgrade process within 1 month. That’s because having this mixed-OS mode is not optimized in terms of performance. For more details you can check in the TechNet; https://technet.microsoft.com/en-us/windows-server-docs/failover-clustering/cluster-operating-system-rolling-upgrade

 

Summary:
Windows Server 2016 makes upgrading clusters easy with rolling upgrades. I hope this article help you Windows Server 2016 Cluster OS Rolling Upgrade configuration.

Friday, 11 January 2019

How To Shrink A Volume In Windows Server 2016

Shrink A Volume

We’ll begin by opening Server Manager, selecting the Tools menu, followed by Computer Management as shown below.
Server Manager Computer Management
When the Computer Management window opens, select Disk Management which can be found underneath Storage. From here simply right click the disk that you want to shrink, followed by “Shrink Volume…”.
Disk Management Shrink Volume
A new window will appear allowing you to adjust how much space you want to free up. In this case, I shrink enough space so that the total size after the shrink is 20GB. The amount available to shrink depends on how much data is detected on the disk, if you’re not able to shrink as much as you like be sure that you have deleted enough data first.
Shrink Disk
After the shrinking process has completed we’ll be able to see that our disk now has unallocated space available.
Unallocated Disk Space
The unallocated space can now either be used as a new partition, or depending on your virtualization software can even be reclaimed allowing you to decrease the size of the virtual disk if this action is supported.

Creating and managing volumes

You can add a partition in Windows Server 2016 R2 by following these steps:
  1. Click 'Start' then 'Administrative Tools' and 'Computer Management’.
  2. Go to 'Disk Management’.
  3. Check to see if there's free disk space available.
  4. Right-click on the 'Unallocated' space and Select 'New Simple Volume’.
  5. Click 'Next’.
  6. Choose what size the partition should be and click 'next’.
  7. Choose a drive letter and click 'next’.
  8. Here you can choose to format the new partition with either FAT32 or NTFS. We advise you choose NTFS as this is the better filesystem. The allocation unit size can be set to default or a custom unit size. You can enter a name for the partition under ‘Volume label’.
  9. Check the 'Perform a quick format’ box and click 'next'.
  10. Review the configuration and click 'finish' to complete the wizard.

Sunday, 30 December 2018

Managing and configuring Nano Server

Managing and configuring Nano Server

You can perform only the most fundamental management tasks interactively on Nano Server. After you have signed in, the Nano Server Recovery Console appears. This identifies:

            The computer name

            The workgroup or domain name

            The installed operating system

            Local data, the local time, and the time zone

            The current network configuration

Configuring networking

You can change the basic network configuration by using the Tab key to navigate to Networking and
PROHIBITED
then pressing Enter. You can then select the appropriate network adapter from the list by using the cursor keys to navigate to the correct adapter and then pressing Enter.

The current network settings are displayed. You can press either F11 to configure IPv4 settings or F12 for IPv6 settings. If you choose to configure IPv4, use the F4 key to switch the settings. For example, to enable or disable DHCP, press F4. To enter a manual IPv4 configuration, disable DHCP and then use the number keys to type a suitable IP address, subnet mask, and default gateway. Press Enter twice to update the configuration. Press Esc repeatedly to return to the main menu.

Configuring the firewall


You might need to configure firewall settings to enable remote management. From the main Nano Server Recovery Console, press the Tab key to navigate to Firewall, and then press Enter. A list of firewall rules is displayed. Use the cursor keys to navigate up and down the list and press Enter for a rule you want to configure.

For example, to enable remote event log management, locate the remote event log management (RPC)
rule and press Enter. Press F4 to Enable/Disable. Press ESC and select the next rule, and then repeat the


procedure. When you have configured all rules, press ESC to return to the main menu.
USE
Ongoing management



Once you have configured the networking settings and enabled the appropriate remote management firewall ports for inbound communications, you can manage the Nano Server remotely by using either Server Manager, Windows PowerShell, or any other management tool by using the Connect to option to select the Nano Server. Typical management tasks include:

     Adding the computer to a domain

     Adding roles and features to the server
the domain and using that data blob when joining the domain. The basic steps for this follow.      ONLY
Adding the Nano Server to a domain online

You perform an online domain join by harvesting a domain data blob from a computer already joined to

.

1.   Harvest the domain data blob from a computer running Windows Server 2016 that is already joined

to the domain by using the following command:

Djoin.exe /provision /domain <domain name> /machine <Nano Server machine name> /savefile <path and name of blob file>

2.   Enable File and Printer Sharing on the Nano Server.

a.   Using Windows PowerShell Remoting, connect to the Nano Server with the following commands from a Windows PowerShell session running as administrator:



Set-Item WSMan:\localhost\client\TrustedHosts “<Nano Server IP address>”




$ipaddress = “<Nano Server IP address>”
STUDENT


Enter-PSSession -ComputerName $ipaddress -Credential $ipaddress\Administrator









b.  Provide the Administrator password and set the firewall rule to enable file and printer sharing:









Netsh advfirewall firewall set rule group=”File and Printer Sharing” new




enable=yes







3.   Copy the data blob file to the Nano Server by using the following commands:
USE




Net use z: \\<Nano Server IP address>\c$



Md z:\temp



copy <name of blob file> z:\temp








4.         Using the Windows PowerShell Remoting session, join the domain by using the following command:

Djoin.exe /requestodj /loadfile c:\temp\<name of blob file> /windowspath c:\windows /localos

5.   Use the following commands to restart the Nano Server computer and exit the Windows PowerShell Remoting session:


shutdown /r /t
5


Exit-

PSSession

PROHIBITED