Azure VM Troubleshooting: Common Problems and Solutions
A practical guide to troubleshooting Azure Virtual Machines, including SSH and RDP failures, boot issues, disk problems, CPU and memory bottlenecks, NSG rules, networking, VM extensions and performance issues.
Azure Virtual Machines are commonly used to host web applications, APIs, databases, development environments and enterprise workloads. When an Azure VM becomes unreachable or starts performing poorly, the root cause can be related to networking, operating system configuration, disks, CPU, memory, authentication or Azure infrastructure.
This guide covers the most common Azure VM problems and provides a practical troubleshooting workflow that can be used by system administrators, cloud engineers and DevOps teams.
Azure VM Troubleshooting Overview
When troubleshooting an Azure VM, avoid changing multiple settings at the same time. Start by identifying the layer where the problem is occurring.
User
|
v
Internet / Corporate Network
|
v
Azure Network
|
v
NSG / Firewall
|
v
NIC
|
v
Azure VM
|
+---- Operating System
|
+---- CPU / Memory
|
+---- Disk
|
+---- Application
Troubleshooting becomes much easier when you move through these layers systematically.
1. Azure VM Is Not Reachable
One of the most common Azure VM problems is being unable to connect to the machine.
Depending on the operating system, you may be using:
- SSH for Linux VMs.
- RDP for Windows VMs.
- Azure Bastion for browser-based access.
- Azure Run Command for certain troubleshooting scenarios.
Before investigating the operating system, check the VM status in the Azure portal.
Azure Portal
|
v
Virtual Machine
|
+---- Running?
|
+---- Network interface?
|
+---- Public/private IP?
|
+---- Disks?
2. Check the VM Power State
If the VM is stopped or deallocated, network troubleshooting will not solve the problem.
Verify that the VM is in the expected running state.
From Azure CLI, you can inspect the VM:
az vm get-instance-view \
--resource-group <resource-group> \
--name <vm-name>
Replace the placeholders with the actual resource group and VM name.
3. SSH Connection Fails on a Linux VM
If SSH fails, troubleshoot from the outside in.
- Verify the VM is running.
- Verify the correct IP address or DNS name.
- Check the NSG.
- Check the VM's local firewall.
- Verify that the SSH service is running.
- Verify the username and authentication method.
- Check whether the SSH port has been changed.
A typical SSH connection looks like:
ssh username@server-ip
If SSH uses a custom port:
ssh -p 2222 username@server-ip
4. Check SSH Service on Linux
If you have console access or another administrative path, check the SSH service.
sudo systemctl status ssh
On some Linux distributions the service name may be:
sudo systemctl status sshd
If the service has stopped unexpectedly, inspect its logs before simply restarting it.
sudo journalctl -u ssh --no-pager
5. RDP Connection Fails on a Windows VM
Windows VMs commonly use Remote Desktop Protocol on TCP port 3389 by default.
If RDP fails, check:
- VM power state.
- Public or private connectivity.
- Network Security Group rules.
- Windows Firewall.
- Remote Desktop configuration.
- RDP service status.
- User account permissions.
Do not expose RDP broadly to the public internet unnecessarily. Restrict administrative access to trusted sources or use a more appropriate secure access architecture.
6. Check Network Security Groups
Network Security Groups, commonly called NSGs, control inbound and outbound network traffic for supported Azure resources.
Internet
|
v
NSG
|
v
Network Interface
|
v
Azure VM
A common mistake is allowing traffic at one layer while another NSG or firewall rule still blocks it.
Check:
- Inbound security rules.
- Outbound security rules.
- Rule priority.
- Source address.
- Destination port.
- Protocol.
- Allow or deny action.
7. NSG Rule Priority Matters
NSG rules are evaluated according to their priority. A lower numerical priority is evaluated before a higher numerical priority.
Priority 100
Allow SSH
Priority 200
Deny SSH
In this example, the earlier matching rule can determine the result.
When troubleshooting an NSG issue, always inspect the complete rule set rather than looking at only one rule.
8. Use Network Watcher
Azure Network Watcher provides tools that can help diagnose connectivity problems.
Useful capabilities include:
- IP flow verification.
- Connection troubleshooting.
- Network topology.
- Packet capture.
- Next hop analysis.
For example, IP flow verification can help determine whether traffic is being allowed or denied by an NSG.
9. VM Has No Internet Connectivity
If the VM can communicate internally but cannot access the internet, investigate the network path.
Azure VM
|
v
NIC
|
v
Subnet
|
v
Route Table
|
v
NAT / Public Connectivity
|
v
Internet
Check:
- Route tables.
- NSG outbound rules.
- NAT Gateway configuration where applicable.
- Public IP configuration where applicable.
- Azure Firewall or other network security appliances.
- Operating system firewall.
- DNS configuration.
10. DNS Resolution Problems
Sometimes the VM has network connectivity but cannot resolve domain names.
Test DNS resolution from Linux:
nslookup example.com
Or:
dig example.com
On Windows:
nslookup example.com
If IP connectivity works but DNS resolution fails, investigate DNS configuration instead of changing NSG rules unnecessarily.
11. Azure VM CPU Is Very High
High CPU usage can make applications slow or completely unresponsive.
On Linux:
top
Or:
htop
On Windows, use Task Manager or appropriate performance monitoring tools.
Look for:
- Processes consuming excessive CPU.
- Unexpected background jobs.
- Application traffic spikes.
- Database processes.
- Backup jobs.
- Scheduled tasks.
12. High CPU Does Not Always Mean the VM Needs More CPU
Before resizing the VM, identify why CPU utilization is high.
High CPU
|
+---- Application workload
|
+---- Database workload
|
+---- Background process
|
+---- Malware / unexpected process
|
+---- Insufficient VM size
If the workload is legitimate and consistently exceeds the VM's capacity, resizing or scaling may be appropriate.
13. Check Memory Usage
Memory pressure can cause severe application performance problems even when CPU usage is normal.
On Linux:
free -h
You can also inspect memory and swap activity:
vmstat 1
Look for:
- Low available memory.
- Excessive swap usage.
- Memory-intensive processes.
- Application memory leaks.
14. Check Disk Space
A full OS disk is one of the most common causes of Linux and Windows VM problems.
Linux:
df -h
Find large directories:
sudo du -xh --max-depth=1 / | sort -h
Common causes include:
- Application logs.
- System logs.
- Temporary files.
- Docker data.
- Database files.
- Old backups.
15. Azure Managed Disk Is Full
Increasing the managed disk size is only one part of the solution.
Azure Managed Disk
|
v
Partition
|
v
Filesystem
After increasing the Azure disk capacity, the operating system may still show the old partition or filesystem size.
Verify the disk layout:
lsblk
Then expand the appropriate partition and filesystem according to the operating system and filesystem type.
16. Check Azure VM Disks
Azure VMs can have OS disks and data disks.
Azure VM
|
+---- OS Disk
|
+---- Data Disk 1
|
+---- Data Disk 2
If an application stores data on a separate disk, check that disk independently rather than checking only the OS disk.
17. Data Disk Is Missing Inside Linux
If a data disk appears in Azure but not as expected inside Linux, check block devices.
lsblk
Also inspect:
sudo fdisk -l
If the disk exists but is not mounted, inspect the mount configuration.
findmnt
18. Azure VM Extension Failed
Azure VM extensions are commonly used for tasks such as configuration management, monitoring and security agents.
An extension can fail because of:
- Incorrect configuration.
- Network connectivity issues.
- Dependency problems.
- Operating system problems.
- Insufficient permissions.
- Agent issues.
Check the extension status in the Azure portal and inspect the VM's local extension logs when deeper investigation is required.
19. Azure VM Agent Problems
The Azure VM Agent enables several management operations and extension-related capabilities.
If extensions or management operations behave unexpectedly, check the agent status and logs inside the VM.
For Linux systems, service status can commonly be inspected using:
systemctl status walinuxagent
The exact service name and configuration can vary depending on the image and operating system version.
20. VM Is Slow After Reboot
If performance becomes poor immediately after a reboot, investigate startup processes.
VM Boot
|
+---- OS Services
|
+---- Agents
|
+---- Application
|
+---- Database
|
+---- Scheduled Jobs
A service stuck during startup can consume CPU, memory or disk resources and affect the rest of the VM.
21. Check System Logs
Logs are essential for identifying operating system problems.
On Linux:
journalctl -p err..alert
For a specific service:
journalctl -u <service-name>
On Windows, use Event Viewer to inspect system, application and security-related events.
22. VM Boot Failure
Boot problems can be caused by:
- Filesystem corruption.
- Incorrect boot configuration.
- Failed operating system updates.
- Driver problems.
- Disk problems.
- Incorrect mount configuration.
- Application or service configuration issues.
Azure provides diagnostic and recovery capabilities that can help investigate boot and connectivity issues.
23. Use Azure Boot Diagnostics
Boot diagnostics can provide useful information when a VM has operating-system startup problems.
Depending on the scenario, screenshots and serial console information can help determine whether the problem occurs during early boot or later during service startup.
24. Use Azure Serial Console When Available
Serial Console can provide an alternative management path for supported VM scenarios when normal network connectivity is unavailable.
This can be particularly useful when:
- SSH is unavailable.
- RDP is unavailable.
- Network configuration is incorrect.
- Firewall rules block remote access.
- Boot troubleshooting is required.
25. Check Application Ports
Sometimes the VM itself is healthy but the application is not listening on the expected port.
On Linux:
sudo ss -lntp
Look for the expected application port.
LISTEN
0.0.0.0:8080
If the application is listening only on localhost:
127.0.0.1:8080
external clients may not be able to reach it directly.
26. Test Connectivity From the VM
When diagnosing connectivity, test from the VM itself.
curl -I https://example.com
Test a specific TCP port:
nc -vz hostname 443
This helps determine whether the problem is local to the VM or exists somewhere else in the network path.
27. Check Routes
Incorrect routes can prevent the VM from reaching other networks.
Linux:
ip route
Windows:
route print
Compare the routing table with the expected Azure network architecture.
28. Check the Network Interface
Every Azure VM relies on a network interface for network connectivity.
Check:
- NIC attachment.
- Private IP configuration.
- Public IP configuration where applicable.
- Subnet.
- NSG association.
- DNS settings.
- IP forwarding where required.
29. Azure VM Performance Monitoring
Azure Monitor can be used to collect and analyze performance information.
Useful signals include:
- CPU utilization.
- Disk I/O.
- Network traffic.
- Memory-related metrics where monitoring agents provide them.
- Application performance.
- Guest operating system logs.
Monitoring should be configured before an incident occurs so historical data is available when troubleshooting starts.
30. Azure VM Troubleshooting Workflow
Problem Reported
|
v
Check VM Status
|
v
Check Azure Health / Diagnostics
|
v
Check Network Connectivity
|
+---- SSH/RDP?
|
+---- NSG?
|
+---- Route?
|
+---- DNS?
|
v
Check Operating System
|
+---- CPU
|
+---- Memory
|
+---- Disk
|
+---- Services
|
v
Check Application
|
+---- Port
|
+---- Logs
|
+---- Dependencies
|
v
Apply Fix
|
v
Validate
|
v
Document Root Cause
Common Azure VM Problems at a Glance
| Problem | First Checks |
|---|---|
| SSH unavailable | VM status, IP, NSG, firewall, SSH service |
| RDP unavailable | VM status, NSG, Windows Firewall, RDP service |
| High CPU | Top processes, workload, application logs |
| High memory usage | Memory consumers, swap, application behavior |
| Disk full | df, du, logs, large files |
| No internet | Routes, NSG, NAT/public connectivity, DNS |
| Application unreachable | Listening port, NSG, firewall, application status |
| Extension failure | Extension status, VM Agent, extension logs |
| Boot failure | Boot diagnostics, serial console, OS logs |
| VM unexpectedly slow | CPU, memory, disk I/O, network and application metrics |
Production Troubleshooting Checklist
- Verify the VM power state.
- Check Azure platform and resource health information.
- Verify IP addressing and DNS configuration.
- Review NSG rules and priorities.
- Check operating system firewall rules.
- Verify SSH or RDP services.
- Check application listening ports.
- Check CPU utilization.
- Check memory utilization.
- Check filesystem capacity and inode usage.
- Check disk performance.
- Review system and application logs.
- Check VM extensions and Azure VM Agent.
- Use Network Watcher for network-level troubleshooting.
- Use Boot Diagnostics or Serial Console for suitable boot/access scenarios.
- Review Azure Monitor data.
- Document the root cause and remediation.
Final Thoughts
Azure VM troubleshooting becomes much easier when you avoid guessing and work through the infrastructure layer by layer.
Start with the Azure resource state, then investigate networking, NSGs, the operating system, compute resources, storage and finally the application.
The most important principle is simple: identify where the failure occurs before changing the configuration.
A structured troubleshooting process reduces unnecessary changes and makes it easier to identify the actual root cause of production incidents.