This topic describes Updating Run options that can be configured for a Cluster-Aware Updating (CAU) Updating Run. 使用 CAU UI 或 CAU Windows PowerShell cmdlet 来应用更新或者配置自我更新选项时,可以配置这些高级选项。
大多数配置设置可以另存为称为“更新运行配置文件”的 XML 文件,以后执行更新运行时可以重复使用该文件。 还可以在许多群集环境中使用 CAU 提供的更新运行选项的默认值。
你可以为每个更新运行指定其他选项,此方面的信息以及更新运行配置文件的信息,请参阅以下部分(本主题后面提供):
请求更新运行时指定的选项;使用可在更新运行配置文件中设置的更新运行配置文件选项
下表列出了你可以在 CAU 更新运行配置文件中设置的选项。
Note
若要设置“PreUpdateScript”或“PostUpdateScript”选项,请确保已安装 Windows PowerShell 和 .NET Framework 4.6 或 4.5,并且已在群集中的每个节点上启用 PowerShell 远程处理。 有关详细信息,请参阅群集感知更新的要求和最佳做法中的“配置用于远程管理的节点”。
Option | Default value | Details |
---|---|---|
StopAfter | Unlimited time | 时间(分钟),如果未完成,则经过该时间之后停止更新运行。 Note: If you specify a pre-update or a post-update PowerShell script, the entire process of running scripts and performing updates must be complete within the StopAfter time limit. |
WarnAfter | 默认情况下不显示警告 | 时间(分钟),如果更新运行(包括更新前脚本和更新后脚本(如果已配置))未完成,则经过该时间之后显示警告。 |
MaxRetriesPerNode | 3 | 每个节点将重试更新过程(包括更新前脚本和更新后脚本(如果已配置))的最大次数。 最大值为 64。 |
MaxFailedNodes | 对于大多数群集而言,它是一个大约为群集节点数三分之一的整数 | 更新可能会失败(原因是节点失败或者群集服务停止运行)的最大节点数。 如果多个节点失败,则停止更新运行。 有效值范围为群集节点数减 0 到减 1。 |
RequireAllNodesOnline | None | 指定更新开始之前所有节点都必须联机且可以访问。 |
RebootTimeoutMinutes | 15 | CAU 给重新启动节点(如果有必要重新启动)以及启动所有自动启动服务留出的时间(分钟)。 如果在此时间范围内重新启动过程未完成,则将该节点上的更新运行标记为失败。 |
PreUpdateScript | None | 更新开始之前以及节点进入维护模式之前,要在每个节点上运行的 PowerShell 脚本的路径和文件名。 The file name extension must be .ps1, and the total length of the path plus file name must not exceed 260 characters. 最佳做法是,应该将脚本放置在群集存储中的磁盘上,或者放置在可用性高的网络文件共享上,以确保所有群集节点始终都可以对该脚本进行访问。 如果将脚本放置在网络文件共享上,请确保为 Everyone 组配置对该文件共享的读取权限,并限制写入访问权限,以防止未经授权的用户篡改文件。 If you specify a pre-update script, be sure that settings such as the time limits (for example, StopAfter) are configured to allow the script to run successfully. 这些限制跨运行脚本和安装更新的整个过程,而不仅仅是安装更新的过程。 |
PostUpdateScript | None | 更新完成之后(节点离开维护模式之后),要运行的 PowerShell 脚本的路径和文件名。 The file name extension must be .ps1 and the total length of the path plus file name must not exceed 260 characters. 最佳做法是,应该将脚本放置在群集存储中的磁盘上,或者放置在可用性高的网络文件共享上,以确保所有群集节点始终都可以对该脚本进行访问。 如果将脚本放置在网络文件共享上,请确保为 Everyone 组配置对该文件共享的读取权限,并限制写入访问权限,以防止未经授权的用户篡改文件。 If you specify a post-update script, be sure that settings such as the time limits (for example, StopAfter) are configured to allow the script to run successfully. 这些限制跨运行脚本和安装更新的整个过程,而不仅仅是安装更新的过程。 |
ConfigurationName | 仅当运行脚本时此设置才有效。 If you specify a pre-update script or a post-update script, but you do not specify a ConfigurationName, the default session configuration for PowerShell (Microsoft.PowerShell) is used. |
Specifies the PowerShell session configuration that defines the session in which scripts (specified by PreUpdateScript and PostUpdateScript) are run, and can limit the commands that can be run. |
CauPluginName | Microsoft.WindowsUpdatePlugin | 配置群集感知更新以用于预览更新或执行更新运行的插件。 有关详细信息,请参阅群集感知更新插件工作原理。 |
CauPluginArguments | None | A set of name=value pairs (arguments) for the updating plug-in to use, for example: Domain=Domain.local These name=value pairs must be meaningful to the plug-in that you specify in CauPluginName. To specify an argument using the CAU UI, type the name, press the Tab key, and then type the corresponding value. 再次按 Tab 键以提供下一个参数。 Each name and value are automatically separated with an equal (=) sign. 多个对用分号自动分隔。 For the default Microsoft.WindowsUpdatePlugin plug-in, no arguments are needed. 但是,可以指定一个可选参数,例如,指定一个标准的 Windows 更新代理查询字符串,用于筛选插件应用的更新集。 For a name, use QueryString, and for a value, enclose the full query in quotation marks. 有关详细信息,请参阅群集感知更新插件工作原理。 |
请求更新运行时指定的选项
下表列出了请求更新运行时可以指定的选项(不是更新运行配置文件中的选项)。 有关在更新运行配置文件中可以设置的选项的信息,请参阅上表。
Option | Default value | Details |
---|---|---|
ClusterName | None Note: This option must be set only when the CAU UI is not run on a failover cluster node, or you want to reference a failover cluster different from where the CAU UI is run. |
要在其上执行更新运行的群集的 NetBIOS 名称。 |
Credential | 当前帐户凭据 | 将执行更新运行的目标群集的管理凭据。 如果从对群集具有管理权限的帐户启动 CAU UI(或者在使用 CAU PowerShell cmdlet 的情况下打开 PowerShell 会话),则你可能已具有所需的凭据。 |
NodeOrder | 默认情况下,CAU 从拥有群集角色数量最少的节点开始,然后是数量第二少的节点,依此类推。 | 群集节点的名称,顺序为应对它们进行更新的顺序(如果可能)。 |
使用更新运行配置文件
可将每个更新运行与特定的更新运行配置文件进行关联。 The default Updating Run Profile is stored in the %windir%\cluster folder. 如果你要以远程更新模式使用 CAU UI,则可以在应用更新时指定一个更新运行配置文件,或者使用默认的更新运行配置文件。 如果你要以自我更新模式使用 CAU,则可以在配置自我更新选项时,从指定的更新运行配置文件中导入设置。 在这两种情况下,都可以根据需要覆盖更新运行选项的显示值。 如果需要,可以使用相同或不同的文件名将更新运行选项另存为更新运行配置文件。 下一次当你应用更新或者配置自我更新选项时,CAU 将自动选择上次所选择的更新运行配置文件。
可以在 CAU UI 中选择“创建或修改更新运行配置文件”来修改现有的更新运行配置文件或创建新的更新运行配置文件。
下面是有关使用更新运行配置文件的一些重要说明:
- 更新运行配置文件不会存储管理凭据等特定于群集的信息。 如果你要以自我更新模式使用 CAU,则更新运行配置文件也不存储自我更新计划信息。 这样便可在指定类的所有故障转移群集之间共享更新运行配置文件。
- 如果你使用更新运行配置文件配置自我更新选项,然后使用更新运行选项的不同值修改该配置文件,则自我更新配置不会自动更改。 若要应用新的更新运行设置,必须再次配置自我更新选项。
- The Run Profile Editor unfortunately doesn't support file paths that include spaces, such as C:\Program Files. As a workaround, store your pre and post update scripts in a path that doesn't include spaces, or use PowerShell exclusively to manage Run Profiles, putting quotes around the path when running Invoke-CauRun.
Windows PowerShell 等效命令
You can import the settings from an Updating Run Profile when you run the Invoke-CauRun, Add-CauClusterRole, or Set-CauClusterRole cmdlet.
The following example performs a scan and a full Updating Run on the cluster named CONTOSO-FC1, using the Updating Run options that are specified in C:\Windows\Cluster\DefaultParameters.xml. 为剩余的 cmdlet 参数使用默认值。
$MyRunProfile = Import-Clixml C:\Windows\Cluster\DefaultParameters.xml
Invoke-CauRun –ClusterName CONTOSO-FC1 @MyRunProfile
通过更新运行配置文件,你可以使用异常管理、时间限制和其他操作参数的一致性设置反复更新某个故障转移群集。 由于这些设置通常特定于某一类故障转移群集 - 例如“所有 Microsoft SQL Server 群集”或“我的业务关键型群集”- 你可能需要根据每个更新运行配置文件可以与之配合使用的故障转移群集种类来命名该配置文件。 此外,你可能需要在可由 IT 组织中特定类的所有故障转移群集访问的文件共享上管理更新运行配置文件。