Hello Manju
Welcome to Microsoft Q&A Platform, thanks for posting your query here.
Adding more troubleshooting steps to the above response from Patchfox.
Based on the issue description, your Azure VM is running but you are unable to connect to it. The diagnose tool indicates that the VM is rebooting as requested by an authorized user or process. However, you see the state of the VM as 'Running' on the VMs page.
If the Azure diagnose tool is indicating that your virtual machine is rebooting as requested by an authorized user or process, it's likely that someone with access to your Azure account or the virtual machine itself initiated the reboot.
Please note that few times, the VM state shown on the VMs page might not reflect the current status of the VM. This could be due to a delay in the Azure portal updating the state of the VM.
To troubleshoot this issue, try the below steps and see if that helps:
Check Azure VM health:
- Ensure Azure VM provisioning state is 'Running': If the VM provisioning state is in the Stopped/Deallocated/Updating state, then it will interfere with the connection to the VM. Open Azure portal > VM > Overview and check the VM status to ensure it's Running and retry the connection to the VM.
- Review pending OS updates or reboots: Ensure there are no pending OS updates or pending reboots on the VM.
Check Azure VM Guest Agent service health:
- To check the Azure VM Guest Agent service health, you can go to the Azure portal > VM > Extensions and check if the Azure VM Guest Agent extension is installed and running. If it's not installed, you can install it from the same page. If it's installed but not running, you can try restarting the extension from the same page.
If you are still unable to connect to the VM after performing these steps, you can try restarting the VM from the Azure portal. Try to Stop and Start the VM. If the issue persists, you can try redeploying the VM to a new host server.
Ref: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/redeploy-to-new-node-linux
Hope this helps.
If you need further help on this, tag me in a comment to help opening a Azure Support case.
If the suggested response helped you resolve your issue, please 'Accept as answer', so that it can help others in the community looking for help on similar topics.