Azure / Azure/azure-quickstart-templates
201-vmss-windows-webapp-dsc-autoscale fails because dsc configured wrongly
- Dominant language
- Bicep
- Stars
- 14.9k
- Forks
- 16.2k
- Avg merge
- 6d 21h
- Merged PRs (30d)
- 6
Description
[201-vmss-windows-webapp-dsc-autoscale](https://github.com/Azure/azure-quickstart-templates/tree/master/201-vmss-windows-webapp-dsc-autoscale)
### Issue Details
When deploying the template to Azure as it is, of course adjusting the necessary parameters like password and vmss name, the resulting vmss is in a running state, though the DSC deployment fails reporting the following error.
```
VM has reported a failure when processing extension 'Microsoft.Powershell.DSC'.
Error message: "DSC Configuration 'InstallIIS' completed with error(s).
Following are the first few: PowerShell DSC resource MSFT_PackageResource failed to execute Set-TargetResource functionality with error message: T
he specified Name (Microsoft Web Deploy 3.6) and IdentifyingNumber ({ED4CC1E5-043E-4157-8452-B5E533FE2BA1}) do not match Name (Microsoft Web Deploy 3.6) and
IdentifyingNumber ({6773A61D-755B-4F74-95CC-97920E45E696}) in the MSI file Cannot find path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IIS Extensions\MSDeploy' because it does not exist.
PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource
functionality with error message: You cannot call a method on a null-valued expression. ".
```
### Repro steps
1. Click the deploy to azure button in the repo
2. Provide mandatory parameters and submit the deployment
3. Check the vmss for errors
Executed within Azure WestEurope
### Possible solution
I was able to fix this by modifying the IISInstall.ps1 file contained within the DSC/IISInstall.ps1.zip file. In particular the value for ProductId was updated.
See the following example.
```powershell
Package InstallWebDeploy
{
Ensure = "Present"
Path = "C:\WindowsAzure\WebDeploy_amd64_en-US.msi"
Name = "Microsoft Web Deploy 3.6"
ProductId = "{6773A61D-755B-4F74-95CC-97920E45E696}"
Arguments = "ADDLOCAL=ALL"
DependsOn = "[Script]DownloadWebDeploy"
}
```
Though I am not 100% sure if this is the right solution.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the 201-vmss-windows-webapp-dsc-autoscale template and inspect DSC/IISInstall.ps1.zip, especially the InstallWebDeploy package configuration. Deploy the template in Azure WestEurope and review the Microsoft.Powershell.DSC extension output. Done means the VM scale set reaches a healthy state without the Web Deploy MSI or InstallIIS errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100