Skip to content

[Question]: How to remove environment agent if it is not visible in UI? #5299

@eshmurus

Description

@eshmurus

Describe your question

Our case: The resource (virtual machine) was manually deleted from the Azure DevOps Environment, and when try to create a new one with the same name, we get the error:

Failed to connect to xxx or execute command: Pool environment-xx- already contains an agent with name xxx_yyy

This agent/resource is not visible on UI, rest api doesn't return anything about it.
I tried --replace parameter, but it doesn't work for env agents.

Do you have any ideas?

Versions

agent version: 4.260

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Operation system

Windows 2019

Version controll system

No response

Azure DevOps Server Version (if applicable)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions