다음을 통해 공유


Azure Virtual Network Troubleshooting: Change the address space containing a functional server farm

Environment

SharePoint farm in Microsoft Azure Infrastructure as a Service (IaaS). That server farm contains following servers:

  • Domain Controller with DNS
  • File Server
  • SQL Server
  • Analysis Services Server
  • SharePoint Server

Furthermore, Point-to-Site VPN connectivity as well. Following is how the environment was structured.

https://lh3.googleusercontent.com/-IbKD4LsoVi4/V3QVPhf21SI/AAAAAAAAB-c/GquWn_Gbgno/image_thumb%25255B3%25255D.png?imgmax=800

Issue

Everything looks good until we received a request to move everything to a different network address space. It seems that there was an internal network range which conflicts with my 11.0.0.0/16 address space. The only option is to move to a new virtual address space.

Desired configuration

Following was the desired configuration.

https://lh3.googleusercontent.com/-R5F0U5-D-3I/V3QVRi29i-I/AAAAAAAAB-s/QrQCT6MFCXU/image_thumb%25255B15%25255D.png?imgmax=800

The few challenges to overcome

  1. Move the environment to a new address space without corrupting my servers
  2. Consume the existing Domain Controller and DNS
  3. Continue to use my SharePoint server

This post is written to summarize the approach taken to move an environment to a new address space.

Okay. Let’s start the migration.

Solution

Following are the steps followed.

  1. Stop and deallocate all servers in the environment
  2. In Domain Controller remove the static IP assignment
  3. Add a new Address Space in Virtual Network
  4. Add new Subnets in that Address Space
  5.  Execute some PowerShell commands. We need to get the names of network cards in each server prior to that
  6. First we need to connect to the environment. First we need to connect to the environment:
    • Login-AzureRMAccount

      Get-AzureRmSubscription

      Get-AzureRmSubscription –SubscriptionName "My Subscription" | Select-AzureRmSubscription –SubscriptionName "My Subscription"

  7. Declare variables:
    • $rgname = "TRS-Test-Res-01"

      $vnetname = "TRS-Test-Net-01"

      $subnetName1 = "TRS-Test-Sub-01"

      $subnetName2 = "TRS-Test-Sub-02"

      $adNICName = "trs-test-dc-01646"

      $fsNICName = "trs-test-fs-01971"

      $dbNICName = "trs-test-db-01899"

      $asNICName = "trs-test-as-01350"

      $spNICName = "trs-test-sp-01892"

  8. Get Virtual Network and Subnets:
    • $vnet = Get-AzureRmVirtualNetwork -ResourceGroupName $rgname -Name $vnetname

      $subnet1 = Get-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $subnetName1

      $subnet2 = Get-AzureRmVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name $subnetName2

  9. Migrate the first server (Domain Controller):
    • $nicAD = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $adNICName

      $nicAD.IpConfigurations[0].Subnet = $subnet1

      Set-AzureRmNetworkInterface -NetworkInterface $nicAD

    • Some extra steps to update the DNS server (Activities from step 10 to step 13).

  10.  Start the Domain Controller server
  11.  In Virtual Network set the custom DNS
  12.  Execute following commands and restart the domain controller:
  13. Check ipconfig /all again after the restart:
  14.  Now we have to migrate other servers:
    • #File Server
    • $nicFS = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $fsNICName
    • $nicFS.IpConfigurations[0].Subnet = $subnet1
    • Set-AzureRmNetworkInterface -NetworkInterface $nicFS
    • #SSAS Server
    • $nicAS = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $asNICName
    • $nicAS.IpConfigurations[0].Subnet = $subnet1
    • Set-AzureRmNetworkInterface -NetworkInterface $nicAS
    • #DB Server
    • $nicDB = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $dbNICName
    • $nicDB.IpConfigurations[0].Subnet = $subnet2
    • Set-AzureRmNetworkInterface -NetworkInterface $nicDB
    • #SharePoint Server
    • $nicSP = Get-AzureRmNetworkInterface -ResourceGroupName $rgname -Name $spNICName
    • $nicSP.IpConfigurations[0].Subnet = $subnet2
    • Set-AzureRmNetworkInterface -NetworkInterface $nicSP
  15.  Once all servers are migrated we need to restart them
  16.  Now we can delete Subnets from my previous environment (TRS-Test-Sub-01 and TRS-Test-Sub-02)
  17.  Later we can delete the Address Space of the previous environment

 

Credits

Luckily you've got recommendations from Janaka and received a great help from Denny Cherry to find a solution.