最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

virtual machine - ErrorLoadingExtensionAndDefinition When Installing Any Extension on Azure VM - Stack Overflow

programmeradmin2浏览0评论

I’m encountering an issue in the Azure Portal when trying to install extensions on my VM. I get the error ErrorLoadingExtensionAndDefinition for all extensions, not just the Custom Script Extension. Here’s a brief description of the problem:

What I’m Trying to Do: Install the Custom Script Extension on my VM to run a PowerShell script that installs IIS. I previously installed this extension successfully, deleted it, and now I’m trying to reinstall it. The Issue: When I go to Settings > Extensions + applications in the Azure Portal and click + Add, I get the error ErrorLoadingExtensionAndDefinition. This happens for all extensions, not just the Custom Script Extension.

Error Details:

Background:

I successfully installed the Custom Script Extension on this VM before, used it to run my script, and then deleted it. After deleting the extension, I’m unable to reinstall it or any other extension due to this error. The VM is in the EastUS region, and I’m using a Windows VM.

What I’ve Tried:

Cleared my browser cache, tried different browsers, and used incognito mode.

Checked the Azure VM Agent status (it’s Ready in the portal and running on the VM).

Created a firewall rule in my pfSense firewall (with pfBlockerNG) to allow LAN-to-WAN traffic to 13.107.246.10:443, as suggested in a related thread.

Tested on a new VM in the same region—the issue persists, indicating it’s not specific to loadvm1.

Checked Azure Service Health—no reported issues in my region.

Has anyone encountered this error before? It seems to be a broader issue with the Extensions + applications functionality in the Azure Portal. Any suggestions on how to resolve this?

Thanks for any help!

I’m encountering an issue in the Azure Portal when trying to install extensions on my VM. I get the error ErrorLoadingExtensionAndDefinition for all extensions, not just the Custom Script Extension. Here’s a brief description of the problem:

What I’m Trying to Do: Install the Custom Script Extension on my VM to run a PowerShell script that installs IIS. I previously installed this extension successfully, deleted it, and now I’m trying to reinstall it. The Issue: When I go to Settings > Extensions + applications in the Azure Portal and click + Add, I get the error ErrorLoadingExtensionAndDefinition. This happens for all extensions, not just the Custom Script Extension.

Error Details:

Background:

I successfully installed the Custom Script Extension on this VM before, used it to run my script, and then deleted it. After deleting the extension, I’m unable to reinstall it or any other extension due to this error. The VM is in the EastUS region, and I’m using a Windows VM.

What I’ve Tried:

Cleared my browser cache, tried different browsers, and used incognito mode.

Checked the Azure VM Agent status (it’s Ready in the portal and running on the VM).

Created a firewall rule in my pfSense firewall (with pfBlockerNG) to allow LAN-to-WAN traffic to 13.107.246.10:443, as suggested in a related thread.

Tested on a new VM in the same region—the issue persists, indicating it’s not specific to loadvm1.

Checked Azure Service Health—no reported issues in my region.

Has anyone encountered this error before? It seems to be a broader issue with the Extensions + applications functionality in the Azure Portal. Any suggestions on how to resolve this?

Thanks for any help!

Share Improve this question asked 2 days ago Iheb AlimiIheb Alimi 111 bronze badge
Add a comment  | 

1 Answer 1

Reset to default 0

The error you encountered was due to the following reasons:

Make sure to check if the Microsoft.Compute provider is registered. If it is not, please re-register it.

  1. Remove the extension using the following cmdlet.
Remove-AzVMExtension -ResourceGroupName $RGName -VMName $vmName -Name "myCustomScriptExtension"
  1. Check the agent status and set the agent startup type to Automatic

  1. Check the extension logs inside the VM at the following path: C:\WindowsAzure\Logs\Plugins for detailed logs.
 Set-AzVMCustomScriptExtension -ResourceGroupName "venkat-RG" -VMName "Windows-Server" -Name "myCustomScript" -FileUri "" -Run "IIS-Script.ps1" -Location "eastus"

Output:

If the issue persists, change the installation path to another location.

Install-WindowsFeature Web-Server -Source D:\Sources\test -IncludeAllSubFeature

Alternatively, you can also install the IIS role on a Windows server using the Invoke-AzVMRunCommand cmdlet.

 Invoke-AzVMRunCommand -ResourceGroupName 'venkat-RG' -VMName 'Windows-Server' -CommandId 'RunPowerShellScript' -ScriptString " Install-WindowsFeature Web-Server -IncludeAllSubFeature"

Output:

Reference:

Troubleshoot Azure Windows VM Agent issues

Look at the extension logs inside the VM

发布评论

评论列表(0)

  1. 暂无评论