Initial configuration
After the deployment of your workload, post-deployment configuration is needed. If you want to do this as a part of your automation solution, then there are two solutions for you:
- The Custom Script Extension that can be used at any time after the deployment
- cloud-init is available during boot
Initial configuration with the Custom Script Extension
After the deployment of the virtual machine, it is possible to execute post-deployment scripts using the Custom Script Extension. This extension will work on all Microsoft-endorsed Linux operating systems, except CoreOS and OpenSUSE LEAP.
You can use PowerShell to configure it:
$myResourceGroup = "<resource group name>" $myLocation = "<location>" $myVM = "<vm name>" $Settings = @{ "commandToExecute" = "apt-get -y install nginx";}; Set-AzureRmVMExtension -VMName $myVM -ResourceGroupName $myResourceGroup ` -Location $myLocation ` -Name "CustomscriptLinux" -ExtensionType "CustomScript" ` -Publisher "Microsoft...