Follwing https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/tutorial-use-custom-image-cli fails here with the error
...
$ az vmss create --resource-group myResourceGroup --name myScaleSet --image /subscriptions/.../myGallery/images/myImageDefinition
Deployment failed. Correlation ID: 6c5f031b-aa0e-42a8-a1d9-faba9b11b208. {
"error": {
"code": "InvalidParameter",
"message": "Parameter 'osProfile' is not allowed.",
"target": "osProfile"
}
}
Any suggestions? You can reproduce this easily using the script https://github.com/dankegel/azure-scripts/blob/main/ss-demo.sh
I can reproduce the error with your script. The problem is that there is a missing "\
" after the parameter --image $IDID
in your script.
az vmss create \
--resource-group myResourceGroup \
--name myScaleSet \
--image $IDID
--specialized
It should be
az vmss create \
--resource-group myResourceGroup \
--name myScaleSet \
--image $IDID \
--specialized
Alas, that creates a generic vm, not one with the tutorial's customizations (in this case, nginx), doesn't it?
I found the problem, please check my update.
Yes, that's it, I found it independently. But I appreciate the quick answer!