0

创建 Azure DevTest 实验室 VM 时,我正在执行以下操作

  1. 选择了“Windows Server R2 Datacenter”图像
  2. 在工件中,我添加了 i。Firefox 浏览器安装 ii. 下载 VSTS Drop and Run Script(创建并使用具有所有范围的个人安全令牌

我创建了一个 ARM 模板并在我的构建定义中使用它来创建 vm 并运行从 VSTS 下载的工件。

问题: 当我不添加上面的 (ii) 时,我能够很好地创建我的 VM,但是当我在我的 ARM 模板中添加 (ii) 时,我总是看到以下错误。

错误:

2017-06-06T19:11:24.1769032Z ##[error]**System.Management.Automation.ActionPreferenceStopException: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 
2017-06-06T19:11:24.1769032Z Cannot process command because of one or more missing mandatory parameters: Download_VSTS_Drop_and_Run_Script.PersonalAccessToken.**
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-06-06T19:11:24.1769032Z    at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
2017-06-06T19:11:24.1769032Z    at Microsoft.TeamFoundation.DistributedTask.Handlers.LegacyVSTSPowerShellHost.VSTSPowerShellHost.Main(String[] args)
2017-06-06T19:11:24.1869033Z ##[error]LegacyVSTSPowerShellHost.exe completed with return code: -1.
2017-06-06T19:11:24.1879035Z ##[section]Finishing: Create Azure DevTest Labs VM

将感谢在这种情况下的任何帮助,在构建定义中使用 DevTestLab 的任何指针都会很棒。

4

0 回答 0