-1

I have hosted a website in azure virtual machine scale set by following the below steps

  1. Create a VM and do the necessary changes/installations in iis.
  2. Create a snapshot of the VM. This ensure that the above instance can be used for future changes.
  3. create a disk from the snapshot.
  4. create a vm from the disk.
  5. RDP to the instance and generalize the instance for deployment (sysprep) Run %WINDIR%\system32\sysprep\sysprep.exe as admin. Enter System Out-of-Box Experience (OOBE), Generalize check box is selected Shutdown Option = Shutdown
  6. Create Image (capture) from the above instance.
  7. Create VSS from the above image

Suppose their is a change in the web build , Is there a way to update the scale set without following these steps again (preferably from portal) ?

1 Answer 1

0

VMSS instances are designed to work off an image, and any time you add new instances or refresh existing ones your VM will get rebuilt from the image, so any temporary changes will be lost. So there are only a couple of ways you can get your code onto the machines:

  1. Create a custom image as you have done
  2. Run some sort of script or configuration management tool at VM start-up, such as the custom script extension, DSC, Chef, Puppet etc.

Option 2 makes it easier to update things, but can increase start-up time, and complexity.

You can make building images quicker using tools like Packer or the Azure VM Image Builder tool

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .