ErrorLoadingExtensionAndDefinition When Installing Any Extension on Azure VM

alimiheb 0 Points de réputation
2025-04-01T12:26:55.0766667+00:00

Hi everyone,

I’m encountering an issue in the Azure Portal when trying to install extensions on my VM (loadvm1). 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 (loadvm1) to run a PowerShell script (install_IIS.ps1) 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: Image de l’utilisateur
  • 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!

Azure
Azure
Plateforme et infrastructure de cloud computing pour la génération, le déploiement et la gestion d’applications et de services à travers un réseau mondial de centres de données gérés par Microsoft.
477 questions
0 commentaires Aucun commentaire
{count} votes

1 réponse

Trier par : Le plus utile
  1. Mallikarjuna Vardham 75 Points de réputation Personnel externe Microsoft
    2025-04-03T10:02:11.7333333+00:00

    Initialement, j'ai créé une machine virtuelle Windows avec OS 2019 dans la région East US. Après cela, j'ai vérifié et confirmé que le fournisseur de ressources Microsoft.Compute était enregistré. Pour ce faire, j'ai navigué vers Abonnement, sélectionné Fournisseurs de ressources, et vérifié que Microsoft.Compute était bien enregistré. De plus, pour ajouter une extension à la machine virtuelle, nous avons besoin au minimum du rôle RBAC Contributeur de machine virtuelle sur la VM.

    enter image description here

    Après cela, je me suis connecté à ma machine virtuelle et j'ai démarré Windows Azure Guest Agent en utilisant PowerShell avec la commande suivante :

    Restart-Service WindowsAzureGuestAgent

    Ensuite, j'ai navigué vers les paramètres de la machine virtuelle, ouvert Extensions + Applications, et recherché Custom Script Extension. J'ai cliqué sur Suivant, sélectionné le compte de stockage, puis choisi mon script PowerShell, qui avait été téléversé dans le conteneur pour installer IIS. Ci-dessous se trouve la capture d'écran :

    enter image description here

    Voici le script PowerShell que j'ai utilisé pour installer IIS. J'ai également ajouté une règle entrante HTTP dans le groupe de sécurité réseau afin d'accéder au service IIS.

    enter image description here

    Réponse :

    enter image description here

    Référence : Documentation Microsoft


Votre réponse

Les réponses peuvent être marquées comme Réponses acceptées par l’auteur de la question, ce qui permet aux utilisateurs de connaître la réponse qui a résolu le problème de l’auteur.