Shane Bartholomeusz

Geek and lover of all things tech related

Azure VM “The Server Encountered An Internal Error”

And so it begins …

The day had only just begun … I got into the office … I grabbed a coffee … sat down at my desk.

I tried connecting to one of my Azure dev VM’s but for some reason I couldn’t RDP to it. I waited a bit of time and then tried again, but still no luck.

My Azure AutomationAccount was configured to automatically start and shutdown my VM’s each working day.

I checked the logs for my AutomationAccount and found the message

“The Server encountered an internal error. Please retry the request.”.

Azure Portal Internal Error Screenshot

Hmmmm …. What’s going on here ….

I tried manually starting my VM through the console and via PowerShell but still no success. I checked some of my other VM’s and they too had the same problem.

Azure Portal Error Screenshot
Azure Operation Log Screenshot

Interestingly, even though the Azure logs showed that my VM had been shutdown, the performance counters were still showing activity.

Azure VM Dashboard Screenshot

After trying many things I eventually found the solution. Here’s what worked for me…

Solution 1 – Imaging

Capture an image of your ‘broken’ VM and create a new VM instance from it.

  1. Log into the Azure Portal
  2. Navigate to the VIRTUAL MACHINES panel and CAPTURE your broken VM. This will take a snapshot of your VM.
    Azure Portal Capture VM Screenshot
  3. After doing so, verify that it appears in the VM Images panel
    Azure Portal Screenshot
  4. Now create a new VM instance using this image. Click the image and then click CREATE VM to create a new VM instance. I recommend you choose a configuration for your new VM that closely resembled the old one.
    Azure Create VM Screenshot
  5. Start your new VM from the VIRTUAL MACHINES panel. Your VM has been recovered now. Yay!

Solution 2 – Remount Disk

Remount the underlying VM disk to a new virtual machine.

  1. Log into the Azure Portal
  2. Delete the Virtual Machine from the VIRTUAL MACHINES panel – by default Azure will leave the underlying disks behind in the Resource Group. If you’re given the option to also delete the underlying disks, DO NOT delete the underlying disks, otherwise say goodbye to your data!
    Delete VM Screenshot
  3. Navigate to MORE SERVICES > DISKS
    Azure Screenshot
  4. Locate the orphaned disk and click CREATE VM to create a new VM using the disk you’ve selected. I recommend your new VM configuration matches that of the old VM.
    Azure Disks Screenshot
    Azure Create VM Screenshot
  5. Start your new VM from the VIRTUAL MACHINES panel. Your VM should be as good as new now!

Final Thoughts

I hope this post has helped others out there that have encountered the same issue. If you have any thoughts or other solutions feel free to share in the comments below.

Shane Bartholomeusz

3 Comments

  1. Solution #1 just saved me a lot of time. Thanks for the tip!

  2. Solution#3
    Resize the VM, in my case it solved the problem.

  3. solution 2 worked for me! Thanks a lot!

Leave a Reply

© 2024 Shane Bartholomeusz

Theme by Anders NorenUp ↑