2014-09-26 147 views
3

我試圖將我們基於Azure的webservice的測試實例部署到新的D系列Azure虛擬機。我們廣泛使用臨時文件,並希望我們會看到一些很好的性能改進。不幸的是,我們似乎無法使用新的vmsizes進行打包或構建。我們目前csdef看起來是這樣的:部署到新的D系列Azure虛擬機

<?xml version="1.0" encoding="utf-8"?> 
<ServiceDefinition name="WebAPI.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition" schemaVersion="2013-10.2.2"> 
<WebRole name="WebAPI" vmsize="Large"> 
<Sites> 
    <Site name="Web"> 
    <Bindings> 
     <Binding name="Endpoint1" endpointName="NonSSL Endpoint" /> 
    </Bindings> 
    </Site> 
</Sites> 
<Endpoints> 
    <InputEndpoint name="NonSSL Endpoint" protocol="http" port="80" /> 
    <InternalEndpoint name="InternalHttpIn" protocol="http" /> 
</Endpoints> 
</WebRole> 
</ServiceDefinition> 

如果我從「大」到「Standard_D3」切換vmsize,並嘗試建立或包發佈,我得到這個錯誤:

Error 2 The XML specification is not valid: The 'vmsize' attribute is invalid - The value 'Standard_D3' is invalid according to its datatype 'http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceDefinition:RoleSize' - The Enumeration constraint failed. C:\Users\ablack\Desktop\WebAPI.Azure\ServiceDefinition.csdef 3 34 WebAPI.Azure 

怎麼辦我得到這個模式更新?或者有沒有辦法在構建&包過程中重寫XML驗證?

回答

3

顯然,2.4 SDK完全刪除了vmsize約束(它接受任何值,包括像「Supersize」這樣的組成值),所以我們必須升級到那個才能嘗試任何新的大小選項。這將使基準測試變得複雜(我們需要首先獲得新的SDK的新基線),但c'est la vie。

+0

是的,這裏是確認:https://msdn.microsoft.com/en-us/library/azure/dn794167.aspx「用戶不再需要升級到更新版本的SDK以使用新的Azure虛擬機大小」 – Dunc 2015-03-18 19:41:18