Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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
- Move the environment to a new address space without corrupting my servers
- Consume the existing Domain Controller and DNS
- 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.
- Stop and deallocate all servers in the environment
- In Domain Controller remove the static IP assignment
- Add a new Address Space in Virtual Network
- Add new Subnets in that Address Space
- Execute some PowerShell commands. We need to get the names of network cards in each server prior to that
- 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"
- 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"
- $rgname = "TRS-Test-Res-01"
- 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
- $vnet = Get-AzureRmVirtualNetwork -ResourceGroupName $rgname -Name $vnetname
- 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).
- Start the Domain Controller server
- In Virtual Network set the custom DNS
- https://lh3.googleusercontent.com/-v8LNlkgj3Xc/V3QVbsVS7QI/AAAAAAAAB_8/EkC7hrEt9FE/image_thumb%25255B25%25255D.png?imgmax=800
- But still it shows 11.0.0.4 as the DNS server, when checking within the domain controller
- https://lh3.googleusercontent.com/-APpHxZ1f2Uo/V3QVfsFJIwI/AAAAAAAACAM/pFvIO0dl_cw/image_thumb%25255B28%25255D.png?imgmax=800
- Execute following commands and restart the domain controller:
- ipconfig /flushdns
- ipconfig /registerdns
- dcdiag /fix
- https://lh3.googleusercontent.com/-PNMF8NfoUqE/V3QVicGONlI/AAAAAAAACAc/aJMIrtbOTS4/image_thumb%25255B31%25255D.png?imgmax=800
- https://lh3.googleusercontent.com/-rmbL-8JrRcc/V3QVkn9GB1I/AAAAAAAACAs/mgRiJu3DEws/image_thumb%25255B40%25255D.png?imgmax=800
- https://lh3.googleusercontent.com/-Q-pHcWA96gE/V3QV0_SNbyI/AAAAAAAACA8/IQCfMZwYvgo/image_thumb%25255B44%25255D.png?imgmax=800
- Check ipconfig /all again after the restart:
- https://lh3.googleusercontent.com/-vZdCis9k4PU/V3QV48kpsRI/AAAAAAAACBM/q3AU0jqIviA/image_thumb%25255B47%25255D.png?imgmax=800
- Now the DNS servers are updated properly
- 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
- Once all servers are migrated we need to restart them
- Now we can delete Subnets from my previous environment (TRS-Test-Sub-01 and TRS-Test-Sub-02)
- 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.