question

PongponNilaphruek-3342 avatar image
0 Votes"
PongponNilaphruek-3342 asked RamyaHarinarthini-MSFT answered

VM scale set update a VM instance (as a master) and deploy to other instances: with their database

Hi,

I have a situation that I would like to know how to update a VM instance (as a master) and deploy to other instances.
Also, if I install DBMS on a VM (localhost) and install my app to that. It is ready to deploy to VMSS.
However, if user connect it via loadbalancer. My question is the database that has been changed in VM instance1, it will be automatically updated to VM instance 2 or not? and if I woud like to update source code in VMSS, How can I do?

azure-virtual-machines-scale-set
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RamyaHarinarthini-MSFT avatar image
0 Votes"
RamyaHarinarthini-MSFT answered

@PongponNilaphruek-3342 Welcome to Microsoft Q&A, Thank you for posting your here!!

I would recommend you to create the VMSS from a custom image. You could first deploy a VM (by selecting desired OS) and all required application, configurations and DBMS need to be installed on the VM then make this as a custom VM image(By running Sysprep to create generalized image). Now deploy the VMSS or scale set with the same custom image to serve your application traffic.

Steps to follow

1)Create and customize a VM
2)Deprovision and generalize the VM
3)Create a custom VM image
4)Deploy a scale set that uses the custom VM image

You could make it with multiple methods as below

Tutorial: Create and use a custom image for virtual machine scale sets with Azure PowerShell

Tutorial: Create and use a custom image for virtual machine scale sets with the Azure CLI

Add a custom image to an Azure scale set template

Additional Information :https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview#why-use-virtual-machine-scale-sets

Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.


Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.