0

I have few existing Linux based VMs hosted on Azure that need to be added into a availability set. Since this setting configuration is allowed only during creation of a VM, I would like to redeploy the VM using ARM template (after updating the template with necessary availability set configuration).

My VMs only have OS disks (managed). Would redeployment of VM using ARM template preserve the applications that are installed on the OS drive or should they be reinstalled?

Ben
  • 17
  • 3

2 Answers2

0

Yes. Azure Resource Manager (ARM) looks at resources and settings, not data. Just be aware of ARM Deployment Modes so it does not delete the entire disk. There is a great example on this page ARM Deployment Modes.

LMG
  • 1,330
  • 11
  • 21
  • Thanks for the reply. I had the same belief as you as well. However, the data does seem to be preserved. We redeployed the VMs into an availability set using ARM template and as a pleasant surprise the data including all other configuration settings were back. This was confirmed by our application team. – Ben Mar 18 '20 at 13:45
  • What mode was set on your ARM template? Incremental or Complete? – LMG Mar 18 '20 at 15:55
  • I just followed the steps mentioned here https://sameeraman.wordpress.com/2017/05/15/addremove-an-existing-vm-to-an-availability-set/ – Ben Mar 19 '20 at 19:17
  • My bad. Changed the "no" to "yes" in the answer. As explained in my original answer, ARM will look at resources (in that case, a "disk") and its properties and *not* the data. – LMG Mar 20 '20 at 05:00
  • cool..thanks anyway !! :) I also read that the default mode for ARM deployment model using templates is incremental. – Ben Mar 20 '20 at 10:56
0

Is the data on OS managed disks preserved during ARM template redeployment of a VM resource in Azure?

YES !!! as confirmed by an actual use case test.

Ben
  • 17
  • 3