You can use the Azure DevTest Labs Tasks extension that's installed in Azure DevOps to easily integrate your CI/CD build-and-release pipeline with Azure DevTest Labs. The extension installs three tasks: Create a VM Create a custom image from a VM Delete a VM The process makes it easy to, for example, quickly deploy a "golden image" for a specific test task and then delete it when the test is finished. References: https://docs.microsoft.com/en-us/azure/lab-services/devtest-lab-integrate-ci-cd-vsts