@SA , thank you for your question.
You might want to try any of the following options:
- ##### Azure Serial Console The Serial Console in the Azure portal provides access to a text-based console for virtual machines (VMs) and virtual machine scale set instances running either Linux or Windows. This serial connection connects to the ttyS0 or COM1 serial port of the VM or virtual machine scale set instance, providing access independent of the network or operating system state. The serial console can only be accessed by using the Azure portal and is allowed only for those users who have an access role of Contributor or higher to the VM or virtual machine scale set. Serial Console is generally available in global Azure regions and in public preview in Azure Government. It is not yet available in the Azure China cloud. Please read the Prerequisites to access the Azure Serial Console.
For detailed steps check Get started with the Serial Console OR - ##### Recovering Azure VM by attaching OS disk to another Azure VM
- Create a temporary Linux Azure Virtual Machine (we shall refer to this new VM as the Recovery VM henceforth). [How-to guide] 2. Mount a copy of the impacted VM's OS disk as a data disk on the Recovery VM. You can find a list of steps here. 3. SSH to the Recovery VM and fix the issues on the mounted copy of the impacted VM's OS disk. 4. Detach the mounted copy of the impacted VM's OS disk from the recovery VM. [How-to guide] 5. Swap the OS disk on the impacted VM with the copy (which now has the fix). [How-to guide]
Disclaimer:
This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as convenient to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.
Hope this helps.
Please "Accept as Answer" if it helped, so that it can help others in the community looking for help on similar topics.