2016-07-25 14 views
0

Visual Studio Team ServicesでAzure DevTestラボVMをビルドプロセスの一部として作成したい。私はビルドを実行したときしかし、私は次のエラーを取得する:Visual Studio Team ServicesからAzure DevTest Lab VMを作成する

****************************************************************************** 
Starting task: Create Azure DevTest Labs VM 
****************************************************************************** 
Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\1.102.0\tasks\AzureDevTestLabsCreateVM\1.0.7\New-AzureDtlVM.ps1 
Looking for Azure PowerShell module at C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Azure.psd1 
AzurePSCmdletsVersion= 1.3.2 
Get-ServiceEndpoint -Name ***** -Context Microsoft.TeamFoundation.DistributedTask.Agent.Worker.Common.TaskContext 
tenantId= ******** 
azureSubscriptionId= ***** 
azureSubscriptionName= ***** 
Add-AzureRMAccount -ServicePrincipal -Tenant ******** -Credential System.Management.Automation.PSCredential 
Select-AzureRMSubscription -SubscriptionId ***** -tenantId ******** 
Starting Azure DevTest Labs Create VM Task 
Task called with the following parameters: 
    ConnectedServiceName = ***** 
    LabId = ***** 
    TemplateName = C:\a\1\s\MVC app\azure-rm-template 
    TemplateParameters = -newVMName 'builder' -userName 'admin' -password (ConvertTo-SecureString -String ***** -AsPlainText -Force) 
    OutputResourceId = labVMId 
Validating input parameters 
Fetching lab ***** 
Microsoft.Azure.Commands.ResourceManager.Cmdlets.Entities.ErrorResponses.ErrorResponseMessageException: MissingSubscription : The request did not have a provided subscription. All requests must have an associated subscription Id. 
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__24.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__20.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.RestClients.ResourceManagerRestClientBase.<SendRequestAsync>d__1b`1.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResource>d__12.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.GetAzureResourceCmdlet.<GetResources>d__c.MoveNext() 

私はサービスプリンシパルを使用してAzureのにVSTSを接続していると私は、Microsoft(https://marketplace.visualstudio.com/items?itemName=ms-azuredevtestlabs.tasks)が提供するDevTestラボのタスクを使用しています。

エラーは "MissingSubscription"ですが、その非常にタスクのログにはすべてのサブスクリプション情報が含まれているため、非常に混乱します。

答えて

1

これは、「Azure DevTest Labs Create VM」タスクで入力した「Lab Name」タスクが間違っていることが原因です。 AzureポータルでDevTest Labを作成してから、 "Azure DevTest Labs Create VM"タスクで "Lab Name"のドロップダウンリストからそれを確認してください。 enter image description here

LabId = /subscriptions/subscriptionID/resourceGroups/resourcegroupname/providers/Microsoft.DevTestLab/labs/LabName 
:ラボ名が正しい場合

は、あなたがログに、次の形式と同じ「ラビッド」を参照してください必要があります

関連する問題