Question

On one of our web roles we made changes to a view on the server. We noticed after a certain amount of time the changes are lost. Does azure restore the original package during a server migration\reboot or something? Thanks

Était-ce utile?

La solution

Yes, under certain conditions, the Windows Azure Fabric Controller will re-image your cloud service role instances from your uploaded package. As you've noticed, any per-VM configuration changes you make should be considered temporary. This is part of the deal in the "stateless" model for cloud services.

When does your VM get refreshed? As you've mentioned, one of these would be during a server migration - moving an instance from one VM to another. In this case, the VM is built fresh from the deployment of record, with no effort to replicate the state of the running VM that is being migrated. Usually, goal state is to have all of the same type of role instance to be identical.

Why might you be migrated from one machine to another? One reason is hardware failure on the old machine. There's also an optional PaaS feature that all cloud service operation systems are patched regularly (think "patch Tuesday") then rebooted, though typically this does NOT require re-imaging. Certain operations you initiate (like if you decide to change the VM size) would also include re-imaging.

Here is some related info from one of the Windows Azure architects: http://blogs.technet.com/b/markrussinovich/archive/2012/08/22/3515679.aspx

Autres conseils

If the changes you made were via a remote desktop session, then you violated a key tenant of Windows Azure's PaaS solution. Namely that PaaS cloud services are stateless and any changes to the VMs are neither persistent or durable.

If you have changes you need to make to the VM that hosts the application, those should be automated as part of one of more start-up tasks that are executed when the role instances are boot-strapped.

If the Azure fabric needs to repave your role instance for any reason (system upgrades, hardware failures, etc..), it will always revert to the original package and any changes you made "manually" post deployment will be lost.

In addition to the two other answers, see http://blogs.msdn.com/b/kwill/archive/2012/10/05/windows-azure-disk-partition-preservation.aspx for a chart showing what components will be reimaged in each scenario.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top