locked
ErrorCode: VMExtensionProvisioningError on VM specialized VHD RRS feed

  • Question

  • HI,

    I tried to migrate azure stack.

    after I uploaded the VHD to and follow instruction on this link: https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sa-create-vm-specialized

    I got this error:

    Extensions cannot be installed on VM 'myVM as guest agent is not provisioned on the VM.'

    StartTime: 1/10/2018 9:42:16 AM

    EndTime: 1/10/2018 9:42:52 AM

    OperationID: 17e1d285-0959-4455-8958-4a5299362bf8

    Status: Failed

    ErrorCode: VMExtensionProvisioningError

    ErrorMessage: Vm Extensions cannot be installed on VM 'myVM as guest agent is not provisioned on the VM.

    At D:\Infront\Project\Telstra\UAT Prod\UAT\2018\PS\2018\tesimage.ps1:50 char:1

    + New-AzureRmVM -ResourceGroupName $rgName -Location $location -VM $vm

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : CloseError: (:) [New-AzureRmVM], ComputeCloudException

        + FullyQualifiedErrorId : Microsoft.Azure.Commands.Compute.NewAzureVMCommand



    • Edited by Fazars Thursday, January 11, 2018 3:10 AM
    Thursday, January 11, 2018 3:08 AM

Answers

  • Hello ,

     

     The Windows AZURE Guest Agent (WAGA) is installed when the use created VM using 'FromImage' option.  The VM was created with a user image and the attach option was specified. In this case the Windows Azure Guest Agent was never installed on the VM.  Trying to deploy extensions on a VM that was initially deployed using 'Attach' option is not supported. This is by design.

     

    Try deploying your image using the following Template:

     

    {

        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

        "contentVersion": "1.0.0.0",

        "parameters": {

            "vmName": {

                "type": "String",

                "metadata": {

                    "description": "VM name"

                }

            },

            "osDiskVhdUri": {

                "defaultValue": "URI OF MY VHD in BLOB",

                "type": "String",

                "metadata": {

                    "description": "Uri of the existing VHD"

                }

            }

        },

        "variables": {

            "vnetName": "vhdluketest",

            "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",

            "subnetName": "vhdluketest",

            "subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('subnetName'))]",

            "vmNICName": "[concat(parameters('vmName'),'-nic01')]"

        },

        "resources": [

            {

                "type": "Microsoft.Network/networkInterfaces",

                "name": "[variables('vmNICName')]",

                "apiVersion": "2015-06-15",

                "location": "[resourceGroup().location]",

                "properties": {

                    "ipConfigurations": [

                        {

                            "name": "ipconfig",

                            "properties": {

                                "privateIPAllocationMethod": "Dynamic",

                                "subnet": {

                                    "id": "[variables('SubnetRef')]"

                                }

                            }

                        }

                    ]

                }

            },

            {

                "type": "Microsoft.Compute/virtualMachines",

                "name": "[parameters('vmName')]",

                "apiVersion": "2016-03-30",

                "location": "[resourceGroup().location]",

                "properties": {

                    "hardwareProfile": {

                        "vmSize": "Standard_D1_v2"

                    },

                    "storageProfile": {

                        "osDisk": {

                            "name": "TestVHD2016.vhd",

                            "osType": "Windows",

                            "caching": "ReadWrite",

                            "vhd": {

                                "uri": "[parameters('osDiskVhdUri')]"

                            },

                            "createOption": "Attach"

                        }

                    },

                    "networkProfile": {

                        "networkInterfaces": [

                            {

                                "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNICName'))]"

                            }

                        ]

                    }

                },

                "dependsOn": [

                    "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNICName'))]"

                ]

            }

        ]

    }

     

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

          

     Thanks


    Gary Gallanes


    Tuesday, January 16, 2018 11:32 PM

All replies

  • Hi,

    We're investigating this issue. Please stay tuned.

    Thanks,

    Anjay Ajodha

    Friday, January 12, 2018 7:36 PM
  • Try to install VM agent:

    https://docs.microsoft.com/en-us/azure/virtual-machines/windows/agent-user-guide

    Sunday, January 14, 2018 3:29 AM
  • Hi spoengineer,

    Thanks for your answer

    I think we cant use that reference. Because the VM extension installation process is part of uploading VHD provissioning.


    from forum technet

    Monday, January 15, 2018 2:15 AM
  • Hello ,

     

     The Windows AZURE Guest Agent (WAGA) is installed when the use created VM using 'FromImage' option.  The VM was created with a user image and the attach option was specified. In this case the Windows Azure Guest Agent was never installed on the VM.  Trying to deploy extensions on a VM that was initially deployed using 'Attach' option is not supported. This is by design.

     

    Try deploying your image using the following Template:

     

    {

        "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",

        "contentVersion": "1.0.0.0",

        "parameters": {

            "vmName": {

                "type": "String",

                "metadata": {

                    "description": "VM name"

                }

            },

            "osDiskVhdUri": {

                "defaultValue": "URI OF MY VHD in BLOB",

                "type": "String",

                "metadata": {

                    "description": "Uri of the existing VHD"

                }

            }

        },

        "variables": {

            "vnetName": "vhdluketest",

            "vnetID": "[resourceId('Microsoft.Network/virtualNetworks', variables('vnetName'))]",

            "subnetName": "vhdluketest",

            "subnetRef": "[concat(variables('vnetID'), '/subnets/', variables('subnetName'))]",

            "vmNICName": "[concat(parameters('vmName'),'-nic01')]"

        },

        "resources": [

            {

                "type": "Microsoft.Network/networkInterfaces",

                "name": "[variables('vmNICName')]",

                "apiVersion": "2015-06-15",

                "location": "[resourceGroup().location]",

                "properties": {

                    "ipConfigurations": [

                        {

                            "name": "ipconfig",

                            "properties": {

                                "privateIPAllocationMethod": "Dynamic",

                                "subnet": {

                                    "id": "[variables('SubnetRef')]"

                                }

                            }

                        }

                    ]

                }

            },

            {

                "type": "Microsoft.Compute/virtualMachines",

                "name": "[parameters('vmName')]",

                "apiVersion": "2016-03-30",

                "location": "[resourceGroup().location]",

                "properties": {

                    "hardwareProfile": {

                        "vmSize": "Standard_D1_v2"

                    },

                    "storageProfile": {

                        "osDisk": {

                            "name": "TestVHD2016.vhd",

                            "osType": "Windows",

                            "caching": "ReadWrite",

                            "vhd": {

                                "uri": "[parameters('osDiskVhdUri')]"

                            },

                            "createOption": "Attach"

                        }

                    },

                    "networkProfile": {

                        "networkInterfaces": [

                            {

                                "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNICName'))]"

                            }

                        ]

                    }

                },

                "dependsOn": [

                    "[resourceId('Microsoft.Network/networkInterfaces', variables('vmNICName'))]"

                ]

            }

        ]

    }

     

    We apologize for any inconvenience and appreciate your time and interest in Azure Stack.

    If you experience any issues with Azure Stack or the current ASDK release, please feel free to contact us.

          

     Thanks


    Gary Gallanes


    Tuesday, January 16, 2018 11:32 PM
  • Hi Gary,

    I got error message below:

    JSON ERROR

    • OPERATION ID
      FAD6A0227146D19D
    • TRACKING ID
      f88b52e0-090d-4aed-97d1-67eea822b871
    • STATUS
      BadRequest
    • PROVISIONING STATE
      Failed
    • TIMESTAMP
      1/17/2018, 9:37:36 AM
    • DURATION
      0.208059 seconds
    • TYPE
      Microsoft.Network/networkInterfaces
    • RESOURCE ID
      /subscriptions/18b4d478-7d46-4f11-a722-f07c11147b7d/resourceGroups/RG-VM-IMG/providers/Microsoft.Network/networkInterfaces/VM-IMG-nic01
    • STATUSMESSAGE
      { "error": { "code": "InvalidResourceReference", "message": "Resource /subscriptions/18b4d478-7d46-4f11-a722-f07c11147b7d/resourceGroups/RG-VM-IMG/providers/Microsoft.Network/virtualNetworks/VHDLUKETEST referenced by resource /subscriptions/18b4d478-7d46-4f11-a722-f07c11147b7d/resourceGroups/RG-VM-IMG/providers/Microsoft.Network/networkInterfaces/VM-IMG-nic01 was not found. Please make sure that the referenced resource exists, and that both resources are in the same region.", "details": [ { "code": "NotFound", "message": "Resource /subscriptions/18b4d478-7d46-4f11-a722-f07c11147b7d/resourceGroups/RG-VM-IMG/providers/Microsoft.Network/virtualNetworks/VHDLUKETEST not found." } ] } }
    • RESOURCE
      VM-IMG-nic01


    from forum technet

    Friday, January 19, 2018 1:11 AM
  • From the error, it indicates that it was trying to find a VNet by the name "VHDLUKETEST" and will in fact look for a subnet with the name "vhdluketest" within it. These names were probably inherited from Gary's lab. Please change these names to the VNet & Subnet names that you use in your environment where you want the VM to be connected to.

    Trust this helps.


    Regards, Rajeev Narshana [MSFT] This posting is provided "AS IS" with no warranties, and confers no rights

    Monday, January 22, 2018 9:19 AM