0

I have some queries regarding virtual machine scale sets. Actually I have created VMSS which have minimum 1 and max 3 instances. I am confused about the working of vmss. eg when the second instance is created ,Will the 2nd or 3rd instance created would be the clone of the base instance? I put some txt files in base instant and then run heavyload on base instance to create 2nd and 3rd vms. But unfortunately I didn't see any of the files in those instances. It was just a simple vm with nothing in it. 

Now my question is: If the newly created machines don't have replication or clones of base vm then what is the benefit of VMSS?  2) Suppose if i deployed some application on my base vm how would they distribute load to other created vms in vmss ? 3) Let's say we configure it through custom script then how continuous deployment would be sync to other created vms?

1 Answers1

0

I tried to reproduce the same in my environment and got below results:

While creating VMSS, we can use Image option to choose which VM want to be deployed in the VMSS. We can create an Image from VM by generalizing it and then we can use that Image to create VMSS instances. After that newly created VM’s will have exact configuration what base VM have. enter image description here

when the second instance is created, Will the 2nd or 3rd instance created would be the clone of the base instance? – Yes, the newly created VMs will have clone of base VM. But whatever you do modifications to the first instance before performing auto scale, those will not be there in newly created VMs. Newly created VMs will have exact replica of base of VM.

I put some txt files in base instant and then run heavy load on base instance to create 2nd and 3rd VMs. But unfortunately, I didn't see any of the files in those instances – This is not possible with VMSS. For this you need to try some automation scripts with PowerShell. Or you can open a case with Microsoft.

  1. If the newly created machines don't have replication or clones of base VM then what is the benefit of VMSS? - Newly created VM’s will have clone of base VM, you can see the same in the below repro.

We reproduced the same in our environment and we used one IIS preconfigured windows VM as Image to create VMSS. First, we made the initial count as 1 and then we manually increased the count to 2. Now the newly created second VM has IIS enabled automatically.

First VMSS instance: enter image description here Newly created VMSS instance after performing scale out: enter image description here

  1. Suppose if I deployed some application on my base VM how would they distribute load to other created VMs in vmss – You will have load balancer at the frontend to distribute the load to the backend healthy machines.

Please refer below Link for detailed understanding:

https://github.com/MicrosoftDocs/azure-docs/blob/main/articles/virtual-machines/windows/tutorial-load-balancer.md

  1. Let's say we configure it through custom script then how continuous deployment would be sync to other created VMs?

You can use a continuous deployment solution like Azure DevOps or Jenkins to automate the deployment process. This would allow you to automatically update the VMs in the scale set with the latest version of your application. You can also use custom scripts to automate the deployment process and ensure that the updates are applied consistently to all the VMs in the scale set.

IFI Techsolutions - Microsoft Gold Partner - Cloud Solution Provider By Anubhav Bisht

Deploying Applications to Azure Virtual Machine Scale Sets - Azure DevOps Blog (microsoft.com) By Atul Malaviya

Sourav
  • 814
  • 1
  • 9