Multi-User Win 10 image deployment fails Join to ARM AVD step

I have 2 images for a client. 1 image deploys fine, the other keeps failing at the Join to ARM AVD step of deployment. Both images are subject to the same Ninja agent install, GPOs, and Blackpoint Cyber agent install after checking into Ninja. A fresh image from Azure deploys to the host pool without issue as well.

Host is joined to Active Directory.

I found the ARMWVDAgentInstallScript.log in the C:\Windows\Temp\NMWLogs folder. it just keeps repeating steps but doesn't say why.

09-30-24 08:27:26 - MSFT_ScriptResource:27 - Creating a folder inside rdsh vm for extracting deployagent zip file
09-30-24 08:27:26 - MSFT_ScriptResource:82 - Locating DeployAgent.zip within Custom Script Extension folder structure: C:\Packages\Plugins\Microsoft.Powershell.DSC\2.80.3.0\DSCWork\ArmWvdClientSideSetup.4.9.0
09-30-24 08:27:26 - MSFT_ScriptResource:89 - Extracting 'Deployagent.zip' file into 'C:\DeployAgent' folder inside VM
09-30-24 08:27:27 - MSFT_ScriptResource:31 - Changing current folder to Deployagent folder: C:\DeployAgent
09-30-24 08:27:27 - MSFT_ScriptResource:37 - Checking whether VM was Registered with RDInfraAgent
09-30-24 08:27:27 - MSFT_ScriptResource:45 - VM not registered with RDInfraAgent, script execution will continue
09-30-24 08:27:27 - MSFT_ScriptResource:49 - Getting fully qualified domain name of RDSH VM: hostname.domain.com (renamed for privacy)
09-30-24 08:27:27 - MSFT_ScriptResource:52 - AgentInstaller is C:\DeployAgent\RDAgentBootLoaderInstall, InfraInstaller is C:\DeployAgent\RDInfraAgentInstall, SxS is C:\DeployAgent\RDInfraSxSStackInstall

 

I can run the agentinstall powershell script as admin, feeding the registration code, without error. What could be keeping Nerdio from doing it thru an extension?

0

Comments (6 comments)

0
Avatar
Randy Lehman

Here's the info from NMM for the erroring step:

Remove old extension, old result: {"name":"SYNC-AVD-5ba3-join-arm-wvd-ext","type":"Microsoft.Powershell.DSC","typeHandlerVersion":"2.80.3.0","substatuses":[{"code":"ComponentStatus/DscConfigurationLog/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"[2024-09-25 20:43:18Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ] [[Script]ExecuteRdAgentInstallClient]\r\n[2024-09-25 20:43:18Z] [VERBOSE] [SYNC-AVD-5ba3]: [[Script]ExecuteRdAgentInstallClient] Performing the operation \"Set-TargetResource\" on target \"Executing the SetScript with the user supplied credential\".\r\n[2024-09-25 20:43:27Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] [[Script]ExecuteRdAgentInstallClient] in 9.6100 seconds.\r\n[2024-09-25 20:43:28Z] [ERROR] PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. \r\n[2024-09-25 20:43:28Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ]\r\n[2024-09-25 20:43:28Z] [ERROR] The SendConfigurationApply function did not succeed.\r\n[2024-09-25 20:43:28Z] [VERBOSE] Operation 'Invoke CimMethod' complete.\r\n[2024-09-25 20:43:28Z] [VERBOSE] Time taken for configuration job to complete is 10.088 seconds\r\n[2024-09-25 20:44:30Z] [VERBOSE] Performing the operation \"Start-DscConfiguration: SendMetaConfigurationApply\" on target \"MSFT_DSCLocalConfigurationManager\".\r\n[2024-09-25 20:44:30Z] [VERBOSE] Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendMetaConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.\r\n[2024-09-25 20:44:30Z] [VERBOSE] An LCM method call arrived from computer SYNC-AVD-5ba3 with user sid S-1-5-18.\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ]\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Resource ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] [MSFT_DSCMetaConfiguration] in 0.0550 seconds.\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Resource ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ]\r\n[2024-09-25 20:44:30Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] in 0.1620 seconds.\r\n[2024-09-25 20:44:30Z] [VERBOSE] Set-DscLocalConfigurationManager finished in 0.417 seconds.\r\n[2024-09-25 20:44:30Z] [VERBOSE] Operation 'Invoke CimMethod' complete.","time":null},{"code":"ComponentStatus/DscExtensionLog/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"[2024-09-25 20:42:42Z] Creating Working directory: C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\r\n[2024-09-25 20:42:42Z] Downloading configuration package\r\n[2024-09-25 20:42:42Z] Downloading https://nmmstorageaccount.blob.core.windows.net/vm-extensions/ArmWvdClientSideSetup.4.9.zip to C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\ArmWvdClientSideSetup.4.9.zip\r\n[2024-09-25 20:43:10Z] Extracting ArmWvdClientSideSetup.4.9.zip\r\n[2024-09-25 20:43:10Z] Looking for the definition of the configuration function.\r\n[2024-09-25 20:43:10Z] Executing C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\Configuration.ps1\r\n[2024-09-25 20:43:10Z] Preparing configuration arguments and configuration data.\r\n[2024-09-25 20:43:10Z] Creating MOF files.\r\n[2024-09-25 20:43:10Z] Executing the configuration function to generate the MOF files.\r\n[2024-09-25 20:43:12Z] Verifying metaconfiguration for reboot information...\r\n[2024-09-25 20:43:12Z] Backing up C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\AdditionalSessionHosts\\localhost.meta.mof\r\n[2024-09-25 20:43:12Z] No match for RegistrationKey found in the meta mof file\r\n[2024-09-25 20:43:12Z] WMF 5 or newer, Injecting RebootNodeIfNeeded = False and ActionAfterReboot = \"StopConfiguration\"\r\n[2024-09-25 20:43:12Z] Executing Set-DscLocalConfigurationManager...\r\n[2024-09-25 20:43:13Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:43:16Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:43:16Z] Get-DscLocalConfigurationManager: \r\n\r\nActionAfterReboot : StopConfiguration\r\nAgentId : 04992463-7B7A-11EF-8F4C-0022487E7992\r\nAllowModuleOverWrite : False\r\nCertificateID : \r\nConfigurationDownloadManagers : {}\r\nConfigurationID : \r\nConfigurationMode : ApplyOnly\r\nConfigurationModeFrequencyMins : 15\r\nCredential : \r\nDebugMode : {NONE}\r\nDownloadManagerCustomData : \r\nDownloadManagerName : \r\nLCMCompatibleVersions : {1.0, 2.0}\r\nLCMState : PendingConfiguration\r\nLCMStateDetail : \r\nLCMVersion : 2.0\r\nStatusRetentionTimeInDays : 10\r\nSignatureValidationPolicy : NONE\r\nSignatureValidations : {}\r\nMaximumDownloadSizeMB : 500\r\nPartialConfigurations : \r\nRebootNodeIfNeeded : False\r\nRefreshFrequencyMins : 30\r\nRefreshMode : PUSH\r\nReportManagers : {}\r\nResourceModuleManagers : {}\r\nPSComputerName : \r\n\r\n\r\n\r\n\r\n[2024-09-25 20:43:16Z] Executing Start-DscConfiguration...\r\n[2024-09-25 20:43:17Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:43:29Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:43:29Z] Updating execution status (HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.80.3.0\\Status)\r\n[2024-09-25 20:43:29Z] LCM state is PendingConfiguration\r\n[2024-09-25 20:44:29Z] DSC configuration completed.\r\n[2024-09-25 20:44:29Z] Resetting metaconfiguration...\r\n[2024-09-25 20:44:29Z] Restoring C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\AdditionalSessionHosts\\localhost.meta.mof.bk...\r\n[2024-09-25 20:44:29Z] Executing Set-DscLocalConfigurationManager...\r\n[2024-09-25 20:44:29Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:44:31Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:44:32Z] Get-DscLocalConfigurationManager: \r\n\r\nActionAfterReboot : ContinueConfiguration\r\nAgentId : 04992463-7B7A-11EF-8F4C-0022487E7992\r\nAllowModuleOverWrite : False\r\nCertificateID : \r\nConfigurationDownloadManagers : {}\r\nConfigurationID : \r\nConfigurationMode : ApplyOnly\r\nConfigurationModeFrequencyMins : 15\r\nCredential : \r\nDebugMode : {NONE}\r\nDownloadManagerCustomData : \r\nDownloadManagerName : \r\nLCMCompatibleVersions : {1.0, 2.0}\r\nLCMState : PendingConfiguration\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 : PUSH\r\nReportManagers : {}\r\nResourceModuleManagers : {}\r\nPSComputerName : \r\n\r\n\r\n\r\n\r\n[2024-09-25 20:44:32Z] Settings handler status to 'error' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)","time":null},{"code":"ComponentStatus/Metadata/succeeded","level":"Info","displayStatus":"Provisioning succeeded","message":"VMUUId=D47AC356-F332-4B4F-B971-F72B65E6F085;AgentId=04992463-7B7A-11EF-8F4C-0022487E7992;","time":null}],"statuses":[{"code":"ProvisioningState/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"DSC Configuration 'AdditionalSessionHosts' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. The SendConfigurationApply function did not succeed.","time":"2024-09-25T20:44:32Z"}]}
Extension was removed
Install Join ARM AVD extension
Error: An error occurred during Join ARM WVD extension installation: System.AggregateException: One or more errors occurred. (Long running operation failed with status 'Failed'. Additional Info:'VM has reported a failure when processing extension 'SYNC-AVD-5ba3-join-arm-wvd-ext' (publisher 'Microsoft.Powershell' and type 'DSC'). Error message: 'DSC Configuration 'AdditionalSessionHosts' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. The SendConfigurationApply function did not succeed.'. More information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot. ') ---> Microsoft.Rest.Azure.CloudException: Long running operation failed with status 'Failed'. Additional Info:'VM has reported a failure when processing extension 'SYNC-AVD-5ba3-join-arm-wvd-ext' (publisher 'Microsoft.Powershell' and type 'DSC'). Error message: 'DSC Configuration 'AdditionalSessionHosts' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. The SendConfigurationApply function did not succeed.'. More information on troubleshooting is available at https://aka.ms/VMExtensionDSCWindowsTroubleshoot. ' at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.CheckForErrors() at Microsoft.Rest.ClientRuntime.Azure.LRO.PutLRO`2.CheckForErrors() at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.StartPollingAsync() at Microsoft.Rest.ClientRuntime.Azure.LRO.AzureLRO`2.BeginLROAsync() at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync[TBody,THeader](IAzureClient client, AzureOperationResponse`2 response, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Rest.Azure.AzureClientExtensions.GetLongRunningOperationResultAsync[TBody](IAzureClient client, AzureOperationResponse`1 response, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Rest.Azure.AzureClientExtensions.GetPutOrPatchOperationResultAsync[TBody](IAzureClient client, AzureOperationResponse`1 response, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.Management.Compute.Fluent.VirtualMachineExtensionsOperations.CreateOrUpdateWithHttpMessagesAsync(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters, Dictionary`2 customHeaders, CancellationToken cancellationToken) at Microsoft.Azure.Management.Compute.Fluent.VirtualMachineExtensionsOperationsExtensions.CreateOrUpdateAsync(IVirtualMachineExtensionsOperations operations, String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters, CancellationToken cancellationToken) at Microsoft.Azure.Management.Compute.Fluent.VirtualMachineExtensionImpl.CreateAsync(CancellationToken cancellationToken) --- End of inner exception stack trace --- at Microsoft.Azure.Management.Compute.Fluent.VirtualMachineImpl.CreateResourceAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.Creatable`4.Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.IResourceCreator<IResourceT>.CreateResourceAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.CreatorTaskItem`1.ExecuteAsync(CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.DAG.TaskGroupBase`1.ExecuteNodeTaskAsync(DAGNode`1 node, CancellationToken cancellationToken) at Microsoft.Azure.Management.ResourceManager.Fluent.Core.ResourceActions.CreatableUpdatable`5.ApplyAsync(CancellationToken cancellationToken, Boolean multiThreaded) at Riviere.Provision.Jobs.Partials.VMExtensions.JoinArmWvdExtension.AddTo(IVirtualMachine vm, String registrationToken) in D:\a\1\s\src\Riviere.Provision\Jobs\Partials\VMExtensions\JoinArmWvdExtension.cs:line 62 at Riviere.Provision.Jobs.Partials.VMExtensions.JoinArmWvdExtension.InstallTo(IVirtualMachine vm, String registrationToken, JobDetailsStringBuilder logger) in D:\a\1\s\src\Riviere.Provision\Jobs\Partials\VMExtensions\JoinArmWvdExtension.cs:line 49. With extension result: {"name":"SYNC-AVD-5ba3-join-arm-wvd-ext","type":"Microsoft.Powershell.DSC","typeHandlerVersion":"2.80.3.0","substatuses":[{"code":"ComponentStatus/DscConfigurationLog/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"[2024-09-25 20:58:25Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ] [[Script]ExecuteRdAgentInstallClient]\r\n[2024-09-25 20:58:25Z] [VERBOSE] [SYNC-AVD-5ba3]: [[Script]ExecuteRdAgentInstallClient] Performing the operation \"Set-TargetResource\" on target \"Executing the SetScript with the user supplied credential\".\r\n[2024-09-25 20:58:35Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] [[Script]ExecuteRdAgentInstallClient] in 9.6720 seconds.\r\n[2024-09-25 20:58:35Z] [ERROR] PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. \r\n[2024-09-25 20:58:35Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ]\r\n[2024-09-25 20:58:35Z] [ERROR] The SendConfigurationApply function did not succeed.\r\n[2024-09-25 20:58:35Z] [VERBOSE] Operation 'Invoke CimMethod' complete.\r\n[2024-09-25 20:58:35Z] [VERBOSE] Time taken for configuration job to complete is 10.154 seconds\r\n[2024-09-25 20:59:39Z] [VERBOSE] Performing the operation \"Start-DscConfiguration: SendMetaConfigurationApply\" on target \"MSFT_DSCLocalConfigurationManager\".\r\n[2024-09-25 20:59:39Z] [VERBOSE] Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendMetaConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.\r\n[2024-09-25 20:59:39Z] [VERBOSE] An LCM method call arrived from computer SYNC-AVD-5ba3 with user sid S-1-5-18.\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ]\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Resource ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ Start Set ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] [MSFT_DSCMetaConfiguration] in 0.0890 seconds.\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Resource ] [MSFT_DSCMetaConfiguration]\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ]\r\n[2024-09-25 20:59:39Z] [VERBOSE] [SYNC-AVD-5ba3]: LCM: [ End Set ] in 0.2750 seconds.\r\n[2024-09-25 20:59:39Z] [VERBOSE] Operation 'Invoke CimMethod' complete.\r\n[2024-09-25 20:59:39Z] [VERBOSE] Set-DscLocalConfigurationManager finished in 0.486 seconds.","time":null},{"code":"ComponentStatus/DscExtensionLog/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"[2024-09-25 20:57:50Z] Creating Working directory: C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\r\n[2024-09-25 20:57:50Z] Downloading configuration package\r\n[2024-09-25 20:57:50Z] Downloading https://nmmstorageaccount.blob.core.windows.net/vm-extensions/ArmWvdClientSideSetup.4.9.zip to C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\ArmWvdClientSideSetup.4.9.zip\r\n[2024-09-25 20:58:17Z] Extracting ArmWvdClientSideSetup.4.9.zip\r\n[2024-09-25 20:58:18Z] Looking for the definition of the configuration function.\r\n[2024-09-25 20:58:18Z] Executing C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\bin\\..\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\Configuration.ps1\r\n[2024-09-25 20:58:18Z] Preparing configuration arguments and configuration data.\r\n[2024-09-25 20:58:18Z] Creating MOF files.\r\n[2024-09-25 20:58:18Z] Executing the configuration function to generate the MOF files.\r\n[2024-09-25 20:58:20Z] Verifying metaconfiguration for reboot information...\r\n[2024-09-25 20:58:20Z] Backing up C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\AdditionalSessionHosts\\localhost.meta.mof\r\n[2024-09-25 20:58:20Z] No match for RegistrationKey found in the meta mof file\r\n[2024-09-25 20:58:20Z] WMF 5 or newer, Injecting RebootNodeIfNeeded = False and ActionAfterReboot = \"StopConfiguration\"\r\n[2024-09-25 20:58:20Z] Executing Set-DscLocalConfigurationManager...\r\n[2024-09-25 20:58:21Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:58:23Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:58:24Z] Get-DscLocalConfigurationManager: \r\n\r\nActionAfterReboot : StopConfiguration\r\nAgentId : 04992463-7B7A-11EF-8F4C-0022487E7992\r\nAllowModuleOverWrite : False\r\nCertificateID : \r\nConfigurationDownloadManagers : {}\r\nConfigurationID : \r\nConfigurationMode : ApplyOnly\r\nConfigurationModeFrequencyMins : 15\r\nCredential : \r\nDebugMode : {NONE}\r\nDownloadManagerCustomData : \r\nDownloadManagerName : \r\nLCMCompatibleVersions : {1.0, 2.0}\r\nLCMState : PendingConfiguration\r\nLCMStateDetail : \r\nLCMVersion : 2.0\r\nStatusRetentionTimeInDays : 10\r\nSignatureValidationPolicy : NONE\r\nSignatureValidations : {}\r\nMaximumDownloadSizeMB : 500\r\nPartialConfigurations : \r\nRebootNodeIfNeeded : False\r\nRefreshFrequencyMins : 30\r\nRefreshMode : PUSH\r\nReportManagers : {}\r\nResourceModuleManagers : {}\r\nPSComputerName : \r\n\r\n\r\n\r\n\r\n[2024-09-25 20:58:24Z] Executing Start-DscConfiguration...\r\n[2024-09-25 20:58:24Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:58:36Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:58:36Z] Updating execution status (HKLM:\\SOFTWARE\\Microsoft\\Azure\\DSC\\2.80.3.0\\Status)\r\n[2024-09-25 20:58:36Z] LCM state is PendingConfiguration\r\n[2024-09-25 20:59:36Z] DSC configuration completed.\r\n[2024-09-25 20:59:36Z] Resetting metaconfiguration...\r\n[2024-09-25 20:59:36Z] Restoring C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\DSCWork\\ArmWvdClientSideSetup.4.9.0\\AdditionalSessionHosts\\localhost.meta.mof.bk...\r\n[2024-09-25 20:59:36Z] Executing Set-DscLocalConfigurationManager...\r\n[2024-09-25 20:59:36Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:59:40Z] Settings handler status to 'transitioning' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)\r\n[2024-09-25 20:59:41Z] Get-DscLocalConfigurationManager: \r\n\r\nActionAfterReboot : ContinueConfiguration\r\nAgentId : 04992463-7B7A-11EF-8F4C-0022487E7992\r\nAllowModuleOverWrite : False\r\nCertificateID : \r\nConfigurationDownloadManagers : {}\r\nConfigurationID : \r\nConfigurationMode : ApplyOnly\r\nConfigurationModeFrequencyMins : 15\r\nCredential : \r\nDebugMode : {NONE}\r\nDownloadManagerCustomData : \r\nDownloadManagerName : \r\nLCMCompatibleVersions : {1.0, 2.0}\r\nLCMState : PendingConfiguration\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 : PUSH\r\nReportManagers : {}\r\nResourceModuleManagers : {}\r\nPSComputerName : \r\n\r\n\r\n\r\n\r\n[2024-09-25 20:59:41Z] Settings handler status to 'error' (C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.80.3.0\\Status\\0.status)","time":null},{"code":"ComponentStatus/Metadata/succeeded","level":"Info","displayStatus":"Provisioning succeeded","message":"VMUUId=D47AC356-F332-4B4F-B971-F72B65E6F085;AgentId=04992463-7B7A-11EF-8F4C-0022487E7992;","time":null}],"statuses":[{"code":"ProvisioningState/failed/8","level":"Error","displayStatus":"Provisioning failed","message":"DSC Configuration 'AdditionalSessionHosts' completed with error(s). Following are the first few: PowerShell DSC resource MSFT_ScriptResource failed to execute Set-TargetResource functionality with error message: Specified cast is not valid. The SendConfigurationApply function did not succeed.","time":"2024-09-25T20:59:41Z"}]}

0
Avatar
Chuck Mikuzis

Randy, is it possible that one of those images has the AVD agent already installed on the source VM?  This is a common cause of this.  You'll find that during the image creation/import process that this is enabled by default here for this reason:

0
Avatar
Randy Lehman

No, the AVD agent has never been installed on the images. I double checked that it is not currently installed and there is no RDagentBootLoader, RDInfraAgent or RDMonitoringAgent records in the Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft registry location.

0
Avatar
Dave Stephenson

I would say that it's something wrong with the image.
You could try installing the AVD Agent on the host (see NMM-SE/Azure Runbooks/Reinstall AVD Agent.ps1 at main · Get-Nerdio/NMM-SE (github.com)) , and then uninstalling it before doing the "Set as Image" task.

If that doesn't work, you can always open a support ticket and our MSP Escalations Team can help you out.

1
Avatar
Randy Lehman

Thanks for the idea. It didn't work. I'll be starting over with a fresh image.

0
Avatar
Dave Stephenson

Bummer.
I was hoping that would fix it.
Oh, well. A fresh image is always a good alternative. 🙂

Please sign in to leave a comment.