Install the VM Agent on an existing Azure VM
The Windows Installer MSI package to install the VM Agent on an existing Azure VM is available for download at the following location:
The MSI must be run from an elevated command prompt.
After installing the VM agent, you must also use Azure PowerShell to update the ProvisionGuestAgent property so Azure knows the VM has the agent installed. This is also documented on MSDN at Manage Extensions.
$vm = Get-AzureVM –ServiceName <cloud service name> –Name <VM name>
$vm.VM.ProvisionGuestAgent = $true
Update-AzureVM –Name <VM name> –VM $vm.VM –ServiceName <cloud service name>
Now if you run Get-AzureVM again, the GuestAgentStatus property should be populated instead of blank:
Get-AzureVM –ServiceName <cloud service name> –Name <VM name>
Updating the ProvisionGuestAgent property is only necessary if the VM is already running in Azure and the agent was not provisioned when the VM was created. When creating a VM from an image (including from custom image), by default the VM agent is installed and that property is updated automatically.
Note that when creating a VM from an existing, specialized VHD (sysprep was not run generalize it), selecting Install the VM Agent in the portal only sets the property and does not install the agent. In that scenario you must install the agent after the VM is provisioned in Azure.