Giter VIP home page Giter VIP logo

azuredevops-buildagents's Introduction

Heya, I'm Yannick Reekmans 🚀

Microsoft Cloud Solution Architect | Business Applications MVP | Microsoft 365 MVP

About me

Yannick (a Microsoft 365 MVP & Business Applications MVP) is born and raised in SharePoint, starting out his career in 2011 when SharePoint 2010 was still new and shiny. The changing reality of the cloud made him expand his knowledge to the whole of Microsoft 365, Azure, and Power Platform.

He is a Managing Partner and Cloud Solution Architect at Qubix, a Belgium-based consultancy firm, responsible for the technical underpinnings of products and solutions. He owns KEOS, a management company to support his independent work.

Problem solving and development are his passion, still working day to day with code.

He always asks the important questions: How does it work? What do you want to achieve? Does it have an API? Do we really need development for this? Where's the coffee?

About me, the tldr;

🇧🇪 Belgium-based
🏆 Microsoft 365 MVP & Business Applications MVP
🔭 Managing Partner and Cloud Solution Architect at Qubix
💰 Owner of KEOS
📝 Blog at https://blog.yannickreekmans.be
🐣 Tweet at @YannickReekmans
🎤 Speaks at wherever they give him a stage and an audience
💬 Ask me about Microsoft 365, SharePoint Development, Microsoft Teams (Development), Power Platform (Power Automate, Power Apps, Dataverse, ALM, ...)

Find me

                 

Github stats

GitHub Streak

azuredevops-buildagents's People

Contributors

curlybytes avatar ddprince-pro avatar ddprince17 avatar drazkiewicz avatar erik-de-bont avatar icnatejackson avatar matt-funda avatar pippolino avatar robbert-nlo avatar tobiaslaving avatar yannickre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azuredevops-buildagents's Issues

Failure in updating VM Scale Set stage

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

Possible bug

Hello, when calling a buildagent-generation-template.yml in my pipeline, I get this error:

Encountered error(s) while parsing pipeline YAML:
/buildagent-generation-template.yml@azuredevops-buildagents (Line: 44, Col: 1): Unexpected value 'stages'

Install-KubernetesTools.ps1 is failing to get "kind"

I am trying to create vhd image for windows2019 where the pipeline fails at Install-KubernetesTools.ps1 script execution with below error.

==> vhd: Provisioning with powershell script: /home/vsts/work/1/s/virtual-environments/images/win/scripts/Installers/Install-KubernetesTools.ps1
    vhd: Install Kind
    vhd: Downloading package from: https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64 https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64.sha256sum to path C:\ProgramData\kind\kind.exe .
    vhd: There is an error encounterd after 0.33 seconds during package downloading:
    vhd:  Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: The connection was closed unexpectedly."
    vhd: Waiting 30 seconds before retrying. Retries left: 19
    vhd: Downloading package from: https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64 https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64.sha256sum to path C:\ProgramData\kind\kind.exe .
    vhd: There is an error encounterd after 0.05 seconds during package downloading:
    vhd:  Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."

Once all the retries are exhausted, the pipeline simply fails. I have tried to run on Self Hosted and Microsoft Hosted Agents (both Linux) to eliminate possibility of any issue with my Self Hosted agents.

Update: Failing on Windows Microsoft Hosted Agents too

==> vhd: Provisioning with powershell script: D:\a\1\s\virtual-environments\images\win/scripts/Installers/Install-KubernetesTools.ps1
    vhd: Install Kind
    vhd: Downloading package from: https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64 https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64.sha256sum to path C:\ProgramData\kind\kind.exe .
    vhd: There is an error encounterd after 0.31 seconds during package downloading:
    vhd:  Exception calling "DownloadFile" with "2" argument(s): "The request was aborted: The connection was closed unexpectedly."
    vhd: Waiting 30 seconds before retrying. Retries left: 19
    vhd: Downloading package from: https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64 https://github.com/kubernetes-sigs/kind/releases/download/v0.12.0/kind-windows-amd64.sha256sum to path C:\ProgramData\kind\kind.exe .
    vhd: There is an error encounterd after 0.05 seconds during package downloading:
    vhd:  Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
    vhd: Waiting 30 seconds before retrying. Retries left: 18

Any idea what is causing this? Thanks in advance for the guidance.
@YannickRe

Undefined -var variable building ubuntu22.04 image

Hi,
Last month the team at Microsoft has apparently been busy changing their *.pkr.hcl files, and those changes are causing issues using the pipelines in this repository.
Today I've tried to generate a released ubuntu22.04 image, but it fails at the beginning of the Build VM step:

Syntax-only check passed. Everything looks okay.
Show Packer Version
1.9.2
Build ubuntu2204 VM
Error: Undefined -var variable

A "storage_account" variable was passed in the command line but was not found in
known variables. To declare variable "storage_account", place this block in one
of your .pkr files, such as variables.pkr.hcl

Error: Undefined -var variable

A "resource_group" variable was passed in the command line but was not found in
known variables. To declare variable "resource_group", place this block in one
of your .pkr files, such as variables.pkr.hcl

Error: Undefined -var variable

A "capture_name_prefix" variable was passed in the command line but was not
found in known variables. To declare variable "capture_name_prefix", place this
block in one of your .pkr files, such as variables.pkr.hcl

Last month I've successfully generated an image. So the conflicting change must be made between those tags. A diff between those tags: https://github.com/actions/runner-images/compare/ubuntu22/20230806.1...ubuntu22/20230903.1?diff=split#diff-d91b5305d8b642adb5996f611a68484ffe1354d76246d50fc0395e8d3c5ec669

I think the build-image.ps1 needs an update. Hopefully someone is able to fix this.

A parameter cannot be found that matches parameter name: OsVhdUri

Hi, i am having trouble on the Managed Image Generation job.

The machine builds successfully but it looks like the OsVhdUri is not being outputted so the variable isn't being passed into the create-managedimage.ps1 script.

I am building this with an Azure Hosted VM and trying to build 2022-Datacenter.

Error in question is:

D:\a\1\a\VMSSFiles\Scripts\Setup\create-managedimage.ps1 : A parameter cannot be found that matches parameter name 
'OsVhdUri'.
At D:\a\_temp\fe1cd036-928c-4234dc-86e7-33dsrf344a3dc1.ps1:4 char:426
+ ... 5c28 ` -Location UKSOUTH ` -ImageType windows2022 ` -OsVhdUri  ` -OsT ...
+                                                         ~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [create-managedimage.ps1], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : NamedParameterNotFound,create-managedimage.ps1

Any assistance on this would be super. I have tried to debug this for a good couple of days now but ran out of ideas. Thanks

Oh, also, i don't know if it's worth mentioning but i am not importing the runner-images. I am using Azures image. Could this be the problem? This is my packer build file.

{
    "builders": [{
      "type": "azure-arm",
  
      "client_id": "[client_id]",
      "client_secret": "[client_secret]",
      "tenant_id": "[tenant]",
      "subscription_id": "[sub]",
  
      "managed_image_resource_group_name": "rg-packer-test",
      "managed_image_name": "myPackerImage",
  
      "os_type": "Windows",
      "image_publisher": "MicrosoftWindowsServer",
      "image_offer": "WindowsServer",
      "image_sku": "2022-Datacenter",
  
      "communicator": "winrm",
      "winrm_use_ssl": true,
      "winrm_insecure": true,
      "winrm_timeout": "10m",
      "winrm_username": "packer",
  
      "azure_tags": {
          "dept": "Cloud",
          "task": "Image deployment"
      },
  
      "build_resource_group_name": "rg-packerbuild-test",
      "vm_size": "Standard_D2_v2"
    }],
    "provisioners": [
        {
        "type": "powershell",
        "scripts": [
            "{{ template_dir }}/scripts/installers/Install-AzureCli.ps1"
        ]
    },
      {
      "type": "powershell",
      "inline": [
        "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
        "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10  } else { break } }"
      ]
    }
  ]
  }

Cant build multiple images in one pipeline anymore

Earlier we were building both Linux and windows VMs in the same pipeline. But since the change to a stage level template, it is not working anymore as the job names have started to conflict. As a work around I have forked the Repo and I am appending the 'image_type' var to the job names. Is there a recommendation/workaround for this issue?. I can raise a PR with my changes too.

Updating the virtual machines consistently fails

This issue has become a roadblock to proceed with creating our build agent. The screenshot below depicts the stage of the failure:

image

The error message reads as below:

2023-03-01T20:43:05.2351811Z ##[section]Starting: Update Virtual Machine Scale Set
2023-03-01T20:43:05.2485347Z ==============================================================================
2023-03-01T20:43:05.2485986Z Task : PowerShell
2023-03-01T20:43:05.2486263Z Description : Run a PowerShell script on Linux, macOS, or Windows
2023-03-01T20:43:05.2486594Z Version : 2.212.0
2023-03-01T20:43:05.2486850Z Author : Microsoft Corporation
2023-03-01T20:43:05.2487120Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-03-01T20:43:05.2487507Z ==============================================================================
2023-03-01T20:43:06.4775122Z Generating script.
2023-03-01T20:43:06.4834636Z Formatted command: . 'C:\a_w\110\s\azuredevops-buildagents\scripts\update-vmss.ps1' -ClientId MASKED -ClientSecret MASKED -ResourceGroup My-Build-Agents -SubscriptionId MASKED -TenantId MASKED -VmssNames ubuntu2204buildagents -ManagedImageId "/subscriptions/MASKED/resourceGroups/My-Configuration/providers/Microsoft.Compute/images/ubuntu2204-29342"
2023-03-01T20:43:06.5261790Z ========================== Starting Command Output ===========================
2023-03-01T20:43:06.5515602Z ##[command]"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\a_w_temp\MASKED.ps1'"
2023-03-01T20:43:15.3183530Z ERROR: The Image type for a Virtual Machine Scale Set may not be changed.
2023-03-01T20:43:15.5248878Z Updated Virtual Machine Scale Set ManagedImageId: ubuntu2204buildagents - /subscriptions/MASKED/resourceGroups/My-Configuration/providers/Microsoft.Compute/images/ubuntu2204-29342
2023-03-01T20:43:15.7116832Z ##[error]PowerShell exited with code '1'.
2023-03-01T20:43:15.7536085Z ##[section]Finishing: Update Virtual Machine Scale Set

I just used the word MASKED to hide the actual values.

@YannickRe Could you please chime in and let me know how to solve this issue? What causes to fail to update the VM scale set? Thanks.

Build VM stops

Hi,

I am not sure why my build is stoping I can not see any failed tests or any errors but getting this:
image

Any idea what is going wrong?

Thanks

Question: - Build Agent application

Hi, I hope you don't mind me asking a question as I'm seeming to get conflicting information on this.

Background
I'm using terraform to create my virtual machine scale set so trying to work out what custom extensions my VM's in the scale set should call.

Do you need to install the azure devops build agent and configure it for your projects etc or does that happen automatically as part of the Azure Devops Provisioning process?

I see some early examples show that you have to create a custom script to install the agent and others just seem to ignore this step.

Does the MS image include the agent s nothing needs installing?

Cheers
##Confused##

What is the best way to customize the created VM scale set

I have successfully created an Ubuntu 2204 scale set and the build agent is working fine. when it comes to compiling and building our .NET application. We also want to run our integration tests which depend on the presence of Azurite and a NoSQL database on the hosting machine. I tried to run the following yaml file to install Azurite but I kept getting the error message of "The remote provider was unable to process the request" which I cannot justify why it should get me this error.

pr: none
trigger: none

pool:
  vmImage: myubuntu2204agent

steps:
- task: Bash@3
  inputs:
    targetType: 'inline'
    script: |
      echo 'Attempting to install Azurite'
      npm install -g azurite

The question is that should I clone Microsoft's runner images repo, and augment it by implementing a script to have both Azurite and the NoSQL database included in the VM image or the YAML file above should be sufficient to install Azurite. If so, why I keep getting the error message?

Issue update in the VMSS disk size mismatch

Ubuntu builds just fine. On Windows after the image is built where it tries to replace it I get:
Message: The specified disk size 86 GB is smaller than the size of the corresponding disk in the VM image: 256 GB. This is not allowed. Please choose equal or greater size or do not specify an explicit size.

I don't see anyplace in the scripts where is specifies disk size any ideas?

Post generation scripts were not invoked

Based documentation here: https://github.com/actions/virtual-environments/blob/main/docs/create-image-and-azure-resources.md

Post-generation scripts
⚠️ These scripts are intended to run on a VM deployed in Azure

The user, created during the image generation, does not exist in the result VHD hence some configuration files related to the user's home directory need to be changed as well as the file permissions for some directories. Scripts for that are located in the post-generation folder in the repository:

Windows: https://github.com/actions/virtual-environments/tree/main/images/win/post-generation
Linux: https://github.com/actions/virtual-environments/tree/main/images/linux/post-generation
The scripts are copied to the VHD during the image generation process to the following paths:

Windows: C:\post-generation
Linux: /opt/post-generation
Running scripts
Ubuntu
find /opt/post-generation -mindepth 1 -maxdepth 1 -type f -name '*.sh' -exec bash {} ;
Windows
Get-ChildItem C:\post-generation -Filter *.ps1 | ForEach-Object { & $_.FullName }

These scripts are not being invoked.

Parallel jobs

Hi,

First of all, great work! Helps a lot to get self-hosted builds going.

I have a question:
Is it possible to run parallel jobs on a single VM instance (vmss capacity 1)?
If so, how can I set this up?
And if not, why does the VM instance need to be a quad-core machine with so much memory, while it only runs a single job at a time?

Unable to create Packer VM - "The platform image 'canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest' is not available.'

This is not an issue with the code here or in the runner-images repo - I'm here looking for advice.

When I try and run the packer template in the runner-images repo, first via this tooling and later standalone, VM creation fails indicating it can't find the platform image: The platform image 'canonical:0001-com-ubuntu-server-jammy:22_04-lts:latest' is not available.

If I alter the Packer template to produce managed disks, it creates just fine. This works for me, but I then need to maintain a fork.

What I'm curious about is this approach seems to work fine for your users. Microsoft tells me that this is due to unmanaged disks being deprecated and no longer available via the marketplace. If that's true though, this should break everyone. I suspect there may be a flag on older subscriptions that allows the creation of VHDs from marketplace images.

Did you/anyone else run into this? Thanks much for any advice.

passing value for azure_tags paramter

I guess this is likely my lack of knowledge that's causing the problem.

Azure policy on the subscription insists on tags being used.

I've changed build-image.ps1 so that the "azure-tags" parameter is passed as follows:

$azureTags = @{
    BusinessUnit = "IDS"
    Environment  = "Production"
}
packer build    -var "capture_name_prefix=$ResourcesNamePrefix" `
                -var "client_id=$ClientId" `
                -var "client_secret=$ClientSecret" `
                -var "install_password=$InstallPassword" `
                -var "location=$Location" `
                -var "resource_group=$ResourceGroup" `
                -var "storage_account=$StorageAccount" `
                -var "subscription_id=$SubscriptionId" `
                -var "temp_resource_group_name=$TempResourceGroupName" `
                -var "tenant_id=$TenantId" `
                -var "virtual_network_name=$VirtualNetworkName" `
                -var "virtual_network_resource_group_name=$VirtualNetworkRG" `
                -var "virtual_network_subnet_name=$VirtualNetworkSubnet" `
                -var "run_validation_diskspace=$env:RUN_VALIDATION_FLAG" `
                -var "azure_tags=$($azureTags | ConvertTo-Json -Compress)" `

The DevOps pipeline then fails on the BuildVM stage with the following error:

Build ubuntu2204 VM
Error: Variables not allowed
on value for var.azure_tags from arguments line 1:

Can anyone see what I've got wrong?

Build variable names not compatible with keyvault

Hi Yannick,

First of all thanks for your excellent work!

I am using your repo to fully automatically update our buildagents. In the spirit of having everything as code, I deploy the environment (the RGs, SIG, image definitions, etc) using Terraform. I'm using a Keyvault to set the image generation variables directly from Terraform (as it knows the resource names), and then link this keyvault to the DevOps 'Image Generation Variables' variable group.

Unfortunately, keyvault is notoriously known for not supporting secret names with underscores (_) in them. That's why I have to remove all underscores from the build variables to make this work. So CLIENT_ID becomes CLIENTID etc. This works well, but it causes a permanent diff with your code, which I'm not happy with.

Would you consider adding support for build variables using keyvault supported naming?

Error: A template expression is not allowed in this context

parameters:
- name: image_type
  displayName: Build Agent Image
  type: string
  default: windows2019
  values:
  - windows2019
  - ubuntu2004
- name: variable_group
  displayName: Variable Group
  type: string
  default: BuildAgents
- name: agent_pool
  displayName: Agent Pool
  type: string
  default: MyPool

trigger: none

pool: ${{ parameters.agent_pool }}

On validating I get

/buildagent-generation.yml (Line: 20, Col: 7): A template expression is not allowed in this context

if however, I change pool to be a hardcoded value it runs ok eg (pool: MyPool)

Build VM ubuntu2204 fails Timeout waiting for SSH

I am trying to create a new virtual machine scaleset for ubuntu2204 within a provided vnet.
Creation of resources is working and I have double checked the service principal.
During the build VM process of the pipeline, I get an the following error:

Syntax-only check passed. Everything looks okay.
Show Packer Version
1.7.4
Build ubuntu2204 VM
==> azure-arm.build_image: Running builder ...
==> azure-arm.build_image: Getting tokens using client secret
==> azure-arm.build_image: Getting tokens using client secret
azure-arm.build_image: Creating Azure Resource Manager (ARM) client ...
==> azure-arm.build_image: Creating resource group ...
==> azure-arm.build_image: Validating deployment template ...
==> azure-arm.build_image: Deploying deployment template ...
==> azure-arm.build_image:
==> azure-arm.build_image: Getting the VM's IP address ...
==> azure-arm.build_image: Waiting for SSH to become available...
==> azure-arm.build_image: Timeout waiting for SSH.
==> azure-arm.build_image:
==> azure-arm.build_image: Deleting individual resources ...

.....

Build 'azure-arm.build_image' errored after 22 minutes 51 seconds: Timeout waiting for SSH.

==> Wait completed after 22 minutes 51 seconds

==> Some builds didn't complete successfully and had errors:
--> azure-arm.build_image: Timeout waiting for SSH.

==> Builds finished but no artifacts were created.
##[debug]$LASTEXITCODE: 1
##[debug]Exit code 1 received from tool '/usr/bin/pwsh'
##[debug]STDIO streams have closed for tool '/usr/bin/pwsh'
##[debug]task result: Failed
##[error]PowerShell exited with code '1'.
##[debug]Processed: ##vso[task.issue type=error;]PowerShell exited with code '1'.
##[debug]Processed: ##vso[task.complete result=Failed;]PowerShell exited with code '1'.
Finishing: Build VM

Unable to Customize Disk space used by the Agents

Before I get into my issue , a Huge thank you . Everything you did helps us a ton and it solved all the issue we were having that stopped us from not leveraging Scale set's for Azure Devops Agents .

Everything works fantastic for us , but I am unable to find any option to customize the disk size of the Scale set agent once created , by default Ubuntu2204 comes with ~86 GB Disk and Windows comes default with 256GB of Default OS Disk space .

I have been trying to find a way to increase the Linux Default OS Disk size also to 256 , but not having luck finding it , Any help would be highly appretiated.

no such file or directory, stat '/agent/_work/8/s/scripts/build-image.ps1'

When I Run the pipeline, I got the error below. Is there something I do wrong?

image

More info:

2023-05-19T13:18:09.0976071Z ##[debug]Evaluating condition for step: 'Build VM'
2023-05-19T13:18:09.0976908Z ##[debug]Evaluating: SucceededNode()
2023-05-19T13:18:09.0977168Z ##[debug]Evaluating SucceededNode:
2023-05-19T13:18:09.0977594Z ##[debug]=> True
2023-05-19T13:18:09.0977874Z ##[debug]Result: True
2023-05-19T13:18:09.0978144Z ##[section]Starting: Build VM
2023-05-19T13:18:09.0983485Z ==============================================================================
2023-05-19T13:18:09.0983627Z Task : PowerShell
2023-05-19T13:18:09.0983699Z Description : Run a PowerShell script on Linux, macOS, or Windows
2023-05-19T13:18:09.0983805Z Version : 2.220.0
2023-05-19T13:18:09.0983872Z Author : Microsoft Corporation
2023-05-19T13:18:09.0984209Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2023-05-19T13:18:09.0984494Z ==============================================================================
2023-05-19T13:18:09.1295323Z ##[debug]Using node path: /agent/externals/node16/bin/node
2023-05-19T13:18:09.1918796Z ##[debug]agent.TempDirectory=/agent/_work/_temp
2023-05-19T13:18:09.1927768Z ##[debug]loading inputs and endpoints
2023-05-19T13:18:09.1932144Z ##[debug]loading INPUT_TARGETTYPE
2023-05-19T13:18:09.1940868Z ##[debug]loading INPUT_FILEPATH
2023-05-19T13:18:09.1942883Z ##[debug]loading INPUT_ARGUMENTS
2023-05-19T13:18:09.1945002Z ##[debug]loading INPUT_SCRIPT
2023-05-19T13:18:09.1946936Z ##[debug]loading INPUT_ERRORACTIONPREFERENCE
2023-05-19T13:18:09.1948906Z ##[debug]loading INPUT_WARNINGPREFERENCE
2023-05-19T13:18:09.1950845Z ##[debug]loading INPUT_INFORMATIONPREFERENCE
2023-05-19T13:18:09.1953641Z ##[debug]loading INPUT_VERBOSEPREFERENCE
2023-05-19T13:18:09.1956158Z ##[debug]loading INPUT_DEBUGPREFERENCE
2023-05-19T13:18:09.1958710Z ##[debug]loading INPUT_PROGRESSPREFERENCE
2023-05-19T13:18:09.1961608Z ##[debug]loading INPUT_FAILONSTDERR
2023-05-19T13:18:09.1964413Z ##[debug]loading INPUT_SHOWWARNINGS
2023-05-19T13:18:09.1967383Z ##[debug]loading INPUT_IGNORELASTEXITCODE
2023-05-19T13:18:09.1970110Z ##[debug]loading INPUT_PWSH
2023-05-19T13:18:09.1971963Z ##[debug]loading INPUT_WORKINGDIRECTORY
2023-05-19T13:18:09.1973882Z ##[debug]loading INPUT_RUNSCRIPTINSEPARATESCOPE
2023-05-19T13:18:09.1975714Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2023-05-19T13:18:09.1977475Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2023-05-19T13:18:09.1979289Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2023-05-19T13:18:09.1982403Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2023-05-19T13:18:09.1985309Z ##[debug]loading SECRET_CLIENT_SECRET
2023-05-19T13:18:09.1987424Z ##[debug]loaded 21
2023-05-19T13:18:09.1991196Z ##[debug]Agent.ProxyUrl=undefined
2023-05-19T13:18:09.1992098Z ##[debug]Agent.CAInfo=undefined
2023-05-19T13:18:09.1992907Z ##[debug]Agent.ClientCert=undefined
2023-05-19T13:18:09.1993677Z ##[debug]Agent.SkipCertValidation=undefined
2023-05-19T13:18:09.1999243Z ##[debug]check path : /agent/_work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.220.0/task.json
2023-05-19T13:18:09.2002524Z ##[debug]adding resource file: /agent/_work/_tasks/PowerShell_e213ff0f-5d5c-4791-802d-52ea3e7be1f1/2.220.0/task.json
2023-05-19T13:18:09.2003714Z ##[debug]system.culture=en-US
2023-05-19T13:18:09.2014422Z ##[debug]errorActionPreference=stop
2023-05-19T13:18:09.2016423Z ##[debug]warningPreference=default
2023-05-19T13:18:09.2018259Z ##[debug]informationPreference=default
2023-05-19T13:18:09.2020020Z ##[debug]verbosePreference=default
2023-05-19T13:18:09.2022511Z ##[debug]debugPreference=default
2023-05-19T13:18:09.2024560Z ##[debug]progressPreference=silentlyContinue
2023-05-19T13:18:09.2034937Z ##[debug]showWarnings=false
2023-05-19T13:18:09.2037432Z ##[debug]failOnStderr=false
2023-05-19T13:18:09.2039925Z ##[debug]ignoreLASTEXITCODE=false
2023-05-19T13:18:09.2042386Z ##[debug]workingDirectory=/agent/_work/8/s
2023-05-19T13:18:09.2042747Z ##[debug]check path : /agent/_work/8/s
2023-05-19T13:18:09.2045034Z ##[debug]targetType=filePath
2023-05-19T13:18:09.2047236Z ##[debug]filePath=/agent/_work/8/s/scripts/build-image.ps1
2023-05-19T13:18:09.2051483Z ##[debug]task result: Failed
2023-05-19T13:18:09.2081976Z ##[error]ENOENT: no such file or directory, stat '/agent/_work/8/s/scripts/build-image.ps1'
2023-05-19T13:18:09.2089788Z ##[debug]Processed: ##vso[task.issue type=error;]ENOENT: no such file or directory, stat '/agent/_work/8/s/scripts/build-image.ps1'
2023-05-19T13:18:09.2090811Z ##[debug]Processed: ##vso[task.complete result=Failed;]ENOENT: no such file or directory, stat '/agent/_work/8/s/scripts/build-image.ps1'
2023-05-19T13:18:09.2098214Z ##[section]Finishing: Build VM

Managed Image - Create Azure Manged Image - variable not passing

Running the first pipeline the first time so using an Aazue public hosted agent to run the pipeline

imagegeneration.buildVm completes and shows the correct output

2021-04-13T11:06:54.2078603Z ==> Builds finished. The artifacts of successful builds are:
2021-04-13T11:06:54.2079579Z --> azure-arm: Azure.ResourceManagement.VMImage:
2021-04-13T11:06:54.2079930Z 
2021-04-13T11:06:54.2080170Z OSType: Linux
2021-04-13T11:06:54.2080466Z StorageAccountLocation: uksouth
2021-04-13T11:06:54.2087754Z OSDiskUri: https://xxxxxx.blob.core.windows.net/system/Microsoft.Compute/Images/images/31980-osDisk.4c996321-6748-4823-8a65-58df893e1d40.vhd
2021-04-13T11:06:54.2091189Z OSDiskUriReadOnlySas: https://xxxxxx.t.blob.core.windows.net/system/Microsoft.Compute/Images/images/31980-osDisk.4c996321-6748-4823-8a65-58df893e1d40.vhd?se=2021-05-13T11%3A06%3A54Z&sig=xxxxxx.%3D&sp=r&sr=b&sv=2018-03-28
2021-04-13T11:06:54.2093613Z TemplateUri: https://xxxxxx..blob.core.windows.net/system/Microsoft.Compute/Images/images/31980-vmTemplate.4c996321-6748-4823-8a65-58df893e1d40.json
2021-04-13T11:06:54.2094999Z TemplateUriReadOnlySas: https://xxxxxx..blob.core.windows.net/system/Microsoft.Compute/Images/images/31980-vmTemplate.4c996321-6748-4823-8a65-58df893e1d40.json?se=2021-05-13T11%3A06%3A54Z&sig=xxxxxx.&sp=r&sr=b&sv=2018-03-28
2021-04-13T11:06:54.2095574Z 
2021-04-13T11:06:54.6155207Z ##[section]Finishing: Build VM

However, create managed image fails with

2021-04-13T11:07:21.6258105Z ##[section]Starting: Create Azure Managed Image
2021-04-13T11:07:21.6264541Z ==============================================================================
2021-04-13T11:07:21.6264845Z Task         : PowerShell
2021-04-13T11:07:21.6265103Z Description  : Run a PowerShell script on Linux, macOS, or Windows
2021-04-13T11:07:21.6265338Z Version      : 2.180.1
2021-04-13T11:07:21.6265534Z Author       : Microsoft Corporation
2021-04-13T11:07:21.6265834Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
2021-04-13T11:07:21.6266154Z ==============================================================================
2021-04-13T11:07:21.9998749Z Generating script.
2021-04-13T11:07:22.0039248Z ========================== Starting Command Output ===========================
2021-04-13T11:07:22.0049005Z [command]/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/home/vsts/work/_temp/72b28d53-e555-43a4-aa8b-d0f8bbcd3912.ps1'
2021-04-13T11:07:23.5321963Z �[91mcreate-managedimage.ps1: �[0m/home/vsts/work/_temp/72b28d53-e555-43a4-aa8b-d0f8bbcd3912.ps1:2
2021-04-13T11:07:23.5329067Z �[96mLine |
2021-04-13T11:07:23.5333111Z �[96m   2 | �[0m … c2127 ` -Location UKSouth ` -ImageType ubuntu2004 ` �[96m-OsVhdUri�[0m  ` -OsT …
2021-04-13T11:07:23.5338299Z �[96m     | �[91m                                                       ~~~~~~~~~
2021-04-13T11:07:23.5340881Z �[91m�[96m     | �[91mMissing an argument for parameter 'OsVhdUri'. Specify a
2021-04-13T11:07:23.5407057Z �[96m     | �[91mparameter of type 'System.String' and try again.
2021-04-13T11:07:23.5408606Z �[0m
2021-04-13T11:07:23.5619004Z ##[error]PowerShell exited with code '1'.
2021-04-13T11:07:23.5654223Z ##[section]Finishing: Create Azure Managed Image

Failure in building Ubuntu 2204 image

We started getting the following error message effective today:

2023-03-02T18:26:34.9819577Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:26:34.9823918Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:26:34.9829150Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 19 attempts left
2023-03-02T18:27:08.6926940Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:27:08.6930948Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:27:08.6936179Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 18 attempts left
2023-03-02T18:27:40.0008634Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:27:40.0012821Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:27:40.0024019Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 17 attempts left
2023-03-02T18:28:11.1161656Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:28:11.1166057Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:28:11.1171523Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 16 attempts left
2023-03-02T18:28:42.8183498Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:28:42.8188112Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:28:42.8193530Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 15 attempts left
2023-03-02T18:29:14.7422271Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:29:14.7426379Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:29:14.7431695Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 14 attempts left
2023-03-02T18:29:45.3858832Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:29:45.3862874Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:29:45.3868354Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 13 attempts left
2023-03-02T18:30:16.2499116Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:30:16.2503284Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:30:16.2508757Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 12 attempts left
2023-03-02T18:30:47.0776538Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:30:47.0780607Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:30:47.0785821Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 11 attempts left
2023-03-02T18:31:18.2482382Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:31:18.2486815Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:31:18.2491964Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 10 attempts left
2023-03-02T18:31:50.8730167Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:31:50.8734672Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:31:50.8739880Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 9 attempts left
2023-03-02T18:32:21.8498290Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:32:21.8502637Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:32:21.8507831Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 8 attempts left
2023-03-02T18:32:52.6230790Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:32:52.6235698Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:32:52.6241043Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 7 attempts left
2023-03-02T18:33:23.7646518Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:33:23.7651980Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:33:23.7657932Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 6 attempts left
2023-03-02T18:33:54.7310483Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:33:54.7314935Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:33:54.7320099Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 5 attempts left
2023-03-02T18:34:25.9124051Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:34:25.9128382Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:34:25.9133492Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 4 attempts left
2023-03-02T18:34:56.9730816Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:34:56.9735212Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:34:56.9740362Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 3 attempts left
2023-03-02T18:35:28.1015871Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:35:28.1020134Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:35:28.1025413Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 2 attempts left
2023-03-02T18:35:58.7471148Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:35:58.7476208Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:35:58.7481950Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 1 attempts left
2023-03-02T18:36:30.6204673Z azure-arm.build_vhd: Error — Either HTTP response code for 'https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
2023-03-02T18:36:30.6208895Z azure-arm.build_vhd: commandlinetools-linux-9645777_latest.zip
2023-03-02T18:36:30.6214305Z azure-arm.build_vhd: commandlinetools-linux-9644228_latest.zip' is wrong - '200000000' or exit code is not 0 - '6'. Waiting 30 seconds before the next attempt, 0 attempts left
2023-03-02T18:37:00.6226144Z azure-arm.build_vhd: Could not download https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip

need help in deploying self hosted agent

Hello,

I am new to this and would like to deploy server 2019 image for self-hosted agent in our environment.
We have enabled private endpoint on our resources so microsoft hosted agent will not work as public access is disabled so devops scripts are failing,

i have deployed image from github so have mimnimum knowledge. can someone help me deploying this in our environment from scratch. need help in building a base image then i can handle the rest of the work of creating vmss and deploy instances.

Also, want to know how can i regularly update the image. it would be really helpful if someone can jump on a remote session.

Using released versions of runner images?

The pipelines in this repo use the main-branch version of the runner-images repository to get the scripts for the various image-types.

If I'm not mistaken this main-branch is where all development is happening and this is regularly being formed into a (pre-)release. If this is correct, wouldn't it be better to only use the released versions of the runner-images?

Getting the following error: PlatformImageNotFound : The platform image 'xxx' is not available

I've tried with all versions which are in your pipelines by default. But neither Ubuntu (20.04/22.04) nor Windows (2019/2022) work.
They all give the same error.

image

I've checked the availability of the images using the Azure CLI. The sku's are available in my region.

az vm image list-skus --location westeurope --publisher MicrosoftWindowsServer --offer WindowsServer

The error happened during the Build VM step.

No space left on device

Hi Yannick,

Thank you for sharing this repo! Very helpfull!

since a few weeks we have some issues with running pipeliens due to fill disks.
image

error: unable to write file *****************************/variables.tf
Updating files: 87% (1364/1554)
error: unable to write file /versions.tf
fatal: cannot create directory at '
': No space left on device
##[error]No space left on device : '/agent/_diag/Worker_20240228-003108-utc.log'

Is this something you can fix or do you have any tips for me?

Feature request - support for managed image library

Azure now has the concept of a manged image library that allows sharing of images and automatic distribution across regions

https://docs.microsoft.com/en-us/azure/virtual-machines/shared-image-galleries

It would be nice if their was an option to optionally specify that you want to store the image in a manged library and what regions you would like it to be stored in.

It can be done post packer image generation, additionally; packer has support for this built in.

GithubFeedToken

Hey Yannick,

I noticed you require a github_feed_token parameter to be set.
Is this still required? There was a commit in the official virtual-environments repo some time ago which removed the requirement:

actions/runner-images@4462c5b

Issue creating windows2022 image

I'm currently having issues building a new win2022 image, ubuntu images are being built fine.

The pipeline runs for ~6hours fine then errors out with the below (tested on 3 seperate runs)
image

Any ideas? Or a way I could dig into the issue further?

Thanks,

QUESTION: Is there still no easier method?

Anno 2023 it seems like this method is quite complex.

Is there no easier method to create and share these images across multiple orgs?

In my situation I need to setup VMSS for different azure environments. Building these images per client is quite cumbersome. How would you tackle this situation?

packer is not available for hosted agent

When using the pipeline the packer tool is not available.
Adding the extension "packer" and adding the task packertool into the buildagent-generation-template is required:

    - task: PackerTool@0
      inputs:
        version: 

cleanup.ps1

cleanup.ps1 : The term 'az' is not recognized as the name of a cmdlet,
function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the
path is correct and try again.
At C:\a_temp\a0ea801e-2bd1-4e92-8d32-45fbc2fd26d4.ps1:4 char:1

  • . 'C:\a\3\s\azuredevops-buildagents\scripts\cleanup.ps1' -ResourcesNa ...
  •   + CategoryInfo          : ObjectNotFound: (az:String) [cleanup.ps1], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException,cleanup.ps1
    

Breaking change coming in next pre-release for Windows 2022

Hi,

I have been using this great process for some time to generate out build images for Windows 2022 and recently ran into some issues.

It started with this error
actions/runner-images#8149

Which was fixed on the Aug 24, under the current pre-release.

So I tried to take the pre-release branch and it generated a different error right at the start of the process. related to bad arguments.
Investigating, I found that there are changes to the parameters that are being used in the runner-images build process due to a fundamental change wi th how images are stored in Azure.
resource_group

I will see if I can figure the correct arguments, but any assistance would be greatly appreciated as we currently have some version compatabilities issues on some outdated build images.

Thanks

Waiting for WinRM to become available - Build VM task

Hi Yannick,

Thank you for sharing this repo, great stuff !

When using the variables :
BUILD_AGENT_SUBNET_NAME
BUILD_AGENT_VNET_NAME
BUILD_AGENT_VNET_RESOURCE_GROUP

I am seeing "Waiting for WinRM to become available" during the Build VM task.

image

Have you seen this before or know any options here ?

I am wondering if this is because we are not calling the following variable defined in the Runner Images packer file or should the packer image build fine with a private only IP/Isolated VNET ?
https://github.com/actions/runner-images/blob/main/images/windows/templates/windows-2022.pkr.hcl

variable "private_virtual_network_with_public_ip" {
type = bool
default = false
}

Many Thanks!

Issue with run_validation_diskspace

The VNET commit seems to have broken something for me:

Syntax-only check passed. Everything looks okay.
Show Packer Version
1.8.4
Build ubuntu2204 VM
Error: Missing expression

  on <value for var.run_validation_diskspace from arguments> line 1:
  (source code not available)

Expected the start of an expression, but found the end of the file.

What is the expected behavior?

The term 'packer' is not recognized as the name of

Hi,

I am having trouble using you're devops pipeline.

It fails saying the term packer is not recognized. I know it's there because in the previous step I installed it. And that also proves it is already installed

image

Do you have any idea?

image

Thanks,
Ronald

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.