This blog post is about how to diagnose what your Azure VM is doing while it is booting.
I have a DEMO VM that is hosted in Azure – it is where I have Visual Studio, Redgate tools as well as all my DEMO systems, presentations hosted for when I speak. That way when I go to a venue to speaker I only need (at worst) internet connectivity – and I have a phone with fantastic internet if the venue doesn’t.
What I do is keep the VM up to date in terms of windows patches and I make a point of 2 days out before an event of making sure all outstanding patches are installed.
Hint: this might tell you where this post is headed.
So 2 days out from speaking in Spokane – DevOPs & the DBA I made sure to start up my VM to check things were good. The only complicating factor was this was a day before I was to give a session to TheDevOpsLab so I thought – best to get this out of the way and practice my database unit test session that was going to be recorded.
So I went into the Azure Portal and down to Virtual Machines and clicked “start”:
Normally this start up process would take about 3-5 minutes whilst things started up.
However after 10 minutes I still could not connect. After 15 minutes I started to become worried. So I clicked on the Virtual Machine in the Azure Portal to see what usage was happening.
Things were happening alright:
The keen eye will note that is 2 hours worth of activity…..
Yip – my VM was busy doing heaps of stuff for 2 hours and the whole time I could NOT log onto it via RDP. Which is when I discovered “Boot Diagnostics” in the Azure Portal for Virtual Machines. It allows us to see the console of the VM.
Simply click on your VM and choose “Boot Diagnostics”:
Which gave me an insight to what my VM was spending so much time doing:
So I waited for 2 hours whilst my VM applied these patches (to be fair it was a very big update).
The good thing was I could monitor the progress via Boot Diagnostics.
BTW – in normal running this is the console of my VM:
Which is the view out my front gate. If you have never considered coming to New Zealand – hopefully the console of my VM hosted in Azure will help you decide.
Or consider submitting to SQL Saturday South Island:
We’re still open until 26th April 2018 (I extended it today) and to be honest if it’s past that date and you are International speaker – hit me up on twitter — @theHybridDBA if you want to speak – we’re relaxed as in New Zealand and love people who like to give their time to the community.
I’ll even give up my own speaking slot.