none
SOFS Cluster Network and IP address parameters update post failover from EAST to WEST using ASR RRS feed

  • Question

  • Hello,

    I have followed the following link to failover SOFS cluster nodes from EAST to WEST(Isolated Network) using ASR except the Group2-post steps which is shown in the screenshots1 attached(script-changing the cluster-ip).

    Note: I did not find the script to change the cluster IP from the following link

    https://docs.microsoft.com/en-us/azure/site-recovery/azure-to-azure-how-to-enable-replication-s2d-vms

    When I do the failover from EAST to WEST. VM IP, Role IPs are updated according to the destination VNET range except the cluster IP.

    If you see screenshot2, after failover cluster network shows no network, when I drop down. It was updating only after updating the network and IP manually. 

    Please help me with the script to update the Network and cluster IP as shown in Screenshot2 post failover.screenshot1

    screenshot2


    Karthik Javvaji

    Thursday, September 19, 2019 6:14 AM

All replies

  • Try something like below script might work (I have not tested it.). But probably if you don't update your cluster IP in case of DR, your hosted cluster roles would still work as for SoFS on Azure you are not accessing anything using the cluster IP unless you have LB rule to do so.


    $ClusterNode = "xxxxx"
    $ClusterNetworkName = "Cluster Network 2"
    $IPResourceName = "Cluster IP Address"
    $newClusterIP = "x.x.x.x"

    Get-ClusterResource -Name $IPResourceName -Cluster $ClusterNode | Set-ClusterParameter -Multiple @{"Address"=$newClusterIP;"Network"=$ClusterNetworkName;"EnableDhcp"=0}

    • Proposed as answer by Rohan Islam Tuesday, September 24, 2019 7:41 AM
    Thursday, September 19, 2019 10:35 AM
  • Hello Rohan,

    After executing below script, it given error as shown in screenshot.

    I forget to add one point here is, I did not implemented load balancer for SOFS. If it is really required to failover from one region to another region. Please share the steps, I will implement and let you know.

    Following is the script I executed.

    $ClusterNode = "sofs-s2d-0-test","sofs-s2d-0-test"
    $ClusterNetworkName = "Cluster Network 2"
    $IPResourceName = "Cluster IP Address"
    $newClusterIP = "10.0.0.26"

    Get-ClusterResource -Name $IPResourceName -Cluster $ClusterNode | Set-ClusterParameter -Multiple @{"Address"=$newClusterIP;"Network"=$ClusterNetworkName;"EnableDhcp"=0}


    Error Screenshot

    Following is the cluster network screenshot post failover from one region to another region. I think Network it self is not updating after failover.

    Network parameters post failover to another region.



    Karthik Javvaji

    Thursday, September 19, 2019 5:17 PM
  • Put only one node name against the parameter $ClusterNode. Like $ClusterNode = "sofs-s2d-0-test"

    Verify your network name under Networks on your cluster after failover, most likely it will be Cluster Network 2 and your production network will be Cluster Network 1 if you left them as default.

    No, you do not need any load balancer for this setup.

    Let me know how you go.

    • Proposed as answer by Rohan Islam Saturday, September 28, 2019 5:01 AM
    Friday, September 20, 2019 11:51 AM
  • Hi Rohan,

    It really worked when I passed one node cluster. I appreciate for you prompt response.

    Will setup DR and will let you know if I face any issue while setting up. Thank you so much for helping me on this issue.

    Regards,

    KARTHIK J


    Karthik Javvaji

    Tuesday, September 24, 2019 6:23 AM
  • Try something like below script might work (I have not tested it.). But probably if you don't update your cluster IP in case of DR, your hosted cluster roles would still work as for SoFS on Azure you are not accessing anything using the cluster IP unless you have LB rule to do so.


    $ClusterNode = "xxxxx"
    $ClusterNetworkName = "Cluster Network 2"
    $IPResourceName = "Cluster IP Address"
    $newClusterIP = "x.x.x.x"

    Get-ClusterResource -Name $IPResourceName -Cluster $ClusterNode | Set-ClusterParameter -Multiple @{"Address"=$newClusterIP;"Network"=$ClusterNetworkName;"EnableDhcp"=0}

    Thanks, kindly mark it as answer so that it can help others as well. Feel free to let me know if you need any further assistance.
    Tuesday, September 24, 2019 7:42 AM
  • HI Rohan,

    Script is working fine when executing it form the VM poweshell cmd using Runasadmin. But it failing when I executed the same using ASR Custom script. 

    Steps following:

    Following script will in uploaded in the azure storage account and will download the script in local machine with the help of  ASR custom script but when it trying to execute in powershell, it is taking as local powershell instead of run as admin. can you help me on this please. 

     Note: I am updating cluster Network & Its IP and Role Network and its IP address.

    Script:

    ###################################

    ### Updating the Cluster IP Address

    $resourceType = "Cluster IP Address"

    $resource = Get-ClusterResource $resourceType

    $ClusterIP = "10.231.176.11"

    $SubnetMask = "255.255.255.0"

    $Network = "Cluster Network 2"

    $parameter1 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,Address,$ClusterIP

    $parameter2 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,SubnetMask,$SubnetMask

    $parameter3 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,Network,$Network

    $parameterList = $parameter1,$parameter2,$parameter3

    # Not Required to stop

    #Stop-ClusterResource "Cluster IP Address"

    #Stop-ClusterResource "My Cluster Name"

    $parameterList | Set-ClusterParameter

    Start-ClusterResource "Cluster IP Address"

    #Start-ClusterResource "My Cluster Name"

    ### Updating the Cluster Role IP Address

    $resourceType = "SAP ECP IP"

    $resource = Get-ClusterResource $resourceType

    $ClusterIP = "10.231.176.13"

    $SubnetMask = "255.255.255.0"

    $Network = "Cluster Network 2"

    $parameter1 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,Address,$ClusterIP

    $parameter2 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,SubnetMask,$SubnetMask

    $parameter3 = New-Object Microsoft.FailoverClusters.PowerShell.ClusterParameter $resource,Network,$Network

    $parameterList = $parameter1,$parameter2,$parameter3

    #Stop-ClusterGroup "SAP ECP"

    #Stop-ClusterResource "My Cluster Name"

    $parameterList | Set-ClusterParameter

    Start-ClusterGroup -Name "SAP ECP"

    #Start-ClusterResource "My Cluster Name"


    Karthik Javvaji

    Friday, October 11, 2019 6:56 AM
  • Check if the following link helps or not. This blog explains how your should invoke a script within a VM leveraging customer script extension with ASR recovery plan and automation runbook.

    https://azure.microsoft.com/en-us/blog/leveraging-azure-site-recovery-with-sql-always-on-availability-groups-for-disaster-recovery-to-azure/ 

    Thanks,


    Rohan Islam | Azure Architect

    Saturday, October 12, 2019 4:52 AM