Question

Difficulty: HardConfigure Virtual Machine Scale Sets (VMSS)

An administrator is managing an Azure Virtual Machine Scale Set (VMSS) named `vmss-app` that uses Uniform orchestration, has a current instance count of 5, and uses a Manual upgrade policy. The administrator needs to deploy a custom shell script that configures a web server on all current and future VM instances in the scale set.

Which sequence of actions should the administrator perform to ensure that the configuration is registered in the scale set model and applied to all active instances? To answer, arrange the actions in the correct order.

  1. 1Upload the configuration script to a blob container in an Azure Storage account.
  2. 2Generate a Shared Access Signature (SAS) token for the uploaded script blob.
  3. 3Add the Custom Script Extension to the VMSS configuration model, referencing the script blob URI and SAS token.
  4. 4Select the existing VM instances in the scale set and trigger a manual upgrade.

Answer

First, upload the script to the Azure Storage blob container. Second, generate a SAS token for the script blob. Third, add the Custom Script Extension to the VMSS model referencing the blob URI and SAS token. Fourth, manually trigger an upgrade on the existing VMSS instances to apply the updated model.
The correct sequence begins with uploading the script and generating a SAS token, as the VMSS model configuration requires a valid URI and credentials to be defined. Once the model is updated, the manual upgrade must be triggered last so that the instances pull the newly modified model rather than the old one.

Step-by-Step Solution

1
Upload the script file to a container in an Azure Storage account.
The configuration script is stored securely in Azure, ready to be retrieved.
The Custom Script Extension requires a URI to download the configuration script during execution.
2
Generate a Shared Access Signature (SAS) token for the script blob.
A secure access token is created for the blob.
The VMSS instances need read-only access to download the script without making the storage container public.
3
Add the Custom Script Extension to the VMSS configuration model.
The VMSS model is updated with the extension configuration, ensuring future instances will apply it automatically.
Modifying the scale set model registers the extension but does not automatically push it to currently running instances when using Manual upgrade mode.
4
Select the existing VM instances in the scale set and trigger a manual upgrade.
The 5 existing instances pull the updated VMSS model and execute the Custom Script Extension.
Under a Manual upgrade policy, existing instances must be explicitly upgraded to adopt the latest VMSS model.

Key Concept

Applying configuration changes to existing and future instances of a Virtual Machine Scale Set (VMSS) with a Manual upgrade policy.
Rate this question