In this demonstration,
I'm going to show you a few select Azure VM troubleshooting methodologies.
Let's go into the portal here, and we'll get right into the middle of things.
This is my monitorvm. It's a Windows Server 2022 machine. And first of all,
I want to make sure that we have boot diagnostics enabled, so this is
something that ideally you have configured in your deployment template. But
if not, we can come down under Support + troubleshooting. We have it
configured here, and the best evidence for that is we can see that
screenshot I told you about. Now, to enable boot diagnostics is literally
just clicking the button to turn it on and specifying your storage account
preference.
We can click Settings here to verify what I had selected.
I decided to use an Azure managed storage account. There's
also custom storage account and disable.
Let me come out of there.
This troubleshoot is actually pretty cool as well. Particularly if you're
having difficulty making a management connection to the machine,
watch what the troubleshooter will do. It'll ask what the
IP address is where you're attempting an RDP, or Remote
Desktop Protocol connection.
The Azure portal detects your machine's public IP. Then
to continue to the next step of the troubleshooter, what
is the RDP destination port?
All right, so far so good. Click Continue, and then we
specify. Depending upon what error we get,
we'll get some additional next steps. So I just really want you to
focus in and not ignore those built‑in troubleshooters.
I know that Windows client has had a storied history
with customer success on those,
but the troubleshooters in the Azure portal are generally much
more powerful than those you'd find in the local Windows OS. Now
that we've enabled boot diagnostics,
this gives us the ability to make a serial console connection to the
machine. So we can look down here again under Support +
troubleshooting, Serial console, and this is so cool.
Unfortunately, it looks like I'm being dead ended here because it says Serial
Console requires a custom storage account not with managed.
Well,
I'm glad that we're seeing this because this is exactly what I've
mentioned quite a few times in this module about staying in touch
with the Azure docs and reading up on these gotchas so that you
can work around them.
We should be able to work around this without too much trouble
because I have a storage account at my disposal.
So why don't we come back to virtual machines, back to monitorvm? Let's
come down to Boot diagnostics. We'll go into Settings, and let me pick
my own diagnostic storage account here.
Click Save.
I'm going to let this set for a couple of minutes. And
while it's setting and updating,
let me come back out, and I'm going to show you
something else while we're waiting.
I'm going to go to Run command. Just to show you though,
as I mentioned,
this is a nice set of tools that enable you to communicate with the
VM outside of a normal management connection.
Now I know the extension model in Azure allows you
to do a custom script extension,
but this is also pretty convenient where you can just run a
PowerShell script that you've pasted in here directly and just
send it right into the machine.
A lot of these are self‑explanatory, RDP listener settings,
for example. You just basically select which run command
script you want to send in, click Run.
Azure will inject that script into the VM. Run it under system
privilege, and we'll see the output here in the console window
directly in the Azure portal. And then here is a run of all of the RDP‑related registry values.