Windows Azure - 升級Cloud Service到Windows Server 2012

27 November 2012 — Written by Sky Chang
#Azure#Windows Server

前一段時間,看到Cloud Service已經開始支援Windows Server 2012的時候,很開心的就準備要去升級,所以小弟就到了下圖的畫面,選了Windows Server 2012。

image

然後悲劇就發生了… ( 好啦,也沒那麼悽慘,只是單純的錯誤。 )

錯誤訊息如下,簡單的說,就是不可以將Windows Server 2008 SP1直接升級到Windows Server 2012。

圖片 1

The Upgrade from OS family 1 to OS family 3 is not allowed

據說,Windows Server 2008 R2 升級 Windows Server 2012也會出錯。

The Upgrade from OS family 2 to OS family 3 is not allowed

這個案例,只要是發生在當Cloud Service上,已經使用Windows Server 2008或是Windows Server 2008 R2,而想升級成Windows Server 2012時,會發生的錯誤訊息;無論是使用如最上圖的升級方式,或是透過前篇,利用ServiceConfiguration.Cloud.cscfg改OSFamily,都會發生錯誤;只要目前Cloud Service上,還存在著Windows Server 2008或是R2。

所以要怎樣解決呢??

第一種方式

刪除現有的Cloud Service,然後透過前篇的方式,先設定ServiceConfiguration.Cloud.cscfg的OSFamily,最後佈署一個新的Cloud Service;不過,當刪除Cloud Service,建立新的Cloud Service的時候,IP位置,就會換了…所以不是很建議使用這種方式。

第二種方式 SWAP VIP

是的,SWAP VIP是最好的方式,大家可以參考這篇了解SWAP VIP,我們可以把修改過ServiceConfiguration.Cloud.cscfg的專案,佈署到Staging,然後再利用SWAP VIP進行切換;這樣就可以順利解決;當然,如果Staging目前上面已經在執行,也別忘記要先砍掉,在建立一個新的Staging;如下圖。

image

然後在UPDATE上新的Cloud Service到Staging,最後,再利用SWAP切換到Production,就可以順利升級到Windows Server 2012了 ( 也不算是升級了XDD,根本就是重新產生了… )

後記

相信未來會有越來越多人遇到這個問題,所以在這邊寫出來,希望能幫助到大家。

參考網址

Sky & Study4.TW