Troubleshoot Azure VM Extension Issues. Now recall that we service
our VMs in Azure by using the extension model,
which we can do in any of several ways in Azure Resource Manager. I want
to show you how we can use Azure PowerShell, first of all, to verify
that the Azure VM agent is correctly installed, and this is really the
Azure VM's lifeline to Azure Resource Manager, so it's pretty important.
We can do a Get‑AzVM, passing in the resource group name and the VM
name, and then all of the magic happens with that ‑Status switch
parameter.
We can do the same thing with the Azure CLI by running az vm
extension show. Again, resource group VM name, but it's a little
bit different here in as much as you can, and should,
specifically mention extension names.
Now the questions that you might have as an AZ‑801 student are: am I really
going to see PowerShell and CLI on my exam, and I can answer
enthusiastically, yes. If I were studying for the exam today,
I would probably put more of my effort on mastering
the PowerShell than the Azure CLI,
but you may very well see a little bit of CLI on your exam. I
like to advise students, in general, that on the Microsoft
Associate and Expert certification exams,
Microsoft is assuming that you have intermediate‑level PowerShell skills
and at least late‑beginner Azure CLI, all right? Lastly, you can, if you
have access to the file system of your Azure VMs,
you can take a look at local extension files and particularly look
up log files. Those default extension log folders are
C:\WindowsAzure\Logs\Plugins, and C:\Packages\Plugins. It's a good
idea for you to know where those paths are so that if you're
troubleshooting extension misbehavior, you can get as much log data out of the VM as possible.