I recently had an issue where starting an Azure virtual machine would fail. The reason given was that the Boot Diagnostics storage account was missing. In this post, I’ll show you mu workaround.
As part of my recent upgrade/migration for the VM hosting this site, I did a big clean up and re-organization of resources. One piece of that was to deploy a dedicated storage account for diagnostics and logging. I configured the VM Agent to use this new diagnostics storage account, and I changed Boot Diagnostics to use this new diagnostics storage account too – both updates appears to succeed because the notifications said the changes were successful. I then deleted the old storage account because it was no longer used.
Later in the day, I shutdown the VM to resize it. Then I attempted to boot the VM up, and the start job failed. That caused an increase in my heart’s BPM! I explored the error and it said that the storage account for Boot Diagnostics could not be found.
FYI, boot diagnostics periodically captures a BMP file of a Windows Server VM’s “console” and stores it in a container in the storage account. I don’t like that failing to get a screenshot fails a VM.
I checked Boot Diagnostics, and … the old storage account that I had replaced and deleted was still specified. I changed it to the new storage account, and saved the change. Once again, I got a notification that the save was successful.
I attempted to start the VM again, and I got the same error. I went back into Boot Diagnostics, and the old storage account was still specified. I’d see this happen before and I new how to work around it:
- Disable Boot Diagnostics in the VM and save the change.
- Start the VM – now it will start.
- Enable Boot Diagnostics in the VM, select the new storage account, and save the change.
This gets the VM running as quickly as possible, and gets Boot Diagnostics to use the correct storage account.