I am trying to add a new resource to an existing environment. I already have multiple vm resources in it. But I am getting an error in adding a new on premise VM to it.
I run the powershell in the vm in admin mode. I get the script from devops when I click on Add New Resource to an existing Environment and select VM. ON executing it in VM’s powershell which I want added as the resource creates a folder A2 in C:/azagent and then asks for tag and soon as I provide Tag value it returns the following error:
Error reported in diagnostic logs. Examine the log for more information.
– C:azagentA2_diagAgent_20240729-073104-utc.log
Failed to add virtual machine resource. Linked environment pool is null.
Error adding agent. Try again or press CTRL+C to exit.
I went through logs saw a few Key not found messages and tried to install Java in the VM even after it I do not see any change in the error.