Tariq M
Tariq M

Reputation: 41

Will I lose all my data and hosted websites if I change size of Virtual Machine (VM) from Small to large from Azure portal?

Let's imagine I have created an Azure virtual machine, a small one initially. I have installed SQL Server and created databases. Also hosted to website by IIS on the virtual machine. I can see the performance of the small one is not up to the mark. I want to upgrade to a larger machine more powerful one. I know, I can do this from Azure portal. My question is since I have already fully configured this machine with databases and websites running on the small VM. I need to know, Will I lose all my data and hosted websites if I change size of Virtual Machine (VM) from Small to large from Azure portal? I am worried that if this upgrade I may lose data and website.

Upvotes: 1

Views: 2042

Answers (1)

astaykov
astaykov

Reputation: 30903

You will not lose your (entire) data when you scale. Why I put Entire - because your data is on the System drive (C). Which by default (if you have not turned this off) has a Read/Write Host Cache enabled. The Write cache can cause some data corruption when the VM is not gracefully shut down, or while changing the size. And this is the only issue you have to be worried about.

Changing VM size is kind of a common task that everyone does almost on a daily basis, especially when using IaaS as dev/test environment. It is also a recommended corrective action to take if you are having issues with booting up the VM.

So, go ahead and change the size. You can pre-cautious stop your IIS before resizing, to avoid data loss. This only make sense if your application has some logic which writes files to local (C) drive.

Upvotes: 3

Related Questions