Windows Azure VM的兩種shut down 方式


 

今天在調查Azure的價格時,發現下面的語句,來自http://azure.microsoft.com/en-us/pricing/details/virtual-machines/

 

* If my deployed instance is in the "stopped" state, do I still get billed?

If your instance is in the Stopped Deallocated state, it is not billed. If your instance is in the Stopped Allocated state, it is still occupying compute resources and will be billed for virtual cores allocated, not the software license itself.

 

意思是如果你的VM在Stopped狀態下,你依舊會被征收CPU使用的費用。而在Stopped Deallocated狀態下,完全免費。

 

但是卻沒有提及如何才能達到這兩種狀態,經過測試發現

1. stopped狀態: 遠程登錄到VM中,進行shut down操作,VM狀態會變成Stop狀態

2. Stopped Deallocated狀態: 登錄到Azure Portal中,選擇VM,點擊下面的shutdown按鈕。VM就會變成Stopped Deallocated狀態

image

注意,在點擊ShutDown按鈕后,會提示If you continue, the IP addresses that were assigned to this virtual machine will be released. Are you sure you want to shut down virtual machine **** ?

意思是這台VM使用的IP地址會被釋放,當年再次啟動的時候,一個新的地址會被分配給它。DNS NAME不會改變,因此盡量不要使用IP地址。

 

這一點上Amazon的AWS EC2稍微好一點,不管怎樣shut down VM,都是一個狀態,而且shut down后不會被收費。

 

微軟的兩種shut down方式不太會影響已經上線的服務器,因為上線后基本不會關機。只是會影響開發,測試階段,總體來是問題不大。但是還是希望微軟能夠改進,合並shutdown狀態。

 

注: 網友@盛亞評論

“CPU time一直也是收費的。除非徹底刪除,如果delete這個VM,但保留他的磁盤鏡像,照樣和開啟VM時一樣的收費。這點和MS中國這邊確認過了。”


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM