Azure Container Instance does not resolve name within the same vnet using private DNS zone

jbx999 236 Reputation points

I have a Vnet with 2 virtual machines and 2 container instances.
I have 2 subnets, and, because apparently Container Instances cannot be deployed in subnets that have other types of resources for some reason.

I have a Private DNS Zone with automatic registration, linked to this vnet and the 2 VMs can resolve each other by name. They also show up in the list of registered records, resolving to and respectively.

However, when I try to connect from the Container Instance to the VM, the name does not resolve. If I connect directly by IP address it works.

Furthermore the 2 container instances don't even show up in the Private DNS Zone.

Is there anything I need to do for my ACI to make use of the Private DNS Zone just like the normal VMs are doing? Why are they not resolving names through the Private DNS Zone as they should?

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
515 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
4,969 questions
{count} vote

3 answers

Sort by: Most helpful
  1. jbx999 236 Reputation points

    In the end I decided to move away from Azure Container Instances. They are a half baked, buggy and unstable product, with crucial functionality missing. You can't expose an ACI that is inside a vnet publicly. Accessing resources inside the vnet by DNS doesn't work properly. Registering the container itself to the private DNS zone works erratically. Furthermore West EU zone seems to be unstable, with support unable to figure out what is going on.

    Just stay away from ACI.

    2 people found this answer helpful.

  2. prmanhas-MSFT 17,741 Reputation points Microsoft Employee

    @jbx999 Below thread might be helpful:

    Hope it helps!!!

    Please “Accept as Answer” if it helped so it can help others in community looking for help on similar topics

  3. Eikens, A.H.R. (Guus) 1 Reputation point

    If I explicitly configure the Container-Instance's DNS servers .... it works. And fortunately Bicep can figure out those DNS-servers of my Virtual Network for me.

    resource resourceVirtualNetwork 'Microsoft.Network/virtualNetworks@2021-02-01' existing = {
    name: virtualNetwork_Name
    scope: resourceGroup(virtualNetwork_ResourceGroup_Name)

    resource containerGroup 'Microsoft.ContainerInstance/containerGroups@2021-09-01' = {
    name: containergroup_Name
    location: location
    properties: {
    containers: [
    name: containergroup_Name
    properties: {
    image: image

    0 comments No comments