如何解决无法启动服务以在运行 Linux VM 的 Azure 上运行私有构建代理的问题

A. *_*zel 5 build-agent azure-devops azure-devops-self-hosted-agent

我已经为 Linux 上的 Azure DevOps 安装并以交互方式运行了一个私有构建代理。

但是,当尝试按照文档设置为服务时,它无法运行。它通常会成功完成安装。但是,启动服务总是会返回错误。

配置:运行 Ubuntu 18.04LTS 的新 VM,使用 AAD 和 JIT 进行保护,使用 VM 管理员权限登录。

错误

$ sudo ./svc.sh install
Creating launch agent in /etc/systemd/system/vsts.agent.xxx.linux-agent-01.service
Run as user: xxx@microsoft.com
Run as uid: 1613914
gid: 1613914
$ sudo ./svc.sh start
Failed to start vsts.agent.xxx.linux-agent-01.service: Unit vsts.agent.xxx.linux-agent-01.service is not loaded properly: Exec format error.
See system logs and 'systemctl status vsts.agent.xxx.linux-agent-01.service' for details.
Failed: failed to start vsts.agent.xxx.linux-agent-01.service
$
Run Code Online (Sandbox Code Playgroud)

尝试运行时,我得到了这个:

3$ sudo ./svc.sh status

/etc/systemd/system/vsts.agent.edgewebui.LinuxAgent03.service
? vsts.agent.edgewebui.LinuxAgent03.service - VSTS Agent (edgewebui.LinuxAgent03)
   Loaded: error (Reason: Exec format error)
   Active: inactive (dead)

Feb 28 18:59:18 build-agent-linux systemd[1]: /etc/systemd/system/vsts.agent.edgewebui.LinuxAgent03.service:7: Invalid user/group…osoft.com
Hint: Some lines were ellipsized, use -l to show in full.
Run Code Online (Sandbox Code Playgroud)

关于为什么这不起作用的任何建议。