Welcome to Microsoft Q&A Platform!
If your Azure Batch application package is not showing up in the /root/applications
directory, follow these debugging steps:
Run the following command to check if your pool has the correct application package reference:
az batch application package list --application-name applicationpackagename --name mounibatch --resource-group resourcegroupname
If it's empty, you need to reassign the package to the pool using: *az batch pool set *
*--account-name mounibatch *
*--account-endpoint https://mounibatch.eastus.batch.azure.com *
*--pool-id my-test-pool2 *
--application-package-references mounikaappid#1.1
After you reassign the package, it should show like below.
Environment variable visibility
These environment variables are visible only in the context of the task user, which is the user account on the node under which a task is executed. You won't see these variables when connecting remotely to a compute node via Remote Desktop Protocol (RDP) or Secure Shell (SSH) and listing environment variables. This is because the user account that is used for remote connection is not the same as the account that is used by the task.
https://learn.microsoft.com/en-us/azure/batch/batch-compute-node-environment-variables
Instead of set
, use WMIC (Windows Management Instrumentation Command-line):
wmic ENVIRONMENT where "Name like 'AZ_BATCH_APP_PACKAGE%'" get Name,VariableValue
This works because WMIC queries all environment variables, including those set by Azure Batch.
If the error still persists, delete and recreate the pool to force Azure to reapply the application package.
Hope this helps!
Let me know if you have any further queries!