You can use Server Automation to
automate patching of operating system servers in a Microsoft Hyper-V
cluster, without affecting the data availability groups operations. Server Automation enables
you to automate the patching process using a number of Tasks which
manage the cluster as it is being patched. The Tasks prepare
nodes for patching by pausing them and moving all virtual machines,
groups, and resources off the nodes. The required patches are then
applied to the operating system as part of the automation flow. After
the operating system is patched, the automation flow restores the
nodes to their original pre-patching state.
Before you begin
- Control scripts must be installed on each of the endpoints that
you are patching. Use Server Automation Task 110
Install Windows
Cluster Control Application
to install the control scripts.
- The Powershell feature must be installed on each node that you
are patching. By default this is installed on all instances of Microsoft
Server from 2008 Release 2 onwards, except for core installations.
For core installations, use the following links to install Powershell:
About this task
There are two phases in the automated patching flow. In the
first phase, one node or group of nodes is patched. In the second
phase, the second node of group of nodes is patched. By managing the
patching in this way, the cluster remains operational at all times.
In phase one, you run a sequence of Tasks to
manage the patching of the first node or group of nodes in the cluster.
Then you repeat these same steps on the second node or nodes in the
cluster. The following operating systems are supported:
- Windows 2012
- Windows 2012 Release 2
- Windows 2008 Release 2 and later
To automate the patching process, you run an automation plan.
The automation plan contains a number of steps, each of which represents
a stage in patching process. You can create a new automation plan
or modify an existing plan, such as an out-of-the-box sample plan
by changing some of the steps.
Procedure
- Add Task ID 117
Pre-patching
Task for clustered Microsoft HyperVisor Servers
to the plan
as step 1 in the plan. When you are running the plan, target the first
node or group of nodes in the cluster. This
Task performs
the following functions:
- Creates a file detailing all groups and virtual machines in the
cluster, including what nodes they are on and the states of each resource
in the cluster. If there are empty groups (groups with no resources)
in the cluster, a second file is created detailing these groups.
- Pauses the node.
- Checks to see if there are other nodes available to which to move
the virtual machines. If other nodes are available, virtual machines
are moved using the method you select (either live migrated or quick
migrated). If the virtual machines are set up to be online only on
the current node (no other possible owners set) the virtual machine
is taken offline. If the virtual machine has other possible owners
but these owners are not available, the Task fails
because it is not possible to move the virtual machine off the node.
- Moves groups that have other available owners. If no other owners
are available to take groups, the Task fails.
Any groups set up to be online only on the current node (only target
set as possible owner of the group or at least one resource in the
group) are the taken offline.
- Takes any empty groups offline.
- Checks to ensure the node is paused and has no active groups remaining
and is a state suitable for patching the server operating system.
Note: This Task does
not move any groups that were offline before the Task was
run.
- Add the required operating system patching Fixlet, Task, or Baseline as
the second step in the plan. When you are running the plan, target
the first node or group of nodes in the cluster.
- Add Server Automation Task
126
Restart Endpoint and Wait for Restart to Complete
to restart
the first node or group of nodes in the cluster. When you are running
the plan, target the first node or group of nodes in the cluster.
- Add the post patching
Task 129 Post Patching task
for Microsoft Server Clusters (Server 2008 R2 onwards including Hyper-V
Clusters)
to restore the node or nodes to their original
state. After this Task has
run successfully, the first node or nodes in the cluster are patched
and back up and running. When you are running the plan, target the
first node or group of nodes in the cluster.This
Task performs
the following functions:
- Resumes the node.
- If the cluster detail file is found on the targeted endpoints,
the Task checks
this file and moves any virtual machines and groups back on to the
node if they were moved off the node during patching. The Task then
brings back online any empty groups or groups which had the target
node as the only possible owner of the group before patching.
- Add four more steps to the plan, to repeat steps 1 to 4
for the second node or group of nodes. For each of these steps, you
need to target the second node or nodes in the cluster.