I have an azure virtual machine, freshly spun up, it's connected to my office through a VPN. The NSG governs such that the computer can only access the internet though the on-prem proxy that requires authentication.
Browsing to the internet as my user is fine once the proxy has been set.
I'm trying to enrol the machine in Azure Automation - just a simple script that installs IIS to test the functionality - but I'm just not able to make it work. The only thing I can think is the internet access limitation.
I've changed the user running the Azure VM Agent to be my user which should have internet access and is administrator on the VM.
This is the error I'm getting back:
{
"code": "ComponentStatus/DscConfigurationLog/failed/8",
"level": "Error",
"displayStatus": "Provisioning failed",
"message": "[2018-08-07 10:12:15Z] [VERBOSE] Performing the operation \"Start-DscConfiguration: SendMetaConfigurationApply\" on target \"MSFT_DSCLocalConfigurationManager\".\r\n[2018-08-07 10:12:15Z] [VERBOSE] Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendMetaConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.\r\n[2018-08-07 10:12:16Z] [VERBOSE] An LCM method call arrived from computer UKS-DV2-APP01 with user sid S-1-5-21-749233376-2042966360-840782136-22985.\r\n[2018-08-07 10:12:16Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ Start Set ]\r\n[2018-08-07 10:12:16Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ Start Resource ] [MSFT_DSCMetaConfiguration]\r\n[2018-08-07 10:12:16Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ Start Set ] [MSFT_DSCMetaConfiguration]\r\n[2018-08-07 10:12:16Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ End Set ] [MSFT_DSCMetaConfiguration] in 0.0630 seconds.\r\n[2018-08-07 10:12:16Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ End Resource ] [MSFT_DSCMetaConfiguration]\r\n[2018-08-07 10:12:38Z] [VERBOSE] [UKS-DV2-APP01]: LCM: [ End Set ]\r\n[2018-08-07 10:13:21Z] [ERROR] Registration of the Dsc Agent with the server https://uks-agentservice-prod-1.azure-automation.net/accounts/GUID failed. The underlying error is: Failed to register Dsc Agent with AgentId GUID with the server https://uks-agentservice-prod-1.azure-automation.net/accounts/GUID/Nodes(AgentId='GUID'). .\r\n[2018-08-07 10:13:21Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\Status\\0.status)\r\n[2018-08-07 10:13:21Z] [VERBOSE] Operation 'Invoke CimMethod' complete.\r\n[2018-08-07 10:13:21Z] [VERBOSE] Set-DscLocalConfigurationManager finished in 65.647 seconds."
},
{
"code": "ComponentStatus/DscExtensionLog/failed/8",
"level": "Error",
"displayStatus": "Provisioning failed",
"message": "[2018-08-07 10:12:07Z] Updating execution status (HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.76.0.0\\Status)\r\n[2018-08-07 10:12:07Z] Transitioning to ProcessConfiguration state ...\r\n[2018-08-07 10:12:07Z] Getting handler execution status HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.76.0.0\\Status ...\r\n[2018-08-07 10:12:07Z] Getting handler execution status HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.76.0.0\\Status ...\r\n[2018-08-07 10:12:07Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\Status\\0.status)\r\n[2018-08-07 10:12:07Z] Applying DSC configuration:\r\n[2018-08-07 10:12:07Z] Sequence Number: 0\r\n[2018-08-07 10:12:07Z] Configuration URL: C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\bin\\..\\scripts\\dscaa\\RegistrationMetaConfigV2.ps1\r\n[2018-08-07 10:12:07Z] Configuration Script: RegistrationMetaConfigV2.ps1\r\n[2018-08-07 10:12:07Z] Configuration Function: RegistrationMetaConfigV2\r\n[2018-08-07 10:12:07Z] Creating Working directory: C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\r\n[2018-08-07 10:12:07Z] Downloading configuration package\r\n[2018-08-07 10:12:07Z] Downloading C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\bin\\..\\scripts\\dscaa\\RegistrationMetaConfigV2.ps1 to C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\\RegistrationMetaConfigV2.ps1\r\n[2018-08-07 10:12:07Z] Looking for the definition of the configuration function.\r\n[2018-08-07 10:12:07Z] Executing C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\\RegistrationMetaConfigV2.ps1\r\n[2018-08-07 10:12:07Z] Preparing configuration arguments and configuration data.\r\n[2018-08-07 10:12:09Z] Created encryption certificate 9CACC48CC5509493F01B97B1F3B5710A63DA311E\r\n[2018-08-07 10:12:09Z] Adding encryption certificate CERT KEY to the configuration data\r\n[2018-08-07 10:12:09Z] Creating MOF files.\r\n[2018-08-07 10:12:09Z] Executing the configuration function to generate the MOF files.\r\n[2018-08-07 10:12:11Z] Meta configuration found. Injecting Thumbprint.\r\n[2018-08-07 10:12:11Z] CertificateID not present in existing meta configuration; inserting CERT KEY.\r\n[2018-08-07 10:12:11Z] Verifying metaconfiguration for reboot information...\r\n[2018-08-07 10:12:11Z] Executing Set-DscLocalConfigurationManager...\r\n[2018-08-07 10:12:12Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\Status\\0.status)\r\n[2018-08-07 10:13:22Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\Status\\0.status)\r\n[2018-08-07 10:13:22Z] Updating execution status (HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.76.0.0\\Status)\r\n[2018-08-07 10:13:22Z] DSC configuration completed.\r\n[2018-08-07 10:13:22Z] No meta mof back up file exist to restore ...\r\n[2018-08-07 10:13:22Z] Settings handler status to 'error' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.76.0.0\\Status\\0.status)"
},
DSC currently doesn't support proxy configuration. I recommend up-voting this feature request for DSC to be Proxy-aware. These will go directly to the product team for review. https://feedback.azure.com/forums/246290-automation/suggestions/33579367-lcm-dsc-proxy-awareness You may be able to use a hybrid runbook as a workaround.