Perform the post operating system upgrade steps on your Azure Stack HCI via PowerShell

Applies to: Azure Stack HCI, versions 23H2 and 22H2

This article describes how to perform the post-OS upgrade tasks after you upgraded the Azure Stack HCI Operating System (OS) to new version. The post-upgrade tasks described in this article are required for the stability of the cluster.

Throughout this article, we refer to Azure Stack HCI, version 23H2 as the new version and Azure Stack HCI, version 22H2 as the old version.

Complete prerequisites

Before you begin, make sure that:

Step 1: Connect to the Azure Stack HCI cluster

Follow these steps on your client to connect to one of the servers of your Azure Stack HCI cluster.

  1. Run PowerShell as Administrator on the client that you're using to connect to your cluster.

  2. Open a remote PowerShell session to a server on your Azure Stack HCI cluster. Run the following command and provide the credentials of your server when prompted:

    $cred = Get-Credential
    Enter-PSSession -ComputerName "<Computer IP>" -Credential $cred 
    

    Here's a sample output:

    PS C:\Users\Administrator> $cred = Get-Credential
    
    cmdlet Get-Credential at command pipeline position 1
    Supply values for the following parameters:
    Credential
    PS C:\Users\Administrator> Enter-PSSession -ComputerName "100.100.100.10" -Credential $cred 
    [100.100.100.10]: PS C:\Users\Administrator\Documents>
    

Step 2: Verify the status of upgrade

To make sure that the upgrade was complete and there's a new OS running on the cluster, run the Get-CauRun cmdlet:

Get-CauRun -ClusterName <ClusterName>

Here's a sample output:

RunId                   : <Run ID> 
RunStartTime            : 10/13/2019 1:35:39 PM 
CurrentOrchestrator     : NODE1 
NodeStatusNotifications : { 
Node      : NODE1 
Status    : Waiting 
Timestamp : 10/13/2019 1:35:49 PM 
} 
NodeResults             : { 
Node                     : NODE2 
Status                   : Succeeded 
ErrorRecordData          : 
NumberOfSucceededUpdates : 0 
NumberOfFailedUpdates    : 0 
InstallResults           : Microsoft.ClusterAwareUpdating.UpdateInstallResult[] 
}

Step 3: Perform the post-OS upgrade steps

Once the new OS is installed, you need to upgrade the cluster functional level and upgrade the storage pool version using PowerShell in order to enable new features.

Important

  • Post-OS upgrade steps are essential for the stability and performance of your Azure Stack HCI cluster. Make sure to follow these steps after the OS upgrade.
  1. Upgrade the cluster functional level.

    Warning

    After you upgrade the cluster functional level, you can't roll back to the previous operating system version.

    We recommend that you upgrade the cluster functional level as soon as possible. Skip this step if you installed the feature upgrades with Windows Admin Center and checked the optional Update the cluster functional level to enable new features checkbox.

    1. Run the following cmdlet on any server in the cluster:

      Update-ClusterFunctionalLevel      
      
    2. You see a warning that you can't undo this operation. Confirm Y that you want to continue.

  2. Upgrade the storage pool.

    1. After the cluster functional level is upgraded, use the following cmdlet to identify the FriendlyName of the storage pool representing your cluster.

      Get-StoragePool
      

      In this example, the FriendlyName is S2D on hci-cluster1.

    2. Run the Update-StoragePool cmdlet to upgrade the storage pool version.

       Update-StoragePool -FriendlyName "S2D on hci-cluster1"
      
    3. Confirm the action when prompted. At this point, new cmdlets are fully operational on any server in the cluster.

  3. (Optional) Upgrade VM configuration levels. You can optionally upgrade VM configuration levels by stopping each VM using the Update-VMVersion cmdlet and then starting the VMs again.

    1. Verify that the upgraded cluster functions as expected.

      Roles should fail over correctly and, if VM live migration is used on the cluster, VMs should successfully live migrate.

    2. Validate the cluster.

      Run the Test-Cluster cmdlet on one of the servers in the cluster and examine the cluster validation report.

  4. Install the latest drivers from your hardware partner, as some drivers may revert to an older inbox driver version resulting in unexpected behaviors.

You're now ready to apply the solution upgrade.

Next steps