VM Agent and VM Extensions – Feedback, Issues, Questions RRS feed

All replies

  • Is Microsoft Azure Powershell Commandlets included a part of the VM agent? Or an extension perhaps? I'm guessing that the Azure Service Runtime and Storage client .NET binaries are included.

    We find that our dev-ops/bootstrapping scripts would benefit if Azure Powershell commandlets were available. Typical use-case is downloading software components from the associated blob storage account.

    Tuesday, April 15, 2014 8:47 PM
  • I have used your last post to enable BGInfo on one of our existing VM without success.

    I have used the following steaps :

    * Install the msi

    * Set ProvisionGuestAgent

    $vm = get-azurevm -name $name -service $svc
    $vm.VM.ProvisionGuestAgent = $TRUE
    Update-AzureVM -name $name -service $svc -VM $vm.VM
    $vm = get-azurevm -name $name -service $svc

    (the last command displayed "True" as expected).

    * Set-AzureVMBGInfoExtension

    Get-AzureVM -ServiceName $svc -Name $name | Set-AzureVMBGInfoExtension | Update-AzureVM

    But if I check if the extension is enabled, by using Get-AzureVMBGInfoException, the commands displays a warning : "WARNING: The resource extension reference list is null or empty".

    And there is no BGInfo displayed on the VM upon login.

    Did I miss something ?

    Wednesday, April 16, 2014 9:40 AM
  • * Set-AzureVMBGInfoExtension

    Get-AzureVM -ServiceName $svc -Name $name | Set-AzureVMBGInfoExtension | Update-AzureVM

    I have also tried to run the commands line by line without success :

    $vm = Get-AzureVM -ServiceName $svc -Name $name
    Set-AzureVMBGInfoExtension -vm $vm.VM
    Get-AzureVMBGInfoExtension -vm $vm # Display BGInfo, seems OK
    Update-AzureVM -name $name -service $svc -vm $vm # OK, operation completed
    $vm = Get-AzureVM -ServiceName $svc -Name $name # get vm again to check is extension is enabled
    Get-AzureVMBGInfoExtension -vm $vm # WARNING: The resource extension reference list is null or empty.

    • Edited by Thomas B_ Wednesday, April 16, 2014 9:56 AM
    Wednesday, April 16, 2014 9:55 AM
  • Yes there is a custom script extension, take a look at the Set-AzureVMCustomScriptExtension cmdlet
    Wednesday, April 16, 2014 11:45 PM
  • Yes there is a custom script extension, take a look at the Set-AzureVMCustomScriptExtension cmdlet

    I don't see the point.

    When I set BGInfoExtension using Set-AzureVMBGInfoExtension, $vm.VM.ResourceExtensionReferences is set with the following options (note that these options disappear as soon as I update-azurevm) :

    ReferenceName                    : MyBGInfoExtension
    Publisher                        : Microsoft.Compute
    Name                             : BGInfo
    Version                          :
    ResourceExtensionParameterValues : {}
    State                            : Enable
    ExtensionData                    :

    Set-AzureVMCustomScriptExtension seems to allow to set extensions by hand, but I can't find what I should use when it prompt me for "ContainerName", etc.
    Thursday, April 17, 2014 8:31 AM
  • Azure PowerShell cmdlets can be downloaded from here : http://azure.microsoft.com/en-us/downloads/
    Sunday, April 20, 2014 7:02 PM
  • A couple of things :

    1. If you are logged into the VM while enabling BGinfo, you have to log off & log back in to get the desktop refreshed.

    2. If the extensions are added to VMs which are in an availability set, then the extensions don't get enabled. We are on working addressing this.

    Sunday, April 20, 2014 7:20 PM
  • Can you share an example for specifying extensions to be installed eg Chef/Puppet using "azure vm create*" ?
    Friday, May 16, 2014 9:27 PM
  • Do you have any advice for installing Azure Agent, where the installation process hangs on "Configuring Services"?   It worked fine on one Win2008-R2-SP1 system, but hangs on the second such system. Only known difference between the two is possibly difference in .NET Framework 4.0 being present/not present.

    Monday, May 26, 2014 1:57 PM
  • Have you addressed issue number 2 above yet?   I just today installed the Agent on an existing VM provisioned before the agent was available.   I set the proper item in the vm object and it does show that the agent is there and on the machine the agent processes are running.   But when I try an add the BGInfo extension it appears to add (i.e. no errors), but doesn't show on the ResourceExtensionStatusList of the vm object and the desktop background doesn't appear.   This VM is in an availability set.
    Saturday, May 31, 2014 5:44 PM
  • Powershell version 0.8.0 addresses the availability set issue.Azure PowerShell cmdlets can be downloaded from here : http://azure.microsoft.com/en-us/downloads/
    Wednesday, June 4, 2014 8:27 PM
  • try launching the msi from an elevated cmd prompt (instead of directly launching it). may be try it after rebooting the vm (which should clear any previously running instances)


    Thursday, June 5, 2014 1:57 AM
  • I am currently provisioning several Azure VMs and I am also using CustomScriptExtensions to do modifications

    for some reason i get the following message 
    "Reached maximum number of retries to download plugin Microsoft.Compute.CustomScriptExtension"
    also the VM seems to be stuck in state "Running(Installing Extension)"

    I can connect to the VM via RDP 
    this reveals that the folder C:\Packages\Plugins\Microsoft.Compute.CustomScriptExtension\1.0.3 is empty
    whereas the BGInfo Extension could be loaded correctly and is also working fine

    the same approach worked some days ago where i think the CustomScriptExtension was version 1.0.2 - can someone confirm this?

    what else could cause this issue?
    was there a recent release for 1.0.3 and maybe the issue be related to this?

    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

    Thursday, June 5, 2014 9:41 AM
  • also, he Remove-functions do not seem to work correctly

    Remove-AzureVMExtension -ExtensionName CustomScriptExtension -Publisher Microsoft.Compute

    the corresponding Get-fucntions still return the same results after running Remove-... and Update-AzureVM

    any feedback on this?
    how are they supposed to work?

    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

    Thursday, June 5, 2014 2:57 PM
  • Rebooting the VM should fix this. There was a platform issue which impacted the newer version. We've reverted to the older version until its fixed. Thanks for reporting.
    Friday, June 6, 2014 1:45 PM
  • If the goal is to uninstall the extension then it can be done by using the uninstall flag.

    Set-AzureVMCustomScriptExtension -Uninstall

    'Remove' removes the extension from the local VM object.

    Friday, June 6, 2014 1:47 PM
  • ok, so it was the -Uninstall flag that i was missing - thanks for clarification

    could you also elaborate what the "removes from the local object" actually means?
    after an Update-AzureVM i thought the local object is published to Azure? am I wrong here?


    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

    Tuesday, June 10, 2014 6:55 AM
  • I just tried the same situation today with the 0.8.3 versions of the powershell commands and I'm still not able to get any extension working.  I can confirm that the agent is running and the vm object has the correct information about the agent, but when I go to add the BGinfo extension, I get no error, but it does not get added to the Vm.
    Monday, June 23, 2014 8:48 PM
  • Where is there any information available on how to create a new VM Extension for Azure? Is there any public SDK or is it private for now?
    Wednesday, July 9, 2014 9:49 AM
  • I'm also interested in writing my own VM extensions but cannot find any information regarding development or the publishing process.

    Will Azure users be encouraged to develop their own VM extensions or is this information only provided to partner companies (e. g. Chef, PuppetLabs)?

    • Edited by mdvx1 Friday, July 18, 2014 9:58 PM
    Friday, July 18, 2014 9:57 PM
  • We've struggled with the same stuff, here are the one which can help you:


    Make sure that you the other resources section too ;-)

    By leveraging this stuff, we were able to deploy custom stuff via VM Agent technology to our VMs running in Azure.




    Thursday, July 24, 2014 7:41 AM
  • We're you able to find an answer to this or a possibly a way around it by downloading and installing the tools via a script? I am struggling with this as well. Thanks. 
    Thursday, November 20, 2014 2:39 PM
  • Hi,

    I'm also looking for some development information on VM Extensions and how to create new extensions.

    Friday, April 24, 2015 11:22 AM
  • When creating an Ubuntu VM I don't see the option to install the agent. I am using the new Azure portal. Is the agent always installed for this configuration? 
    Thursday, August 27, 2015 2:31 PM
  • I wrote a blog series that included some of the network requirements for accessing Azure Storage Accounts for deploying the VM Agent and Extensions. This includes downloading the manifests and packages and also the uploading of the status file to OS disk blob.

    It would be really useful to have an option to allow this traffic dynamically by a TAG rule in an Azure NSG, since providing access to these IPs are problematic given that there is essentially no guarantee what IP the storage accounts will use as more storage accounts are scaled up for use.

    You can read it here http://www.deployazure.com/compute/iaas/azure-vm-agent-extensions-deep-dive-part-1/  

    Friday, November 20, 2015 6:15 AM
  • Currently, the custom script extension for Linux already put the commandToExecute parameter in protected settings because the arguments may contain sensitive data. When can the custom script extension for Windows do the same thing? We are leverage this extension to run a script with username/password as arguments.
    Monday, December 14, 2015 2:52 AM
  • Hi!

    I have a VM created with ARM from an existing disk that has the base VM agent installed in it. With the old Service Management API I could change the ProvisionVMAgent property of the VM to true, and Azure would pick up that the machine was running the agent. How do we perform the same operation in ARM? Hopefully you can set that the agent is installed both from a PowerShell command and from an ARM template.



    Wednesday, January 6, 2016 10:58 PM
  • Hi did you ever find an answer to this? I am also looking how to enable VMAccess on an old VM migrated to ARM.



    Tuesday, June 7, 2016 2:05 PM
  • Documentation is not updated since ARM. All sources just link to a 2014 post on how to do it in Classic.

    Here is how to do it in ARM

    $vm = Get-AzureRmVM -ResourceGroupName $rg -Name $name $vm.OSProfile.windowsConfiguration.provisionVMAgent = $True Update-AzureRmVM -ResourceGroupName $rg -VM $vm
    Friday, December 9, 2016 12:12 PM
  • Awesome thanks for posting ArcNorge!
    Monday, December 12, 2016 2:42 AM
  • I'm not sure if this is right place to post this:

    our Azure TMG server are blocking agent contact, so VM agent status are showing "Missed" in azure security center. 

    we already added rule to permit localhost to access, both NSG and TMG side. also try to open a support case, but not resolved.

    Failed Connection Attempt
    <id id="L_LogPane_LogType">Log type: </id><id id="L_LogPane_WebProxyForward">Web Proxy (Forward)</id>
    <id id="L_LogPane_Status">Status: </id>10013 An attempt was made to access a socket in a way forbidden by its access permissions.
    <id id="L_LogPane_Source">Source: </id>Local Host (
    <id id="L_LogPane_Destination">Destination: </id>Internal (
    <id id="L_LogPane_Request">Request: </id>GET
    <id id="L_LogPane_FilterInfo">Filter information: </id>
    <id id="L_LogPane_Protocol">Protocol: </id>http
    <id id="L_LogPane_User">User: </id>anonymous

    Tuesday, May 9, 2017 5:26 AM
  • I have a Windows 2008 R2 VM that was replicated to Azure using ASR.

    THe server was failed over to Azure, and I installed the Agent. In the OS I can see all the required Agent processes running, yet the agent does not want to communicate with Azure. I cannot configure backups for the VM because of this issue.

    There are no firewall or NSG to block this. I have 20 other VMs that were replicate to Azure and failed over, with the agent installed, that work 100%. Just this specific one doesn't want to work.

    I also have a support call with MS, by we have not been able to resolve this.

    Tuesday, February 20, 2018 4:06 PM
  • We have the same issue, did you find a solution ?

    Niels Uphoff

    Monday, April 15, 2019 7:55 AM
  • Hi Uphoff,

    Since this thread is inactive for more than a year, I suggest you to post a new thread here(Microsoft Azure Site Recovery).

    Monday, April 15, 2019 9:36 AM