Select Language:
If you’re trying to connect an Azure Storage Account’s File Share to a new Ubuntu 24.04 VM and running into issues, here’s a straightforward way to get it working.
Your main problem seems to be DNS resolution failure, indicated by the “NXDOMAIN” error when you run the nslookup command. This means your VM can’t find the address for your storage account. When comparing your new Ubuntu 24.04 VM to the older 18.04, the 18.04 successfully resolves the DNS, but the newer one doesn’t. This difference is crucial and points to network or DNS configuration issues.
To fix this, start by checking your network settings on the Ubuntu 24.04 VM. Ensure your VM can access the internet and DNS servers correctly. A common issue is that the VM doesn’t have the right DNS server specified.
Here’s what you can do:
- Check your DNS configuration:
Open the/etc/resolv.conffile and look for nameserver entries. For example, it might look like:
nameserver 8.8.8.8(Google’s DNS server).
If it’s empty or points to a non-functioning DNS, replace or add a valid DNS server like Google’s or Cloudflare’s:
bash
sudo nano /etc/resolv.conf
Add or modify the line to:
nameserver 8.8.8.8
- Test DNS resolution again:
Run the command:
bash
nslookup mystorage.file.core.windows.net
If it now resolves correctly, you’ve fixed the DNS problem.
-
Check network security rules:
Make sure your VM’s network security group (NSG) allows outbound traffic on port 445, since SMB relies on this port. You mentioned opening port 445 didn’t fix the issue, so focus on DNS and network configuration. -
Confirm your DNS forwarding settings:
Some Azure virtual networks may override DNS settings. Go to your Azure portal, check your Virtual Network’s DNS servers under ‘Settings’. Ensure it’s set to Custom DNS if needed, and that it includes a proper DNS server.
By resolving the DNS issue first, the mount command should be able to locate the storage endpoint. If you continue to have problems, consider testing from the VM with simple network tools like ping or telnet to verify connectivity on port 445.
The difference between your Ubuntu 18.04 and 24.04 environments is usually due to differing network configurations or DNS settings. The older VM might have been configured automatically with proper DNS, whereas the newer VM requires manual setup.
In summary:
- Fix DNS by configuring
/etc/resolv.confwith valid nameservers. - Verify network security rules allow SMB traffic on port 445.
- Confirm your VM’s network settings in Azure include correct DNS servers.
- Test DNS resolution again and then retry mounting.
Getting DNS right typically solves these connection issues and allows your Azure File Share to mount successfully on your new VM.





