azureazure-devopsdevopsazure-vm-scale-set

How to configure VMSS Azure DevOps agent VMs to run interactive tests without using new un-elevated account with auto-login?


I would like to perform Automated UI tests via TestExecute in Azure DevOps pipeline which is using Azure Virtual Machine Scale Sets as agent pool.

When I "Configure VMs to run interactive tests", the new agent/OS is booting with new auto-login user called "AzDevOps", instead of using the user I provided with the Azure VMSS image. The problem is that this user does not have license for TextExecute nor some other config.

  1. Is there a way to configure interactive mode for the admin user I created on the VMSS gallery image and force pipeline to use that user for executing steps?
  2. Is there a way to get/reset the pass for the new "AzDevOps" user so I can login to the VMSS instance and check things?

Solution

  • After few months of exploring options. I found solutions.

    1. There is no way to choose other than "AzDevOps" user for Azure DevOps agents running in interactive mode on Azure VMSS instances. But I could configure new user called "AzDevOps" in the base gallery image and add required licenses to that user account.

    2. I had to add a custom extension to the VMSS which would change "AzDevOps" account password to a known password after each instance is created, because pipeline generates a random password by default.

    Also, Test Execute has its tool "SessionCreator" which can create a specific sessions with specified user config per test run and evade this issue with AzDevOps account.