Forum Discussion
Deploy infrastructure with custom image
I my self have not attempted to deploy multiple servers using a custom image, let alone as managed disk. I am in the process of trying to recreate this in my lab, hopefully i will have some results monday.
Until then maybe someone with more experience may come along.
Perhaps you could send me the the entire template files in a private message.
Also have you considered using a loop for the deployment of the vm's ?
Loop sounds interesting. Because all the vms, except the size, will be kind of the same.
Thanks for having a look!
I try to send you the whole template in a private message.
- Kent GaardmandJun 27, 2017Iron Contributor
Also try and use Resource ID instread of concat for you dependson.
Concat just combines the input to a single string.
ResourceID insures the subscription and resource group is added:
so this:
"[resourceId('Microsoft.Network/networkInterfaces/', parameters('networkInterfaceName1'))]"
would actualy be this:
/subscriptions/****************/resourceGroups/RG3/Microsoft.Network/networkInterfaces/<parameters('networkInterfaceName1')>
- Moritz NossekJun 28, 2017Copper ContributorKeeping this in mind and I will adjust my template. Thanks for the hint :)
- Kent GaardmandJun 27, 2017Iron Contributor
So i managed to create a template that uses the same image source for 2 identical VM's.
They are created at the same time with out any issues.
if you select the targeted Resource Group, select activity log you should see the failed attempts and a more detailed description as to why they are failing.
you can download my template files from here, keep in mind it may not be pretty but it works and i hope you can use it to compare against your own.
- Moritz NossekJun 28, 2017Copper ContributorThanks for the effort you put in.
I will check your template against mine.