Build VM error #12594
Replies: 15 comments 5 replies
-
Hi @Kockieee - Thank you for bringing this issue to our attention. We will look into this issue and will update you after investigating. |
Beta Was this translation helpful? Give feedback.
-
Hi @Kockieee, |
Beta Was this translation helpful? Give feedback.
-
Hi Akilesh, We don't pull the latest code, our simple piece of code references Yannick's repo (https://github.com/YannickRe/azuredevops-buildagents) which in turn references your repo. I'm awaiting a reaction from Yannick's end, will keep you posted. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi @akilesh-amaran, More info related to the code in YannickRe's repo ... I made changes on my local copy of this repo and "pass" all the new required values to the build-image.ps1 script, but when it executes a whole bunch of packer errors are produced, e.g.:
And here is the command "we" execute that produces this output:
The above has worked just fine for many moons prior to the #12305 changes. One additional note: by default the YannickRe processing clones the main branch of the actions/runner-images repo. It appears that the latest releases/ubuntu24 or releases/win22 branches still have the old code structure and build w/o issues. |
Beta Was this translation helpful? Give feedback.
-
I did the same as @SamBonavika but for Ubuntu 22 and am facing the same errors. |
Beta Was this translation helpful? Give feedback.
-
Hi @SamBonavika - The new versions will be available with the upcoming rollout. I will share an update once the process is complete. thanks for your support ! |
Beta Was this translation helpful? Give feedback.
-
Thank you!!! |
Beta Was this translation helpful? Give feedback.
-
Hi @Kockieee , |
Beta Was this translation helpful? Give feedback.
-
Hi @akilesh-amaran , I tried running my pipelines for Ubuntu 22, Ubuntu 24, and Windows 22, but the result is the same as before, errors about undefined variables.
|
Beta Was this translation helpful? Give feedback.
-
Hi @Kockieee , |
Beta Was this translation helpful? Give feedback.
-
Hi @akilesh-amaran, could you please share the source code of the pipelines you mentioned |
Beta Was this translation helpful? Give feedback.
-
HI @dmytrosklyarov , |
Beta Was this translation helpful? Give feedback.
-
I'm having the same issues with undefined variables and am using this repo. The issue is with the change to the buildName and templatePath. Where is it documented what -only buildName and templatePath should be? My pipeline just passed the path and name together. |
Beta Was this translation helpful? Give feedback.
-
We are still running into this issue even though I pulled the latest changes: 2025-07-15T17:33:56.4521538Z Error: Undefined -var variable |
Beta Was this translation helpful? Give feedback.
-
If you are using Yannick's pipelines you will need to make a few changes to the buildVm step. Below is part of my comment on the related issue in his repo. I managed to make it work. Here is my buildVm task definition with some comments. You need to ensure proper variable values. - task: PowerShell@2
name: buildVm
displayName: "Build VM"
inputs:
targetType: filePath
pwsh: true
filePath: ./runner-images/images.CI/linux-and-win/build-image.ps1
arguments: -ClientId "$(CLIENT_ID)" `
-ClientSecret "$(CLIENT_SECRET)" `
-TemplatePath "$(TemplateDirectoryPath)" ` # See how I changed it to template directory and not the exact file
-ImageName "$(ManagedImageName)" `
-ImageResourceGroupName "$(AZURE_RESOURCE_GROUP)" `
-TempResourceGroupName "$(TempResourceGroupName)" `
-SubscriptionId "$(AZURE_SUBSCRIPTION)" `
-TenantId "$(AZURE_TENANT)" `
-Location "$(AZURE_LOCATION)" `
-VirtualNetworkName "$(BUILD_AGENT_VNET_NAME)" `
-VirtualNetworkRG "$(BUILD_AGENT_VNET_RESOURCE_GROUP)" `
-VirtualNetworkSubnet "$(BUILD_AGENT_SUBNET_NAME)" `
-ImageOs "$(gitCheckout.OSTagPrefix)" ` # it's the same as the OSTagPrefix, e.g. win25, ubuntu22
-BuildTemplateName "build.$(gitCheckout.PackerBuildName)" # Documentation says it's just the build name property value from the packer template, but the script expects the template file name because it is doing this; $buildName = $($BuildTemplateName).Split(".")[1]
env:
PACKER_LOG: 1
PACKER_LOG_PATH: "$(Agent.TempDirectory)/packer-log.txt"
GALLERY_NAME: "$(GALLERY_NAME)" # Taken from ADO Variable Group, you need to set it if you don't have it already
GALLERY_RG_NAME: "$(GALLERY_RESOURCE_GROUP)" # Taken from ADO Variable Group, you need to set it if you don't have it already
GALLERY_IMAGE_NAME: "$(setVars.GalleryVmImageDefinition)" # Taken from previous steps
GALLERY_IMAGE_VERSION: "$(GalleryImageVersion)" # Taken from previous steps $GalleryImageVersion = "$((Get-Date).ToString("yyyyMMdd")).$(Build.BuildId).0"
Write-Host "##vso[task.setvariable variable=GalleryImageVersion;]$GalleryImageVersion" Packer variables are now in a separate, dedicated file and packer builds the whole directory; that's why you point to the whole directory, and you specify which image to build with the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
After the update from today I'm running into this error:
Any help would be appreciated.
Best regards,
Charles
Platforms affected
Runner images affected
Image version and build link
Azure DevOps:
Starting: Initialize job
Agent name: 'name here'
Agent machine name: 'name here'
Current agent version: '4.258.1'
Current image version: 'dev'
Agent running as: 'AzDevOps'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: PublishBuildArtifacts (1.247.1)
Checking job knob settings.
Knob: DockerActionRetries = true Source: $(VSTSAGENT_DOCKER_ACTION_RETRIES)
Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Knob: UseGitLongPaths = true Source: $(USE_GIT_LONG_PATHS)
Knob: EnableIssueSourceValidation = true Source: $(ENABLE_ISSUE_SOURCE_VALIDATION)
Knob: AgentEnablePipelineArtifactLargeChunkSize = true Source: $(AGENT_ENABLE_PIPELINEARTIFACT_LARGE_CHUNK_SIZE)
Knob: ContinueAfterCancelProcessTreeKillAttempt = true Source: $(VSTSAGENT_CONTINUE_AFTER_CANCEL_PROCESSTREEKILL_ATTEMPT)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC)
Knob: ProcessHandlerSecureArguments = false Source: $(AZP_75787_ENABLE_NEW_LOGIC_LOG)
Knob: ProcessHandlerTelemetry = true Source: $(AZP_75787_ENABLE_COLLECT)
Knob: UseNewNodeHandlerTelemetry = True Source: $(DistributedTask.Agent.USENEWNODEHANDLERTELEMETRY)
Knob: ProcessHandlerEnableNewLogic = true Source: $(AZP_75787_ENABLE_NEW_PH_LOGIC)
Knob: EnableResourceMonitorDebugOutput = true Source: $(AZP_ENABLE_RESOURCE_MONITOR_DEBUG_OUTPUT)
Knob: EnableResourceUtilizationWarnings = true Source: $(AZP_ENABLE_RESOURCE_UTILIZATION_WARNINGS)
Knob: IgnoreVSTSTaskLib = true Source: $(AZP_AGENT_IGNORE_VSTSTASKLIB)
Knob: FailJobWhenAgentDies = true Source: $(FAIL_JOB_WHEN_AGENT_DIES)
Knob: CheckForTaskDeprecation = true Source: $(AZP_AGENT_CHECK_FOR_TASK_DEPRECATION)
Knob: CheckIfTaskNodeRunnerIsDeprecated246 = False Source: $(DistributedTask.Agent.CheckIfTaskNodeRunnerIsDeprecated246)
Knob: UseNode20ToStartContainer = True Source: $(DistributedTask.Agent.UseNode20ToStartContainer)
Knob: LogTaskNameInUserAgent = true Source: $(AZP_AGENT_LOG_TASKNAME_IN_USERAGENT)
Knob: UseFetchFilterInCheckoutTask = true Source: $(AGENT_USE_FETCH_FILTER_IN_CHECKOUT_TASK)
Knob: Rosetta2Warning = true Source: $(ROSETTA2_WARNING)
Knob: AddForceCredentialsToGitCheckout = True Source: $(DistributedTask.Agent.AddForceCredentialsToGitCheckout)
Knob: UseSparseCheckoutInCheckoutTask = true Source: $(AGENT_USE_SPARSE_CHECKOUT_IN_CHECKOUT_TASK)
Finished checking job knob settings.
Start tracking orphan processes.
Finishing: Initialize job
Is it regression?
worked this morning as i was troubleshooting issues with our VMSS
Expected behavior
Build VM stage completes successfully
Actual behavior
Repro steps
Running the deploy VMSS from YannickRE, which references this .ps1 file, this is the link: https://github.com/YannickRe/azuredevops-buildagents
Beta Was this translation helpful? Give feedback.
All reactions