hi Scott Wilson,
the most effective solution is to clean up the temporary directory on your arc enabled server. the extension upgrade process uses the temp folder to download and extract the new agent files. if this folder is full of old files from previous operations, it runs out of space.
log onto the windows server. open file explorer and navigate to C:\WindowsAzure\Logs\Plugins\Microsoft.Azure.Monitor.AzureMonitorWindowsAgent\. in this folder, you will likely find several subfolders with version numbers. you can safely delete the older version folders, like the one for version 1.36. this will free up the necessary space for the 1.38 upgrade to unzip. after cleaning up, try the upgrade operation again from the azure portal.
if cleaning the log folder does not free up enough space, you can also clear the general windows temp folder. press windows key + r, type %temp%, and hit enter. you can delete all the files in this folder. windows might prevent some files from being deleted because they are in use, which is fine, just skip those.
another thing to try is a manual workaround. you can try to uninstall the current agent extension completely and then install the latest version fresh. sometimes a clean install bypasses the upgrade space issue. you can do this from the azure arc blade in the portal by selecting your server, going to extensions, and removing the azure monitor agent. then, add it again.
if you are still stuck, you need to contact azure support. this is a platform limitation that they are aware of, and they might have other internal tools or guidance for forcing the upgrade on resource constrained servers.
this kind of disk space issue during an agent upgrade is a common challenge with any monitoring tool, not just azure. it is always a good practice to monitor the free space on the system drive of your servers.
your first and best action is to log onto the server and clean out the old agent version folders in C:\WindowsAzure\Logs\Plugins\.... this will almost certainly free up the space needed for the new version to install.
i hope the cleanup gets your agent upgraded smoothly.
rgds,
Alex