1

I'm trying create a Auto Scale using VHD and this is my template:

...
{
  "type": "Microsoft.Compute/virtualMachineScaleSets",
  "sku": {
    "name": "[parameters('vmSize')]",
    "tier": "Standard",
    "capacity": "[parameters('instanceCount')]"
  },
  "name": "[variables('namingInfix')]",
  "apiVersion": "2016-03-30",
  "location": "[variables('location')]",
  "tags": {
    "displayName": "VMScaleSet"
  },
  "properties": {
    "overprovision": "true",
    "upgradePolicy": {
      "mode": "Manual"
    },
    "virtualMachineProfile": {
      "storageProfile": {
        "osDisk": {
          "name": "vmname",
          "osType": "Linux",
          "caching": "ReadWrite",
          "vhd": {
            "uri": "https://myvhd.vhd"
          },
          "createOption": "Attach"
        }
      },
      "osProfile": {
        "computerNamePrefix": "[parameters('vmSSName')]",
        "adminUsername": "[parameters('adminUsername')]",
        "adminPassword": "[parameters('adminPassword')]"
      },
      "networkProfile": {
      }
    }
  }
}
...

Unfortunately I received this error when I passed the osProfile:

Parameter 'osProfile' is not allowed. (Code: InvalidParameter)

But if I remove the osProfile I received this error:

Required parameter 'osProfile' is missing (null). (Code: InvalidParameter)
monteirobrena
  • 2,562
  • 1
  • 33
  • 45
  • Those errors are usually related to the definitions of the params and the param file (not the resource definition). Check to see if you have a mismatch between the params defined in the template and what you're passing in... If that doesn't help, post the entire template if you can. Can also try looking at some of the VMSS samples if you haven't yet: https://github.com/Azure/azure-quickstart-templates/tree/875d139c16c9c023dce519e6dd48c707e3473346/301-multi-vmss-windows – bmoore-msft Jun 06 '16 at 16:10

1 Answers1

0

It looks like the problem here is "createOption": "Attach" You need to create the VMs for a scale set from your image directly. I.e. "createOption": "fromImage".

sendmarsh
  • 1,046
  • 7
  • 11