Reputation: 714
I'm having trouble getting the DSC extension to update the resources on an ARM provisioned VM in azure.
Here is the ARM template resource I'm using:
{
"name": "[concat(parameters('vmName'),'/dscExtension')]",
"type": "Microsoft.Compute/virtualMachines/extensions",
"location": "[resourceGroup().location]",
"apiVersion": "[variables('apiVersion')]",
"dependsOn": [
"[concat('Microsoft.Compute/virtualMachines/', parameters('vmName'))]"
],
"tags": {
"displayName": "Desired State Configuration"
},
"properties": {
"publisher": "Microsoft.Powershell",
"type": "DSC",
"typeHandlerVersion": "2.9",
"autoUpgradeMinorVersion": true,
"forceUpdateTag": "1.012",
"settings": {
"wmfVersion": "latest",
"modulesUrl": "[concat(parameters('_artifactsLocation'), '/', parameters('DSCConfigurationFile'))]",
"sasToken": "[parameters('_artifactsLocationSasToken')]",
"configurationFunction": "[parameters('DSCConfigurationFunction')]",
"properties": {
}
},
"protectedSettings": { }
}
}
],
"outputs": {
}
I've attempted Update the LocalConfigurationManager and Using the forceUpdateTag -- both of these options seem to have no effect.
Here is CommandExecution.log
[05/09/2016 20:17:00.25] Executing: C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\enable.cmd
[05/09/2016 20:17:02.08] Execution Complete.
######
Execution Output:
Waiting for install to complete...
Install completed.
C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0>powershell.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\enable.ps1 -StartAsyncProcess 0<nul
VERBOSE: [2016-05-09T20:17:01] Retrieving status of current request...
VERBOSE: [2016-05-09T20:17:02] Sequence Number : 0
VERBOSE: [2016-05-09T20:17:02] Previous Sequence : 0
VERBOSE: [2016-05-09T20:17:02] RebootPending : False
VERBOSE: [2016-05-09T20:17:02] RebootNodeIfNeeded : False
VERBOSE: [2016-05-09T20:17:02] UseExisting : False
VERBOSE: [2016-05-09T20:17:02] State : Completed
VERBOSE: [2016-05-09T20:17:02] The request for Sequence Number 0 was already processed; will exit.
C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0>exit 0
Execution Error:
######
Command C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\enable.cmd of Microsoft.Powershell.DSC has exited with Exit code: 0
Plugin (name: Microsoft.Powershell.DSC, version: 2.17.0.0) completed successfully.
Notable, there are several commandexecution*.log files being output, one for each deployment, but only 1 DscExtensionHandler*.log
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 5/9/2016 8:17 PM 1331 CommandExecution.log
-a---- 5/9/2016 8:15 PM 1331 CommandExecution_12.log
-a---- 5/9/2016 8:12 PM 1331 CommandExecution_11.log
-a---- 5/9/2016 8:09 PM 1331 CommandExecution_10.log
-a---- 5/9/2016 8:07 PM 1331 CommandExecution_9.log
-a---- 5/9/2016 8:05 PM 1331 CommandExecution_8.log
-a---- 5/9/2016 8:03 PM 1331 CommandExecution_7.log
-a---- 5/9/2016 8:01 PM 1331 CommandExecution_6.log
-a---- 5/9/2016 7:59 PM 24686 DscExtensionHandler.0.20160509-195436.log
-a---- 5/9/2016 7:54 PM 2305 CommandExecution_5.log
Here is the most recent DscExtensionHandler*.log
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\Status\0.status)
VERBOSE: [2016-05-09T19:54:58] Get-DscLocalConfigurationManager:
ActionAfterReboot : ContinueConfiguration
AgentId : E3E292F1-161F-11E6-80C8-000D3A3076AA
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyAndMonitor
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {All}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Idle
LCMStateDetail :
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName :
VERBOSE: [2016-05-09T19:54:58] Executing Start-DscConfiguration...
VERBOSE: [2016-05-09T19:54:58] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\Status\0.status)
VERBOSE: [2016-05-09T19:54:58] [VERBOSE] Perform operation 'Invoke CimMethod' with following parameters, ''methodName' =
SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' =
root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: [2016-05-09T19:54:58] [VERBOSE] An LCM method call arrived from computer WB01 with user sid S-1-5-18.
VERBOSE: [2016-05-09T19:54:58] [VERBOSE] [WB01]: LCM: [ Start Set ]
VERBOSE: [2016-05-09T19:54:59] [VERBOSE] [WB01]: [DSCEngine] Importing the module
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_RoleResource\MSFT_RoleResource
.psm1 in force mode.
VERBOSE: [2016-05-09T19:54:59] [VERBOSE] [WB01]: [DSCEngine] Importing the module
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_ScriptResource\MSFT_ScriptReso
urce.psm1 in force mode.
VERBOSE: [2016-05-09T19:54:59] [VERBOSE] [WB01]: [DSCEngine] Importing the module
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_PackageResource\MSFT_PackageRe
source.psm1 in force mode.
VERBOSE: [2016-05-09T19:54:59] [VERBOSE] [WB01]: [DSCEngine] Importing the module
C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PSDesiredStateConfiguration\DscResources\MSFT_ServiceResource\MSFT_ServiceRe
source.psm1 in force mode.
VERBOSE: [2016-05-09T19:54:59] [VERBOSE] [WB01]: [DSCEngine] Importing the module C:\Program
Files\WindowsPowerShell\Modules\xWebAdministration\1.10.0.0\DscResources\MSFT_xWebsite\MSFT_xWebsite.psm1 in force mode.
VERBOSE: [2016-05-09T19:55:00] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[File]textfile]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Test ] [[File]textfile]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]textfile] The system cannot find the file
specified.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]textfile] The related file/directory is:
C:\dsc.txt.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Test ] [[File]textfile] in 0.0310 seconds.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Set ] [[File]textfile]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]textfile] The system cannot find the file
specified.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]textfile] The related file/directory is:
C:\dsc.txt.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Set ] [[File]textfile] in 0.0000 seconds.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Resource ] [[File]textfile]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[File]HangfireDirectory]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Test ] [[File]HangfireDirectory]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]HangfireDirectory] The system cannot find
the file specified.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]HangfireDirectory] The related
file/directory is: C:\inetpub\wwwroot\Onf.Web.Hangfire.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Test ] [[File]HangfireDirectory] in 0.0150 seconds.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Set ] [[File]HangfireDirectory]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]HangfireDirectory] The system cannot find
the file specified.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[File]HangfireDirectory] The related
file/directory is: C:\inetpub\wwwroot\Onf.Web.Hangfire.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Set ] [[File]HangfireDirectory] in 0.0940 seconds.
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ End Resource ] [[File]HangfireDirectory]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[WindowsFeature]IIS]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: LCM: [ Start Test ] [[WindowsFeature]IIS]
VERBOSE: [2016-05-09T19:55:01] [VERBOSE] [WB01]: [[WindowsFeature]IIS] Importing the module
MSFT_RoleResource in force mode.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[WindowsFeature]IIS] The operation
'Get-WindowsFeature' started: Web-Server
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[WindowsFeature]IIS] The operation
'Get-WindowsFeature' succeeded: Web-Server
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ End Test ] [[WindowsFeature]IIS] in 1.3380 seconds.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Skip Set ] [[WindowsFeature]IIS]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ End Resource ] [[WindowsFeature]IIS]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[WindowsFeature]ApplicationInitialization]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Start Test ] [[WindowsFeature]ApplicationInitialization]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[WindowsFeature]ApplicationInitialization]
Importing the module MSFT_RoleResource in force mode.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[WindowsFeature]ApplicationInitialization] The
operation 'Get-WindowsFeature' started: Web-AppInit
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[WindowsFeature]ApplicationInitialization] The
operation 'Get-WindowsFeature' succeeded: Web-AppInit
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ End Test ] [[WindowsFeature]ApplicationInitialization] in
0.2500 seconds.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Skip Set ] [[WindowsFeature]ApplicationInitialization]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ End Resource ] [[WindowsFeature]ApplicationInitialization]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[Script]DownloadWebDeploy]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Start Test ] [[Script]DownloadWebDeploy]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[Script]DownloadWebDeploy] Importing the module
MSFT_ScriptResource in force mode.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ End Test ] [[Script]DownloadWebDeploy] in 0.0930 seconds.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: LCM: [ Start Set ] [[Script]DownloadWebDeploy]
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[Script]DownloadWebDeploy] Importing the module
MSFT_ScriptResource in force mode.
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[Script]DownloadWebDeploy] Performing the
operation "Set-TargetResource" on target "Executing the SetScript with the user supplied credential".
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[Script]DownloadWebDeploy] GET
http://download.microsoft.com/download/0/1/D/01DC28EA-638C-4A22-A57B-4CEF97755C6C/WebDeploy_amd64_en-US.msi with 0-byte
payload
VERBOSE: [2016-05-09T19:55:02] [VERBOSE] [WB01]: [[Script]DownloadWebDeploy] received 5951488-byte
response of content type application/octet-stream
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ End Set ] [[Script]DownloadWebDeploy] in 0.7570 seconds.
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ End Resource ] [[Script]DownloadWebDeploy]
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[Package]InstallWebDeploy]
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ Start Test ] [[Package]InstallWebDeploy]
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Importing the module
MSFT_PackageResource in force mode.
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy]
Validate-StandardArguments, Path was C:\WindowsAzure\WebDeploy_amd64_en-US.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] The path extension was
.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsing
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as an identifyingNumber
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsed
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as {ED4CC1E5-043E-4157-8452-B5E533FE2BA1}
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Ensure is Present
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] product installation
cannot be determined
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] product as boolean is
False
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] The package Microsoft
Web Deploy 3.6 is not installed
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ End Test ] [[Package]InstallWebDeploy] in 0.0930 seconds.
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: LCM: [ Start Set ] [[Package]InstallWebDeploy]
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Importing the module
MSFT_PackageResource in force mode.
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy]
Validate-StandardArguments, Path was C:\WindowsAzure\WebDeploy_amd64_en-US.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] The path extension was
.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsing
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as an identifyingNumber
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsed
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as {ED4CC1E5-043E-4157-8452-B5E533FE2BA1}
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Ensure is Present
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] product installation
cannot be determined
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] product as boolean is
False
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] The package Microsoft
Web Deploy 3.6 is not installed
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy]
Validate-StandardArguments, Path was C:\WindowsAzure\WebDeploy_amd64_en-US.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] The path extension was
.msi
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsing
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as an identifyingNumber
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Parsed
{ED4CC1E5-043E-4157-8452-B5E533FE2BA1} as {ED4CC1E5-043E-4157-8452-B5E533FE2BA1}
VERBOSE: [2016-05-09T19:55:03] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Package configuration
starting
VERBOSE: [2016-05-09T19:55:06] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Starting
C:\Windows\system32\msiexec.exe with /i "C:\WindowsAzure\WebDeploy_amd64_en-US.msi" /quiet /quiet ADDLOCAL=ALL
VERBOSE: [2016-05-09T19:55:06] [VERBOSE] [WB01]: [[Package]InstallWebDeploy] Starting process
C:\Windows\system32\msiexec.exe with arguments /i "C:\WindowsAzure\WebDeploy_amd64_en-US.msi" /quiet /quiet ADDLOCAL=ALL
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ End Set ] [[Package]InstallWebDeploy] in 265.9510 seconds.
VERBOSE: [2016-05-09T19:59:29] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\Status\0.status)
VERBOSE: [2016-05-09T19:59:29] [ERROR] PowerShell DSC resource MSFT_PackageResource failed to execute Set-TargetResource
functionality with error message: The return code 1603 was not expected. Configuration is likely not correct
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[Script]SetupWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Start Test ] [[Script]SetupWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: [[Script]SetupWebDeploy] Importing the module
MSFT_ScriptResource in force mode.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ End Test ] [[Script]SetupWebDeploy] in 0.0150 seconds.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Skip Set ] [[Script]SetupWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ End Resource ] [[Script]SetupWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[Service]StartWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Start Test ] [[Service]StartWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: [[Service]StartWebDeploy] Importing the module
MSFT_ServiceResource in force mode.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: [[Service]StartWebDeploy] Startup type for service
'WMSVC' is 'Manual'. It does not match 'Automatic'.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ End Test ] [[Service]StartWebDeploy] in 0.0630 seconds.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: LCM: [ Start Set ] [[Service]StartWebDeploy]
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: [[Service]StartWebDeploy] Importing the module
MSFT_ServiceResource in force mode.
VERBOSE: [2016-05-09T19:59:29] [VERBOSE] [WB01]: [[Service]StartWebDeploy] Service 'WMSVC' already
exists. Write properties such as Status, DisplayName, Description, Dependencies will be ignored for existing services.
VERBOSE: [2016-05-09T19:59:32] [VERBOSE] [WB01]: LCM: [ End Set ] [[Service]StartWebDeploy] in 2.4770 seconds.
VERBOSE: [2016-05-09T19:59:32] [ERROR] PowerShell DSC resource MSFT_ServiceResource failed to execute Set-TargetResource
functionality with error message: Failure starting service 'WMSVC'. Please check the path
'C:\Windows\system32\inetsrv\wmsvc.exe' provided for the service. Message: 'Exception calling "WaitForStatus" with "2"
argument(s): "Time out has expired and the operation has not been completed."'
VERBOSE: [2016-05-09T19:59:32] [VERBOSE] [WB01]: LCM: [ Start Resource ] [[xWebsite]CompanySite]
VERBOSE: [2016-05-09T19:59:32] [VERBOSE] [WB01]: LCM: [ Start Test ] [[xWebsite]CompanySite]
VERBOSE: [2016-05-09T19:59:32] [VERBOSE] [WB01]: [[xWebsite]CompanySite] Importing the module
MSFT_xWebsite in force mode.
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: [[xWebsite]CompanySite] The Ensure state for
website "hangfire.onfulfillment.com" does not match the desired state.
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: [[xWebsite]CompanySite] The target resource is not
in the desired state.
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: LCM: [ End Test ] [[xWebsite]CompanySite] in 3.6200 seconds.
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: LCM: [ Start Set ] [[xWebsite]CompanySite]
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: [[xWebsite]CompanySite] Importing the module
MSFT_xWebsite in force mode.
VERBOSE: [2016-05-09T19:59:36] [VERBOSE] [WB01]: [[xWebsite]CompanySite] Performing the operation
"Set Item" on target "Item: ConfirmPreference Value: High".
VERBOSE: [2016-05-09T19:59:38] [VERBOSE] [WB01]: LCM: [ End Set ] [[xWebsite]CompanySite] in 2.9560 seconds.
VERBOSE: [2016-05-09T19:59:38] [ERROR] PowerShell DSC resource MSFT_xWebsite failed to execute Set-TargetResource
functionality with error message: Failure to add certificate to web binding. Please make sure that the certificate thumbprint
"?XXXXXXX" is valid. Error: "Value does not fall within the expected range.".
VERBOSE: [2016-05-09T19:59:38] [VERBOSE] [WB01]: LCM: [ End Set ]
VERBOSE: [2016-05-09T19:59:38] [ERROR] The SendConfigurationApply function did not succeed.
VERBOSE: [2016-05-09T19:59:38] [VERBOSE] Operation 'Invoke CimMethod' complete.
VERBOSE: [2016-05-09T19:59:38] [VERBOSE] Time taken for configuration job to complete is 280.052 seconds
VERBOSE: [2016-05-09T19:59:39] Settings handler status to 'transitioning'
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\Status\0.status)
VERBOSE: [2016-05-09T19:59:39] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC\ExecutionStatus)
VERBOSE: [2016-05-09T19:59:39] DSC configuration completed.
VERBOSE: [2016-05-09T19:59:39] Removing meta.mof and mof files...
VERBOSE: [2016-05-09T19:59:39] Resetting metaconfiguration...
0
VERBOSE: [2016-05-09T19:59:39] Settings handler status to 'error'
(C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\Status\0.status)
VERBOSE: [2016-05-09T19:59:40] Loading Event Source assembly for telemetry...
VERBOSE: [2016-05-09T19:59:40] [Telemetry] Invoking [Configuration][End] event for telemetry.[Status]: Failure
VERBOSE: [2016-05-09T19:59:40] Updating execution status (HKLM:\SOFTWARE\Microsoft\Azure\DSC\ExecutionStatus)
VERBOSE: [2016-05-09T19:59:40] Transitioning to Completed state ...
VERBOSE: [2016-05-09T19:59:40] Removing file
C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\..\DSCWork\ExtensionHandler.Lock.0.dsc
VERBOSE: [2016-05-09T19:59:40] Removing file
C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\..\DSCWork\ExtensionHandler.Lock.dsc
This above script is from a older deployment (the dsc artifact has since changed)
Lastly, the zip file reference seems to always point to the same location on each deploy:
{
"runtimeSettings": [
{
"handlerSettings": {
"protectedSettingsCertThumbprint": "XXXXXXXXXXXX",
"protectedSettings": "XXXXXXX",
"publicSettings": {"wmfVersion":"latest","modulesUrl":"https://XXXXXX.blob.core.windows.net/onf-storage-hangfire-artifacts/DSC6451f1662.zip","sasToken":"?sv=2015-04-05&sr=c&sig=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%3D&se=2016-05-09T23%3A52%3A43Z&sp=r","configurationFunction":"ConfigureWebServer.ps1\\Main","properties":{}}
}
}
]
}
The only option that has been successful so far is to remove the VM and start over from scratch
Thoughts? Thanks in advance!
Upvotes: 0
Views: 3667
Reputation: 11
Fixed! Found a forum post related to the script extension not reprocessing. Here is the solution. Change the VM scale set property upgradePolicy to Automatic. How to force VM created with an ARM template + CustomScriptExtension to redownload the script and run it?
"properties": {
"overprovision": "true",
"upgradePolicy": {
"mode": "Automatic"
},
Upvotes: 1
Reputation: 714
Discovered the problem.
Looks like capturing the server where the DSC extension already installed was the source of the problem
The steps taken to resolve the dsc extension setup were as follows:
1) Uninstalled the DSC extension, by running C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\bin\uninstall.cmd
Note: Edited the cmd file (rem lines below), as it was cd'ing to the wrong folder:
@echo off
rem
rem Uninstall is a no-op for the DSC extension.
rem
rem if exist %CD%\bin_dev (
rem set bin_root=%CD%\bin_dev
rem ) else (
rem set bin_root=%CD%\bin
rem )
set bin_root=%CD%
echo Cleaning up registry key - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Azure\DSC\ExecutionStatus
@echo on
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File %bin_root%\uninstall.ps1 < nul
echo Uninstall completed.
2) Cleared the C:\Packages\Plugins\Microsoft.Powershell.DSC\2.17.0.0\RuntimeSettings\0.settings file
3) Re-captured the machine, redeployed the template
Notable, that the forceUpdateTag works as expected now :)
Upvotes: 0
Reputation: 326
Every time you deploy this template you will have to update the value of "forceUpdateTag" otherwise the request will be ignored. If you are updating "forceUpdateTag" every time and still nothing is happening, then collect the logs from the VM and share it. Log collection tool is available @ https://github.com/PowerShell/xDscDiagnostics
Upvotes: 1