YannickRe / azuredevops-buildagents

Generate self-hosted build agents for Azure DevOps, just like Microsoft does.
MIT License
151 stars 90 forks source link

Failure in updating VM Scale Set stage #35

Closed Arash-Sabet closed 1 year ago

Arash-Sabet commented 1 year ago

Unfortunately, never could I successfully run the pipeline due to the failure below. It happens consistently to Ubuntu 2204, Windows 2022 and Windows 2019 (I have not tried Ubuntu 2004 but I think it will exhibit the same issue). Any idea how to make it work? (I hid the actual id values with MASKED word)

2023-02-27T09:14:10.0761208Z ##[section]Starting: Update Virtual Machine Scale Set 2023-02-27T09:14:10.0900984Z ============================================================================== 2023-02-27T09:14:10.0902043Z Task : PowerShell 2023-02-27T09:14:10.0902719Z Description : Run a PowerShell script on Linux, macOS, or Windows 2023-02-27T09:14:10.0903432Z Version : 2.212.0 2023-02-27T09:14:10.0904033Z Author : Microsoft Corporation 2023-02-27T09:14:10.0904725Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell 2023-02-27T09:14:10.0906234Z ============================================================================== 2023-02-27T09:14:11.2617757Z Generating script. 2023-02-27T09:14:11.2670658Z Formatted command: . 'C:\a_w\109\s\azuredevops-buildagents\scripts\update-vmss.ps1' -ClientId MASKED -ClientSecret MASKED -ResourceGroup MyBuildAgents -SubscriptionId MASKED -TenantId MASKED -VmssNames win2022buildagents -ManagedImageId "/subscriptions/MASKED/resourceGroups/Packer-Configuration-RG/providers/Microsoft.Compute/images/windows2022-29087" 2023-02-27T09:14:11.3085143Z ========================== Starting Command Output =========================== 2023-02-27T09:14:11.3330685Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\a_w_temp\3cfe15c5-f726-4a1b-8488-a165c8b246a9.ps1'" 2023-02-27T09:14:17.2493233Z ERROR: The Resource 'Microsoft.Compute/virtualMachineScaleSets/win2022buildagents' under resource group 'MyBuildAgents' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix 2023-02-27T09:14:17.4683893Z Updated Virtual Machine Scale Set ManagedImageId: win2022buildagents - /subscriptions/MASKED/resourceGroups/Packer-Configuration-RG/providers/Microsoft.Compute/images/windows2022-29087 2023-02-27T09:14:17.6757754Z ##[error]PowerShell exited with code '1'. 2023-02-27T09:14:17.7218071Z ##[section]Finishing: Update Virtual Machine Scale Set

Arash-Sabet commented 1 year ago

Apparently the VM set should pre-exist. I guess we can close this issue.