stgeorgi / wvdquickstart

26 stars 31 forks source link

Deploy module [VirtualMachines] in [WVD2] via [WVD2 #14

Open VinceThompson opened 3 years ago

VinceThompson commented 3 years ago

I have the following error when it get's to the WindowsCustomScriptExtension. Can anyone help me? I have not edited the code in anyway so not sure why this is not working.

2020-10-06T16:08:09.3629414Z New-AzResourceGroupDeployment: /home/vsts/work/1/s/SharedDeploymentFunctions/Invoke-GeneralDeployment.ps1:76 2020-10-06T16:08:09.3631059Z Line | 2020-10-06T16:08:09.3632064Z  76 |  … eployment = New-AzResourceGroupDeployment @DeploymentInputs -Resource … 2020-10-06T16:08:09.3633055Z  |  ~~~~~~~~~~~~~ 2020-10-06T16:08:09.3634035Z  | 16:08:09 - Resource 2020-10-06T16:08:09.3634893Z  | Microsoft.Compute/virtualMachines/extensions 2020-10-06T16:08:09.3635766Z  | 'QS-WVD-VM001/WindowsCustomScriptExtension' failed with 2020-10-06T16:08:09.3636713Z  | message '{ "status": "Failed", "error": { "code": 2020-10-06T16:08:09.3637782Z  | "ResourceDeploymentFailure", "message": "The resource 2020-10-06T16:08:09.3638709Z  | operation completed with terminal provisioning state 2020-10-06T16:08:09.3639608Z  | 'Failed'.", "details": [ { "code": 2020-10-06T16:08:09.3641835Z  | "VMExtensionProvisioningError", "message": "VM has 2020-10-06T16:08:09.3660229Z  | reported a failure when processing extension 2020-10-06T16:08:09.3660838Z  | 'WindowsCustomScriptExtension'. Error message: \"Command 2020-10-06T16:08:09.3663656Z  | execution finished, but failed because it returned a non-zero 2020-10-06T16:08:09.3664292Z  | exit code of: '1'. The command had an error output of: 2020-10-06T16:08:09.3664879Z  | 'Missing closing '}' in statement block or type 2020-10-06T16:08:09.3665471Z  | definition.\r\n + CategoryInfo : ParserError: (:) 2020-10-06T16:08:09.3666082Z  | [], ParentContainsErrorRecordException\r\n + 2020-10-06T16:08:09.3666617Z  | FullyQualifiedErrorId : MissingEndCurlyBrace\r\n 2020-10-06T16:08:09.3667184Z  | \r\n'\"\r\n\r\nMore information on troubleshooting is 2020-10-06T16:08:09.3667768Z  | available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot 2020-10-06T16:08:09.3668276Z  | " } ] } }' 2020-10-06T16:08:09.3668955Z  2020-10-06T16:08:09.3845855Z ##[error]PowerShell exited with code '1'.

VinceThompson commented 3 years ago

Sorry to chase but i am trying to deploy this for a customer so i can demo WVD, could someone please have a look at my issue above and let me know ASAP. I really appreciate the help.

Thanks

VinceThompson commented 3 years ago

@stgeorgi Do you have any idea or where i can look to see what this error is, it seems to imply a missing '}' but cannot find out where. I have not amended the code in anyway.

Really need some help.

Thanks again

stgeorgi commented 3 years ago

Can you please share the Azure RunBook logs? The error here seems strange as if there was indeed a missing } how were all the other deployments working...something in the input is breaking the validation

VinceThompson commented 3 years ago

@stgeorgi I will get the logs. Don't suppose you have a solution doing all this via terraform using the latest WVD azurerm?

justin-shiah commented 3 years ago

@VinceThompson Are you still facing this issue? Were you able to get the logs?

stgeorgi commented 3 years ago

Based on another investigation and if this was done on a subscription with existing AD DS failed because it could not join the VM to AD DS. Option one is to manually domain join the vm and re-run option is to fix the DNS server to resolve the AD DS.