I am using an image (Windows & Linux) to create VMs in Azure through ARM template. The image has only OS Disk (C Drive). I need Data disk also (say D drive). Can I create data disk through ARM Template while creating the VM using the image with only C drive ? I need this for Windows as well as Linux. If so, is there any reference ?

1

There are 1 answers

8
Charles Xu On BEST ANSWER

Actually, most image only has the OS disk, it's the same as your image. And to create a VM with a data disk via the ARM template, you just need to add the dataDisks block in the VM resource. It's a list, you can add one or more disks, and then Azure will create it or them for you. It's not complex.

And on the other hand, the D drive usually is the temporary disk. So in fact, the data disk should be the E drive or after E.