Azure ASM到ARM遷移 (三) Reserved IP的遷移

衡子發表於2017-09-06

Azure的ASM下,很多使用者的應用種域名的解析在DNS伺服器種都採用A記錄的方式,所以很多使用者都在Azure上採用了Reserved IP。

關於Reserved IP,可以參考http://www.cnblogs.com/hengwei/p/5161433.html

在ASM到ARM的遷移中,IP地址也是遷移中需要考慮的一個重要問題,如果IP地址不能遷移,就需要客戶更改DNS中的記錄。

如果修改了DNS的記錄,考慮到DNS本身架構的特點,割接的時間將會大大增加。所以遷移Reserved IP是ASM到ARM工作中需要重點考慮的內容之一。

Azure Reserved IP的遷移有兩種方式:

 

1. VNET整體遷移

如果採用平臺的工具進行VNET的整體遷移,Public的IP地址會隨著VM遷移到ARM模式下。

已經建立好了一臺VM,其Cloud Service的IP地址是Reserved IP:

VM的資訊:

Reserved IP資訊:

通過SSH到這臺VM上,進行檢測,這裡用到的是Paping,類似Windows裡的PSPING,下載地址是:

https://hwblob.blob.core.chinacloudapi.cn/test/paping_1.5.5_x86-64_linux.tar.gz

然後對VNET進行遷移:

Move-AzureVirtualNetwork -VirtualNetworkName hwmig -Validate
Move-AzureVirtualNetwork -VirtualNetworkName hwmig -Prepare
Move-AzureVirtualNetwork -VirtualNetworkName hwmig -Commit

這個過程中,paping出現三次中斷:

Connected to 111.13.100.91: time=8.67ms protocol=TCP port=80
Connected to 111.13.100.91: time=6.30ms protocol=TCP port=80
Connected to 111.13.100.91: time=2.50ms protocol=TCP port=80
Connection timed out
Connection timed out
Connection timed out
Connection timed out
Connected to 111.13.100.91: time=3.65ms protocol=TCP port=80
Connected to 111.13.100.91: time=1.91ms protocol=TCP port=80
Connected to 111.13.100.91: time=5.59ms protocol=TCP port=80
…
Connected to 111.13.100.91: time=2.31ms protocol=TCP port=80
Connection timed out
Connection timed out
Connected to 111.13.100.91: time=2.53ms protocol=TCP port=80
Connected to 111.13.100.91: time=2.49ms protocol=TCP port=80
…
Connected to 111.13.100.91: time=5.63ms protocol=TCP port=80
Connection timed out
Connection timed out
Connection timed out
Connected to 111.13.100.91: time=754.30ms protocol=TCP port=80

一次發生在prepare中,兩次發生在commit中,但時間都非常短。

結束後,可以看到:

地址沒有發生變化。

檢視Public IP,可以看到已經遷移過來,且地址沒有變化,管理在負載均衡器上:

 

2. 單獨遷移Reserved IP

當然在做這些move的命令前,都要在訂閱中註冊相應的provider:

在powershell中執行如下命令:

Move-AzureReservedIP -ReservedIPName hwrip02 -Validate
Move-AzureReservedIP -ReservedIPName hwrip02 -Prepare
Move-AzureReservedIP -ReservedIPName hwrip02 -Commit

執行完後,這個Reserved IP就遷移到ARM模式下了。

 

總結:

從ASM到ARM的遷移中,IP地址的遷移可以採用兩種方式實現。

  1. 隨著VNET一起遷移
  2. 單獨遷移

相關文章