In Azure, SAP workload deployment can either be regional or zonal depending on the availability and resiliency requirements of the SAP applications. For regional deployment, the availability sets are used to deploy SAP workloads within a single zone or datacenter in a region. Whereas for zonal deployment, availability zones are used to deploy SAP workloads across zones within a region and in some case in combination with Availability Set for SAP application server layer.
Recently, Microsoft announced support for a new availability option for SAP workload called Virtual Machine Scale Set with Flexible Orchestration.
Flexible Orchestration in Virtual Machine Scale Sets provides a way to attain optimal availability for SAP workloads, like other deployment frameworks as availability sets and availability zones. When deploying a flexible scale set with a platformFaultDomainCount=1, you have the option to either create the scale set within a region or expand it across multiple availability zones. Before proceeding further, it is important to refer to the deployment guide for virtual machine scale sets for SAP workloads to ensure that all important considerations and supported options are evaluated.
For new SAP deployments, you have the option to directly deploy SAP VMs in a flexible scale set with platformFaultDomainCount=1 (FD=1). But for existing SAP systems that are not currently deployed using the flexible scale set framework, you have the option to migrate the SAP VMs to a flexible scale set with FD=1.
This blog post outlines the details on the process of migrating existing SAP workloads that are deployed in an availability set or availability zone to a flexible scale set with FD=1 deployment option.
INFORMATION
Now with the different availability options on Azure for SAP workload, such as virtual machine scale set, availability zone, and availability set, we have compiled a comparison of different deployment types. This comparison shows how these options can be applied across different Azure regions, including across zones, within a single zone, or in a region without zones, to configure a highly available SAP workload. As a result, we have updated our high availability architecture and scenarios for SAP NetWeaver document, encompassing this discussion.
To migrate VMs of an existing SAP system to VMSS Flex, a new PowerShell cmdlet Move-AzSAPVMToVMSSFlex is developed. It is advised to refer to Important consideration of Flexible virtual machine scale sets for SAP workload document before you use cmdlet.
It is important to note that open-source PowerShell cmdlet is designed ONLY for flexible scale set with SAP workload scenarios. Prior to executing the migration and scripts on the productive SAP system, it is crucial to conduct thorough testing on the test VMs. Ideally, the test VMs should also have an SAP system installed. It is important to ensure that the test VMs are configured identically to the productive VMs. This includes having the same VM SKU, disk types, disk numbers and sizes, number of NIC cards, subscription, load balancers, and other relevant factors. If possible, it is recommended to place the test VMs within the same subnet and resource groups as the productive VMs. Additionally, it is essential to have a well-implemented and tested backup/restore procedure in place.
The cmdlet Move-AzSAPVMToVMSSFlex will perform necessary prechecks to ensure that the SAP VM migration is possible, and that final configuration is supported by Microsoft. The Azure region, resource group, disk names, NIC card(s), and load balancer configuration of SAP VM(s) will remain unchanged even after migration using the cmdlet.
DISCLAIMER: THE SCRIPT IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
Depending on the deployment of your current SAP workload (whether it uses availability sets or availability zones), you have the option to migrate to a flexible scale set with FD=1. The following matrix provides details on the various migration options available for transitioning to a flexible scale set.
System type |
Source VM |
Target VM (flexible scale set with FD=1) |
Azure Region |
Azure storage |
Disk migration method |
Scenario 1: HA SAP systems |
Regional VM* (deployed in availability set) |
Zonal VM in flexible scale set, span across zones |
Applicable in region with zones |
Managed disk v1 |
Create zonal disk from snapshot. |
Scenario 2: HA SAP systems |
Zonal VM (deployed in Availability zone) |
Zonal VM in flexible scale set, span across zones |
Applicable in region with zones |
Managed disk v1 & v2 |
Create zonal disk from snapshot. In the case that VM stays in the same zone, zonal disks are reattached.
|
Scenario 3: non-HA SAP systems |
Regional VM* (deployed in availability set) |
Zonal VM in scale set in one zone |
Applicable in region with zones |
Managed disk v1 |
Create zonal disk from snapshot. |
Scenario 4: non-HA SAP systems |
Zonal VM (deployed in availability zone) |
Zonal VM in scale set in one zone |
Applicable in region with zones |
Managed disk v1 & v2 |
Create zonal disk from snapshot. In the case that VM stays in the same zone, zonal disks are reattached.
|
Scenario 5: |
Regional VM* (Deployed in availability set) |
Regional VM* in scale set |
Applicable in region with no zones |
Managed disk v1 |
Attach existing regional disks. |
IMPORTANT NOTES:
Scenario 1: The source SAP system, which is highly available, is initially deployed regionally using an availability set. It is then migrated to a scale set with FD=1, spanning across availability zones. It's important to note that this entire migration process takes place within the same region, with managed disk v1 being attached to the system. Here are few considerations for deploying across availability zones.
Scenario 2: The source SAP system, which is highly available, is initially deployed zonally using availability zone. It is then migrated to scale set with FD=1, spanning across availability zones. It’s important to note that this entire migration process takes place within the same region, with managed disk v1 being attached to the system.
Scenario 3: The source SAP system, which is non-HA or non-production, is initially deployed regionally using availability set. It is then migrated to scale set with FD=1 in a single zone of a region. It’s important to note that this entire migration process takes place within the same region, with managed disk v1 being attached to the system.
Scenario 5: The source SAP system, which is non-HA or non-production, is initially deployed regionally using availability set. It is then migrated to scale set with FD=1 in a region with no zones. It’s important to note that this entire migration process takes place within the same region, with managed disk v1 being attached to the system.
Following action is performed on executing Move-AzSAPVMToVMSSFlex command:
If source VM is zonal VM , and VM stays in the same zone, zonal disks are reattached.
INFORMATION: You can check Move-AzSAPVMToVMSSFlex cmdlet code in PowerShell module SAPAzurePowerShellModules located in PowerShell Gallery.
$PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
----- ----- ----- --------------- ----------
7 3 4
Install the latest version of Az PowerShell modules, by running command:
Install-Module -Name Az -Repository PSGallery -Force
This is described in the official guide Install the Azure Az PowerShell module.
You will use PowerShell cmdlet Move-AzSAPVMToVMSSFlex to move VMs to the flexible scale set. This cmdlet is part of the SAPAZurePowerShellModules module. You can install SAPAZurePowerShellModules module from PowerShell Gallery by running this PowerShell command:
Install-Module SAPAZurePowerShellModules -Repository PSGallery -Force -Verbose
Set-ExecutionPolicy Unrestricted
Select-AzSubscription -SubscriptionName 'your-subscription-name'
Or
Select-AzSubscription -SubscriptionId 'your-subscription-id'
It's not possible to create flexible virtual machine scale set without a scaling profile through the Azure Portal. However, you can use an alternative client to create a scale set without a scaling profile.
To create a zonal flexible scale set with a PlatformFaultDomainCount of 1, and zones 1, 2, and 3 in PowerShell, you can use the following command:
$ResourceGroupName = "sap-ab1"
$VMSSName = "sap-flex-zones-ab1"
$Location = "westeurope"
# Create flexible scale set for cross zonal deployment of SAP workload in a region.
$vmssConfig = New-AzVmssConfig -Location $Location -PlatformFaultDomainCount 1 -Zone @(1,2,3)
New-AzVmss -ResourceGroupName $ResourceGroupName -Name $VMSSName -VirtualMachineScaleSet $vmssConfig
To create a zonal flexible scale set with a PlatformFaultDomainCount of 1, and zones 1 in PowerShell, you can use the following command:
$ResourceGroupName = "sap-ab1"
$VMSSName = "sap-flex-zones-ab1"
$Location = "westeurope"
# Create flexible scale set for single zone deployment of SAP workload in a region.
$vmssConfig = New-AzVmssConfig -Location $Location -PlatformFaultDomainCount 1 -Zone @(1)
New-AzVmss -ResourceGroupName $ResourceGroupName -Name $VMSSName -VirtualMachineScaleSet $vmssConfig
To create a regional flexible scale set with a PlatformFaultDomainCount of 1 in a region without any zones using PowerShell, you can use the following command:
$ResourceGroupName = "sap-ab1"
$VMSSName = "sap-flex-region-ab1"
$Location = "switzerlandwest"
# Create flexible scale set for deployment of SAP workload in a region with no zones.
$vmssConfig = New-AzVmssConfig -Location $Location -PlatformFaultDomainCount 1
New-AzVmss -ResourceGroupName $ResourceGroupName -Name $VMSSName -VirtualMachineScaleSet $vmssConfig
To perform a VM migration to a flexible scale set with zones, you can follow the command below:
$ResourceGroupName = "sap-ab1"
$VMName = "ab1-ascs"
$VMSSName = "sap-flex-zones-ab1"
$Location = "westeurope"
# Move VM to VMSS Flex and Zone 2
Move-AzSAPVMToVMSSFlex -VMResourceGroupName $ResourceGroupName -VirtualMachineName $VMName -VMSSGResourceGroupName $ResourceGroupName -VMSSName $VMSSName -AzureZone 2
To perform a VM migration to a flexible scale set without zones (within a regional context), you can follow the steps provided below:
$ResourceGroupName = "sap-ab1"
$VMSSName = "sap-flex-region-ab1"
$Location = "switzerlandwest"
$VMName = "ab1-ascs"
# Move VM to non-zonal VMSS Flex
Move-AzSAPVMToVMSSFlex -VMResourceGroupName $ResourceGroupName -VirtualMachineName $VMName -VMSSGResourceGroupName $ResourceGroupName -VMSSName $VMSSName
TIP: To get the help information on PowerShell cmdlet Move-AzSAPVMToVMSSFlex, you can execute following PS command:
help Move-AzSAPVMToVMSSFlex -Full
The PS cmdlet Move-AzSAPVMToVMSSFlex does not modify the Azure region, VM name, NIC card names and configurations, disk names, load balancer configuration, region, or Azure resource group.
When moving VM(s) with SAP message server processes, such as SAP ASCS/SCS instances or DVEBMGS<Nr> instances, it is necessary to install a new SAP license.
The SAP license key is tied to the host where the SAP message server is running. In the case of clustered SAP ASCS/SCS/DVEBMGS<Nr>, two licenses are installed, one for each cluster host/VM. In Azure, SAP utilizes a Unique VM ID to calculate the license key. As the VM is newly re-created, it will receive a NEW unique VM ID, rendering the old license invalid. For each recreated SAP ASCS/SCS/DVEBMGS<Nr> node, a new hardware key needs to be obtained, a new license generated, and it must be installed.
INFO: For more details on SAP licensing in Azure check this blog SAP NetWeaver Licensing Mechanism in Microsoft Azure Cloud - Part 1.
The current version of the script does not include the functionality to enable managed-system identities or service principal settings required for the Azure fencing agent. It also does not assign IAM role, which is required to configure Azure fence agent. If you are utilizing system-managed identities for the cluster VMs or a service principal for the Azure fencing agent on SLES or RHEL, please ensure that you manually reapply the previous settings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.