1 00:00:00,940 --> 00:00:01,890 In this demonstration, 2 00:00:01,890 --> 00:00:06,540 I'm going to show you a few select Azure VM troubleshooting methodologies. 3 00:00:06,540 --> 00:00:09,850 Let's go into the portal here, and we'll get right into the middle of things. 4 00:00:09,850 --> 00:00:15,350 This is my monitorvm. It's a Windows Server 2022 machine. And first of all, 5 00:00:15,350 --> 00:00:18,770 I want to make sure that we have boot diagnostics enabled, so this is 6 00:00:18,770 --> 00:00:22,850 something that ideally you have configured in your deployment template. But 7 00:00:22,850 --> 00:00:26,410 if not, we can come down under Support + troubleshooting. We have it 8 00:00:26,410 --> 00:00:30,170 configured here, and the best evidence for that is we can see that 9 00:00:30,170 --> 00:00:35,100 screenshot I told you about. Now, to enable boot diagnostics is literally 10 00:00:35,100 --> 00:00:39,060 just clicking the button to turn it on and specifying your storage account 11 00:00:39,060 --> 00:00:40,140 preference. 12 00:00:40,140 --> 00:00:44,240 We can click Settings here to verify what I had selected. 13 00:00:44,240 --> 00:00:47,700 I decided to use an Azure managed storage account. There's 14 00:00:47,700 --> 00:00:50,800 also custom storage account and disable. 15 00:00:50,800 --> 00:00:52,740 Let me come out of there. 16 00:00:52,740 --> 00:00:56,950 This troubleshoot is actually pretty cool as well. Particularly if you're 17 00:00:56,950 --> 00:01:00,090 having difficulty making a management connection to the machine, 18 00:01:00,090 --> 00:01:03,450 watch what the troubleshooter will do. It'll ask what the 19 00:01:03,450 --> 00:01:06,910 IP address is where you're attempting an RDP, or Remote 20 00:01:06,910 --> 00:01:09,140 Desktop Protocol connection. 21 00:01:09,140 --> 00:01:13,760 The Azure portal detects your machine's public IP. Then 22 00:01:13,760 --> 00:01:16,530 to continue to the next step of the troubleshooter, what 23 00:01:16,530 --> 00:01:18,500 is the RDP destination port? 24 00:01:18,500 --> 00:01:22,430 All right, so far so good. Click Continue, and then we 25 00:01:22,430 --> 00:01:25,640 specify. Depending upon what error we get, 26 00:01:25,640 --> 00:01:29,840 we'll get some additional next steps. So I just really want you to 27 00:01:29,840 --> 00:01:33,280 focus in and not ignore those built‑in troubleshooters. 28 00:01:33,280 --> 00:01:36,100 I know that Windows client has had a storied history 29 00:01:36,100 --> 00:01:37,990 with customer success on those, 30 00:01:37,990 --> 00:01:41,540 but the troubleshooters in the Azure portal are generally much 31 00:01:41,540 --> 00:01:45,710 more powerful than those you'd find in the local Windows OS. Now 32 00:01:45,710 --> 00:01:47,750 that we've enabled boot diagnostics, 33 00:01:47,750 --> 00:01:51,340 this gives us the ability to make a serial console connection to the 34 00:01:51,340 --> 00:01:54,610 machine. So we can look down here again under Support + 35 00:01:54,610 --> 00:01:58,070 troubleshooting, Serial console, and this is so cool. 36 00:01:58,070 --> 00:02:02,620 Unfortunately, it looks like I'm being dead ended here because it says Serial 37 00:02:02,620 --> 00:02:07,460 Console requires a custom storage account not with managed. 38 00:02:07,460 --> 00:02:07,680 Well, 39 00:02:07,680 --> 00:02:12,100 I'm glad that we're seeing this because this is exactly what I've 40 00:02:12,100 --> 00:02:15,970 mentioned quite a few times in this module about staying in touch 41 00:02:15,970 --> 00:02:19,980 with the Azure docs and reading up on these gotchas so that you 42 00:02:19,980 --> 00:02:20,990 can work around them. 43 00:02:20,990 --> 00:02:24,440 We should be able to work around this without too much trouble 44 00:02:24,440 --> 00:02:27,350 because I have a storage account at my disposal. 45 00:02:27,350 --> 00:02:33,290 So why don't we come back to virtual machines, back to monitorvm? Let's 46 00:02:33,290 --> 00:02:39,680 come down to Boot diagnostics. We'll go into Settings, and let me pick 47 00:02:39,680 --> 00:02:43,140 my own diagnostic storage account here. 48 00:02:43,140 --> 00:02:45,240 Click Save. 49 00:02:45,240 --> 00:02:48,070 I'm going to let this set for a couple of minutes. And 50 00:02:48,070 --> 00:02:49,860 while it's setting and updating, 51 00:02:49,860 --> 00:02:52,740 let me come back out, and I'm going to show you 52 00:02:52,740 --> 00:02:54,130 something else while we're waiting. 53 00:02:54,130 --> 00:02:58,720 I'm going to go to Run command. Just to show you though, 54 00:02:58,720 --> 00:02:59,470 as I mentioned, 55 00:02:59,470 --> 00:03:04,110 this is a nice set of tools that enable you to communicate with the 56 00:03:04,110 --> 00:03:07,840 VM outside of a normal management connection. 57 00:03:07,840 --> 00:03:11,340 Now I know the extension model in Azure allows you 58 00:03:11,340 --> 00:03:13,130 to do a custom script extension, 59 00:03:13,130 --> 00:03:17,250 but this is also pretty convenient where you can just run a 60 00:03:17,250 --> 00:03:20,450 PowerShell script that you've pasted in here directly and just 61 00:03:20,450 --> 00:03:23,240 send it right into the machine. 62 00:03:23,240 --> 00:03:27,160 A lot of these are self‑explanatory, RDP listener settings, 63 00:03:27,160 --> 00:03:30,520 for example. You just basically select which run command 64 00:03:30,520 --> 00:03:33,720 script you want to send in, click Run. 65 00:03:33,720 --> 00:03:37,510 Azure will inject that script into the VM. Run it under system 66 00:03:37,510 --> 00:03:41,190 privilege, and we'll see the output here in the console window 67 00:03:41,190 --> 00:03:50,000 directly in the Azure portal. And then here is a run of all of the RDP‑related registry values.