(ContainerAppInvalidVolumeMount) Invalid Request: Volume '' to mount doesn't defined in the Container App 'xxx'.

Per Schondell 20 Reputation points
2025-03-03T13:37:07.2066667+00:00

I have created a container app and a file share following these instructions:
Tutorial: Create an Azure Files volume mount in Azure Container Apps | Microsoft Learn

After exporting the yaml, I added :
volumeMounts:
- name: simplemq
mountPath: /app/simplemq

when doing an update:
az containerapp update --name simplemqprovider --resource-group CoordinateSuisse --yaml .\simplemq.yml

I get this error:
(ContainerAppInvalidVolumeMount) Invalid Request: Volume '' to mount doesn't defined in the Container App 'simplemqprovider'.

and no volume mounted. What can be wrong?

this is my whole yaml
id: /subscriptions/{guid}/resourceGroups/CoordinateSuisse/providers/Microsoft.App/containerapps/simplemqprovider

identity:

type: None

location: Somewhere

name: simplemqprovider

properties:

configuration:

activeRevisionsMode: Single

dapr: null

ingress:

  additionalPortMappings:

  - exposedPort: 180

    external: false

    targetPort: 180

  allowInsecure: true

  clientCertificateMode: Ignore

  corsPolicy: null

  customDomains: null

  exposedPort: 0

  external: true

  fqdn: simplemqprovider.mangoplant.azurecontainerapps.io

  ipSecurityRestrictions: null

  stickySessions:

    affinity: none

  targetPort: 8080

  traffic:

  - latestRevision: true

    weight: 100

  transport: Auto

maxInactiveRevisions: 100

registries: null

secrets: null

service: null

customDomainVerificationId: 005309E732A8C2FBFACC6D42353B5C8FE5E080C246C3844A6FC169A1CC80F725

delegatedIdentities: []

environmentId: /subscriptions/{guid}/resourceGroups/CoordinateSuisse/providers/Microsoft.App/managedEnvironments/managedEnvironment-CoordinateSuiss

eventStreamEndpoint: https://somewhere.azurecontainerapps.dev/subscriptions/{guid}/resourceGroups/CoordinateSuisse/containerApps/simplemqprovider/eventstream

latestReadyRevisionName: simplemqprovider--behlioh

latestRevisionFqdn: xxx

latestRevisionName: xxx

managedEnvironmentId: /subscriptions/{guid}/resourceGroups/CoordinateSuisse/providers/Microsoft.App/managedEnvironments/managedEnvironment-CoordinateSuiss

outboundIpAddresses:

- shorted list of ip adreses

provisioningState: Succeeded

runningStatus: Running

template:

containers:

- env:

  - name: ASPNETCORE_ENVIRONMENT

    value: Development

  - name: test

    value: test

  image: docker.io/xxx:latest

  name: simplemqprovider

  probes: []

  resources:

    cpu: 0.25

    ephemeralStorage: 1Gi

    memory: 0.5Gi

  volumeMounts:

  - name: simplemq

    mountPath: /app/simplemq

initContainers: null

revisionSuffix: ''

scale:

  maxReplicas: 3

  minReplicas: 1

  rules: null

serviceBinds: null

terminationGracePeriodSeconds: null

volumes:

- name: simplemq

  storageName: simplemq

  storageType: AzureFile

workloadProfileName: Consumption

resourceGroup: CoordinateSuisse

systemData:

createdAt: '2025-03-01T21:20:26.5001332'

createdBy: ******@somehow.org

createdByType: User

lastModifiedAt: '2025-03-03T10:05:47.3019289'

lastModifiedBy: ******@somehow.org

lastModifiedByType: User

type: Microsoft.App/containerApps

Azure Container Apps
Azure Container Apps
An Azure service that provides a general-purpose, serverless container platform.
562 questions
{count} votes

Accepted answer
  1. Arko 335 Reputation points Microsoft External Staff
    2025-03-05T13:34:11.5333333+00:00

    Hi Per Schondell,

    In order to set up a container app with an azure files volume mount, create a storage account and a file share where our container can mount files.

    az storage account create \
      --name arkstoragedemo \
      --resource-group arkorg \
      --location centralindia \
      --sku Standard_LRS \
      --kind StorageV2
    

    enter image description here

    az storage share create \
      --name simplemqshare \
      --account-name arkstoragedemo
    
    

    Get Storage Account Key

    STORAGE_KEY=$(az storage account keys list \
      --account-name arkstoragedemo \
      --query "[0].value" --output tsv)
    
    

    enter image description here

    If you want, you can put this in a variable

    enter image description here

    Create a Container App in the arkorg resource group and configure it to mount the Azure File Share.

    create an env for the same

    az containerapp env create \
      --name ark-container-env \
      --resource-group arkorg \
      --location centralindia
    

    enter image description here

    connect your file share to this environment

    az containerapp env storage set \
      --name ark-container-env \
      --resource-group arkorg \
      --storage-name simplemq \
      --azure-file-account-name arkstoragedemo \
      --azure-file-share-name simplemqshare \
      --azure-file-account-key "$STORAGE_KEY" \
      --access-mode ReadWrite
    

    enter image description here

    Deploy the Container App with Azure Files Mounted

    Use this as reference to update your simplemq.yml

    ---
    name: simplemqprovider
    location: centralindia
    type: Microsoft.App/containerApps
    properties:
      environmentId: >
        /subscriptions/abcdefghijk/resourceGroups/arkorg/
        providers/Microsoft.App/managedEnvironments/ark-container-env
      configuration:
        activeRevisionsMode: Single
        ingress:
          external: true
          targetPort: 8080
          traffic:
            - latestRevision: true
              weight: 100
      template:
        containers:
          - name: simplemqprovider
            image: docker.io/library/nginx:latest
            resources:
              cpu: 0.25
              memory: 0.5Gi
            volumeMounts:
              - volumeName: simplemq
                mountPath: /app/simplemq
        volumes:
          - name: simplemq
            storageType: AzureFile
            storageName: simplemq
    
    

    Now try to deploy the Container App

    az containerapp create \
      --resource-group arkorg \
      --name simplemqprovider \
      --environment ark-container-env \
      --yaml simplemq.yml
    
    
    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.