Hello Tommy Nielsen - Thank you for reaching Microsoft QnA Platform
Azure Batch must have a ContainerConfiguration on the pool with the right image name and registry and if this is missing or malformed, the pool will reject the task containers as invalid. -https://learn.microsoft.com/en-us/azure/batch/batch-docker-container-workloads
If the node cannot authenticate to ACR, container creation can fail with generic container invalid type errors.
Managed Identity: (https://stackoverflow.com/questions/79520277/azure-batch-pool-with-acr-fails-to-fetch-image)
- Please create a User-Assigned Managed Identity (UAMI).
- On the ACR, please grant that UAMI at least the AcrPull role (IAM > Add role assignment > as AcrPull).
- On the Batch account, enable Identity and attach the same UAMI.
- In the pool’s Container configuration please specify the registry with identity-based auth Portal will show a “Managed identity” / “User-assigned identity” reference.
- Enable ACR admin account (under Access keys), copy username and password. In pool Container configuration > Container registries set: Registry server: myregistry.azurecr.io (e.g) Username: ACR admin user (e.g) Password: ACR admin password. (e.g)
A malformed task container setting can also cause container invalid.
please try to check on the job/task:
Task > Container settings: Here image name matches exactly what is configured/prefetched on the pool, e.g. myregistry.azurecr.io/myrepo/myimage:v2.
Note: please do not omit the registry prefix or tag if your pool prefetches a specific tag.
For enable Batch diagnostics logging to a Storage account on the Batch account - https://learn.microsoft.com/en-us/azure/batch/best-practices#attaching-and-preparing-data-disks