VM Agent Display System Info for Azure VMs

No more confusion while accessing multiple open rdp session. Every new windows VM will have its system information that will be displayed on the desktop wallpaper by default. While deploying new VMs in the management portal or with Azure VM PowerShell (latest release) Sysinternals BgInfo extension is enabled by default which displays VM information on the desktop.

If you do not want the VM agent to be installed, you can use from Gallery method in the portal instead of Quick Create and uncheck the VM Agent check box that is selected by default. If you are creating a VM with Azure PowerShell you would use Add-AzureProvisioningConfig -DisableGuestAgent with New-AzureVM.

Azure VM 2

Both New-AzureVM and New-AzureQuickVM cmdlets by default will install the agent.

New-AzureQuickVM syntax:

New-AzureQuickVM -Windows -ServiceName <Service Name> -Name <VM Name> -ImageName <image name> -Password <password> -Location <location> -AdminUsername <admin name> -InstanceSize <instance size>

Sample syntax: New-AzureQuickVM -Windows -ServiceName ‘ WSUS’ -Name ‘WSUS’ -ImageName (Get-AzureVMImage | where ImageFamily -eq ‘Windows Server 2012 R2 Datacenter’ | select -last 1).ImageName -Password $password -Location ‘East US’ -AdminUsername ‘praveen’ -InstanceSize ‘Medium’

To enable the BGInfo extension: Get-AzureVM -ServiceName <service name> -Name <VM name> | Set-AzureVMBGInfoExtension | Update-AzureVM

Sample syntax: Get-AzureVM -ServiceName ‘WSUS’ -Name ‘WSUS’ | Set-AzureVMBGInfoExtension | Update-AzureVM

To disable the extension: Get-AzureVM -ServiceName ‘WSUS’ -Name ‘WSUS’ | Set-AzureVMBGInfoExtension -Disable | Update-AzureVM

The agent is installed to C:\WindowsAzure and extensions are installed in C:\Packages. There is no entry added to Programs and Features for it when it gets installed during provisioning.

Azure VM 4

When you login in the windows you will see the desktop wallpaper includes VM information.

Azure VM 6

There will be three processes running that are specific to the agent: WaAppAgent.exe, WindowsAzureGuestAgent.exe, and WindowsAzureTelemetryService.exe:

Azure VM 8

Running netstat -anob will show that WindowsAzureGuestAgent.exe are listening on port : 80

Azure VM 9

You can see if the agent was installed during provisioning and which extensions are available by expanding the VM property from Get-AzureVM and looking at the ProvisiongGuestAgent and ResourceExtensionReferences.

Get-AzureVM -ServiceName <service name> -Name <VM name> | select -expandproperty VM

Sample syntax: Get-AzureVM -ServiceName ‘WSUS’ -Name ‘WSUS’ | select -expandproperty VM | Format-List ProvisionGuestAgent,ResourceExtensionReferences

ProvisionGuestAgent : True

ResourceExtensionReferences : {BGInfo}

Azure Managed Services