Hi @RobH,
azcmagent config info does not expose any option to configure or change the working directory or extension install path for the Azure Arc agent (including extensions like AzureMonitorLinuxAgent).
This is by design. Azure Arc for servers is intended to provide a consistent, managed experience, and does not currently support customizing extension install directories via agent configuration.
There’s no documented flag or config to change the install directory of the extension payloads.
Fix the issue where shim.sh can’t execute (your original error) by:
Remounting /var without noexec, at least temporarily:
sudo mount -o remount,exec /var
Or relocating /var/lib/waagent to a path without noexec:
sudo mkdir /opt/waagent
sudo cp -a /var/lib/waagent/* /opt/waagent/
sudo mv /var/lib/waagent /var/lib/waagent.bak
sudo ln -s /opt/waagent /var/lib/waag
Please let me know if you face any challenge here, I can help you to resolve this issue further
Provide your valuable Comments.
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.