简体   繁体   中英

How to fix “OS version specified in the .cscfg file is inactive” for Azure deployment?

One of our msbuilds started failing a few days ago with this error:

The polling operation Create Deployment failed with the error: (400) BadRequest. Error Code: BadRequest Message: The OS version specified in the .cscfg file is inactive. This means that it cannot currently be used to create, update or upgrade a deployment.
The deployment failed. Check the logs for exceptions that may have caused this failure.

Exception Message: An attempted http request against URI returned an error: (400) BadRequest. Additional Exception Information: Error Code: BadRequest Message: The OS version specified in the .cscfg file is inactive. This means that it cannot currently be used to create, update or upgrade a deployment. (type AzureHttpRequestException) Exception Stack Trace: at Microsoft.TeamFoundation.Deployment.Workflow.AzureManagement.v1_7.OperationStatusInfo.EnsureSuccessStatus(Uri requestUri) at Microsoft.TeamFoundation.Deployment.Workflow.Activities.ReportFailedPollResultAndThrow.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Per this page, it looked as if our guest OS version was considered "disabled" by Microsoft: https://azure.microsoft.com/en-us/documentation/articles/cloud-services-guestos-update-matrix/

So I updated the .cscfg files from 'osVersion="WA-GUEST-OS-4.26_201511-02"' to 'osVersion="WA-GUEST-OS-4.29_201602-01"' for the 'ServiceConfiguration' line in the .cscfg XML file. But it didn't help.

Does anyone know of something else I can try? Thanks.

Using the asterisk notation (osVersion="*") seems to have fixed the issue. My builds are working again.

The reason we were hard coding a guest OS version before, according to a coworker of mine, is that to get .NET 4.6 working this was necessary. It may not be necessary anymore.

Full line for the .cscfg is:

<ServiceConfiguration serviceName="OurCompany.Azure" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" osFamily="4" osVersion="*" schemaVersion="2015-04.2.6">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM