Question

JTSingh on Thu, 11 Jan 2018 04:07:30


Hello All,

           I am trying to onboard VM in DSC, which is giving me error as "Agent has a problem".

This is script I have under DSC Configuration:

Configuration AzureCourseConfig
{
    Node WebServer
  {
    WindowsFeature IIS
   {
    Ensure = 'Present'
    Name   = 'Web-Server'
    IncludeAllSubFeature = $true
    }
    Group Developers
    {
    Ensure   =  'Present'
     GroupName = 'DevGroup'
     }
     Group Accountants
     {
     Ensure = 'Absent'
     GroupName = 'AcctGroup'
     }
     File DirectoryCreate
     {
	  Ensure = 'Present'
	  Type =   'Directory'
	  DestinationPath = "C:\Users\Public\Documents\MyDemo"   
     }
     Log AfterDirectoryCreate
     {
     Message = 'Directory created using DSC'
     DependsOn = '[File]DirectoryCreate'
     }
    }
}

I am getting this Detailed Status under VM Extensions. 

********

[ { "code": "ComponentStatus/DscConfigurationLog/failed/8", "level": "Error", "displayStatus": "Provisioning failed", "message": "[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Resource ] [[File]DirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Test ] [[File]DirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: [[File]DirectoryCreate] The system cannot find the file specified.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: [[File]DirectoryCreate] The related file/directory is: C:\\Users\\Public\\Documents\\MyDemo.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Test ] [[File]DirectoryCreate] in 0.6250 seconds.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Set ] [[File]DirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: [[File]DirectoryCreate] The system cannot find the file specified.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: [[File]DirectoryCreate] The related file/directory is: C:\\Users\\Public\\Documents\\MyDemo.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Set ] [[File]DirectoryCreate] in 0.0620 seconds.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Resource ] [[File]DirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Resource ] [[Log]AfterDirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Test ] [[Log]AfterDirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Test ] [[Log]AfterDirectoryCreate] in 0.0000 seconds.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ Start Set ] [[Log]AfterDirectoryCreate]\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: [[Log]AfterDirectoryCreate] Directory created using DSC\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Set ] [[Log]AfterDirectoryCreate] in 0.0160 seconds.\r\n[2018-01-10 03:09:25Z] [VERBOSE] [WIN-VM1]: LCM: [ End Resource ] [[Log]AfterDirectoryCreate]\r\n[2018-01-10 03:09:25Z] [ERROR] The SendConfigurationApply function did not succeed.\r\n[2018-01-10 03:09:26Z] [VERBOSE] Operation 'Invoke CimMethod' complete.\r\n[2018-01-10 03:09:26Z] [VERBOSE] Time taken for configuration job to complete is 1007.924 seconds" }, { "code": "ComponentStatus/DscExtensionLog/failed/8", "level": "Error", "displayStatus": "Provisioning failed", "message": "[2018-01-10 02:46:59Z] Creating Working directory: C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\r\n[2018-01-10 02:47:00Z] Downloading configuration package\r\n[2018-01-10 02:47:00Z] Downloading https://eus2oaasibizamarketprod1.blob.core.windows.net/automationdscpreview/RegistrationMetaConfigV2.zip to C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\\RegistrationMetaConfigV2.zip\r\n[2018-01-10 02:47:00Z] Extracting RegistrationMetaConfigV2.zip\r\n[2018-01-10 02:47:02Z] Looking for the definition of the configuration function.\r\n[2018-01-10 02:47:02Z] Executing C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\bin\\..\\DSCWork\\RegistrationMetaConfigV2.0\\RegistrationMetaConfigV2.ps1\r\n[2018-01-10 02:47:02Z] Preparing configuration arguments and configuration data.\r\n[2018-01-10 02:47:06Z] Created encryption certificate 7DAF6548F6ACE41589906639E788E055F6E6A737\r\n[2018-01-10 02:47:06Z] Adding encryption certificate 7DAF6548F6ACE41589906639E788E055F6E6A737 to the configuration data\r\n[2018-01-10 02:47:07Z] Creating MOF files.\r\n[2018-01-10 02:47:07Z] Executing the configuration function to generate the MOF files.\r\n[2018-01-10 02:47:13Z] Meta configuration found. Injecting Thumbprint.\r\n[2018-01-10 02:47:13Z] CertificateID not present in existing meta configuration; inserting 7DAF6548F6ACE41589906639E788E055F6E6A737.\r\n[2018-01-10 02:47:13Z] Executing Set-DscLocalConfigurationManager...\r\n[2018-01-10 02:47:22Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\Status\\0.status)\r\n[2018-01-10 02:49:33Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\Status\\0.status)\r\n[2018-01-10 02:49:38Z] Get-DscLocalConfigurationManager: \r\n\r\nActionAfterReboot : ContinueConfiguration\r\nAgentId : 74F30541-F5B0-11E7-A48F-000D3A15F8F5\r\nAllowModuleOverWrite : True\r\nCertificateID : 7DAF6548F6ACE41589906639E788E055F6E6A737\r\nConfigurationDownloadManagers : {[ConfigurationRepositoryWeb]AzureAutomationDS\r\n C}\r\nConfigurationID : \r\nConfigurationMode : ApplyAndMonitor\r\nConfigurationModeFrequencyMins : 15\r\nCredential : \r\nDebugMode : {NONE}\r\nDownloadManagerCustomData : \r\nDownloadManagerName : \r\nLCMCompatibleVersions : {1.0, 2.0}\r\nLCMState : Idle\r\nLCMStateDetail : \r\nLCMVersion : 2.0\r\nStatusRetentionTimeInDays : 10\r\nSignatureValidationPolicy : NONE\r\nSignatureValidations : {}\r\nMaximumDownloadSizeMB : 500\r\nPartialConfigurations : \r\nRebootNodeIfNeeded : True\r\nRefreshFrequencyMins : 30\r\nRefreshMode : Pull\r\nReportManagers : {[ReportServerWeb]AzureAutomationDSC}\r\nResourceModuleManagers : {[ResourceRepositoryWeb]AzureAutomationDSC}\r\nPSComputerName : \r\n\r\n\r\n\r\n\r\n[2018-01-10 02:50:55Z] VMUUId is 708FAE6C-79E4-49C5-B0B4-08C0DEE902A6 ...\r\n[2018-01-10 02:50:56Z] Azure Unique ID is 7783-7084-3265-9085-8269-3286-77 ...\r\n[2018-01-10 02:51:00Z] AgentID is 74F30541-F5B0-11E7-A48F-000D3A15F8F5 ...\r\n[2018-01-10 02:51:07Z] [MDS Telemetry] Invoking [Heartbeat][ExtensionRegistration] event for telemetry.[Status]: Success [Message]: {\r\n \"WindowsEditionId\": \"ServerDatacenter\",\r\n \"ConfigScript\": \"RegistrationMetaConfigV2.ps1\",\r\n \"VMUUID\": \"708FAE6C-79E4-49C5-B0B4-08C0DEE902A6\",\r\n \"HeartbeatEvent\": \"ExtensionRegistration\",\r\n \"AzureEnvironment\": \"AzureCloud\",\r\n \"Cloud\": \"Azure\",\r\n \"ConfigUrl\": \"https://eus2oaasibizamarketprod1.blob.core.windows.net/automationdscpreview/RegistrationMetaConfigV2.zip\",\r\n\"ConfigName\": \"RegistrationMetaConfigV2\",\r\n \"WmfVersion\": \"5.1\"\r\n}\r\n[2018-01-10 02:51:07Z] Looking for configuration names in meta mof file ...\r\n[2018-01-10 02:51:08Z] Changing ForcePullAndApply flag to true as the refresh mode is Pull & ConfigurationName(s) exist in the metamof ...\r\n[2018-01-10 02:51:08Z] Executing Update-DscConfiguration ...\r\n[2018-01-10 02:51:17Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\Status\\0.status)\r\n[2018-01-10 03:09:28Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\Status\\0.status)\r\n[2018-01-10 03:09:28Z] Updating execution status (HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.73.0.0\\Status)\r\n[2018-01-10 03:09:28Z] DSC configuration completed.\r\n[2018-01-10 03:09:28Z] No meta mof back up file exist to restore ...\r\n[2018-01-10 03:09:28Z] Settings handler status to 'error' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.73.0.0\\Status\\0.status)" }, { "code": "ComponentStatus/Metadata/succeeded", "level": "Info", "displayStatus": "Provisioning succeeded", "message": "AgentID=74F30541-F5B0-11E7-A48F-000D3A15F8F5;VMUUID=708FAE6C-79E4-49C5-B0B4-08C0DEE902A6;AzureResourceId=subscriptions/0d023311-c552-414d-aeef-846fd8f8626c/resourceGroups/jluthra/providers/Microsoft.Compute/virtualMachines/win-vm1" } ]

*****************

Please help with your thoughts or comments on this.

Thanks


Sponsored



Replies

Shashanka Haritsa on Fri, 12 Jan 2018 15:38:33


Can you check the Wappagent under c:\WindowsAzure\Logs and see if there was an issue handling the extension?

Alternatively, if you do not select the node configuration and just onboard the VM does that work?

Saurav.Roy on Tue, 06 Feb 2018 16:32:15


Hi, Did you get any solution for this ?