Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Azure Linux Agent Install
« previous
next »
Print
Pages: [
1
]
Author
Topic: Azure Linux Agent Install (Read 726 times)
markes20754
Newbie
Posts: 7
Karma: 0
Azure Linux Agent Install
«
on:
May 01, 2024, 11:39:40 pm »
I've been able to find some references in posts but I haven't found any clear instructions on how to install the Azure Linux Agent onto an uploaded OPNSense HyperV image. Has anyone been able to successfully install and configure the agent? If so, could you share your steps?
Thanks in advance!
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Azure Linux Agent Install
«
Reply #1 on:
May 01, 2024, 11:50:44 pm »
According to their documentation
https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-linux
, not much support for freeBSD:
Other supported systems:
The Agent works on more systems than those listed in the documentation. However, we do not test or provide support for distros that are not on the endorsed list. In particular, FreeBSD is not endorsed. The customer can try FreeBSD 8 and if they run into problems they can open an issue in our GitHub repository and we may be able to help.
More importantly:
The Linux agent depends on these system packages to function properly:
Python 2.6+
OpenSSL 1.0+
OpenSSH 5.3+
File system utilities: sfdisk, fdisk, mkfs, parted
Password tools: chpasswd, sudo
Text processing tools: sed, grep
Network tools: ip-route
Kernel support for mounting UDF file systems
Some of these dependencies will not be met in a freeBSD system by default.
Logged
markes20754
Newbie
Posts: 7
Karma: 0
Re: Azure Linux Agent Install
«
Reply #2 on:
May 02, 2024, 04:16:23 am »
UPDATE: After posting this I was able to piece together some other articles and get this working. These are just my quick notes so someone smarter than me should be able to polish this up.
#Disable the default swap file - Azure agent mounts a temp volume presented to the VM and creates its own swap file
swapoff /dev/gpt/swapfs
#Install the agent dependencies
pkg upgrade
pkg install -y sudo bash git
# check on the python path -- at the time of this post it's 3.9 and create the link for python
ls /usr/local/bin/python*
ln -s /usr/local/bin/python3.9 /usr/local/bin/python
# clone the agent
git clone
https://github.com/Azure/WALinuxAgent.git
cd WALinuxAgent
#check the current stable build -- at the time of this post it's v2.10.0.8
git checkout v2.10.0.8
#install the agent and register it as a service
python setup.py install --register-service
#create links for the agent
ln -sf /usr/local/sbin/waagent /usr/sbin/waagent
ln -sf /usr/local/sbin/waagent2.0 /usr/sbin/waagent2.0
#Setup the agent service scripts
echo '#! /bin/sh' >> /usr/local/etc/rc.d/waagent.sh
echo '/usr/local/sbin/waagent --daemon' >> /usr/local/etc/rc.d/waagent.sh
chmod +x /usr/local/etc/rc.d/waagent.sh
echo 'waagent_enable="YES"' >> /etc/rc.conf.local
#Change the agent built swap from 16gb default to 6gb -- the temp volume in my VM was only 8GB
sed -i .bak 's/ResourceDisk.SwapSizeMB=16384/ResourceDisk.SwapSizeMB=6144/g' /etc/waagent.conf
#A quick version check. If this doesn't return the version something went wrong
waagent -version
service waagent status
service waagent start
service waagent status
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Azure Linux Agent Install
«
Reply #3 on:
May 02, 2024, 11:42:45 am »
Nice.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Azure Linux Agent Install