Search code examples
azure-devopsazure-devops-rest-apiazure-linux

How can we automatically start the azure agent in a self hosted Ubuntu VM


I have installed an azure agent on a self hosted linux VM as per the documentation here & like to start the agent (i.e., trigger ./run.sh) when the VM is started everytime.


Solution

  • You can set the agent as a systemed service.

    If your agent is running on these operating systems you can run the agent as a systemd service:

    Ubuntu 16 LTS or newer

    Red Hat 7.1 or newer