Azure / avdaccelerator

AVD Accelerator deployment automation to simplify the setup of AVD (Azure Virtual Desktop) based on best practices
MIT License
342 stars 214 forks source link

Deploy-Custom-Image - Error in customization.log - The argument "LGPO" does not belong to the set #706

Closed ThojoUno closed 1 week ago

ThojoUno commented 2 weeks ago

What happened? Provide a clear and concise description of the bug, including deployment details.

It appears the Windows_VDOT.ps1 is mismatched with the Set-VirtualDesktopOptimizations.ps1 in that the Set-VirtualizationOptimizations.ps1 script is passing an extra parameter "LGPO" that doesn't exist in the Windows_VDOT.ps1 script.

Disabled Set-NetAdapterAdvancedProperty [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: Virtual Desktop Optimization Tool (VDOT): Completed Prerequisites [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: Virtual Desktop Optimization Tool (VDOT): Begin Tool Execution [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Optimizations'. The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,DefaultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,DefaultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ValidateSetAttribute.ValidateElement(Object element) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ValidateEnumeratedArgumentsAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: --- End of inner exception stack trace --- [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 packer-provisioner-powershell plugin: [INFO] 5594 bytes written for 'stdout' [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 1 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: C:\optimize\Virtual-Desktop-Optimization-Tool-main\Windows_VDOT.ps1 : Cannot validate argument on parameter [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: 'Optimizations'. The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,Def [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: aultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: attribute. Supply an argument that is in the set and then try the command again. [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: At C:\Windows\Temp\script-67290eaf-0ad9-5c29-8262-71aa96bd41d8.ps1:58 char:39 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + ... timizations 'AppxPackages','Autologgers','DefaultUserSettings','LGPO' ... [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + ~~~~~~~~~~~~~ [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + CategoryInfo : InvalidData: (:) [Windows_VDOT.ps1], ParentContainsErrorRecordException [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + FullyQualifiedErrorId : ParameterArgumentValidationError,Windows_VDOT.ps1

Please provide the correlation id associated with your error or bug.

xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

What was the expected outcome?

No response

Relevant log output

Disabled Set-NetAdapterAdvancedProperty [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: Virtual Desktop Optimization Tool (VDOT): Completed Prerequisites [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: Virtual Desktop Optimization Tool (VDOT): Begin Tool Execution [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: System.Management.Automation.ParameterBindingValidationException: Cannot validate argument on parameter 'Optimizations'. The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,DefaultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. ---> System.Management.Automation.ValidationMetadataException: The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,DefaultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet attribute. Supply an argument that is in the set and then try the command again. [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ValidateSetAttribute.ValidateElement(Object element) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ValidateEnumeratedArgumentsAttribute.Validate(Object arguments, EngineIntrinsics engineIntrinsics) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ParameterBinderBase.BindParameter(CommandParameterInternal parameter, CompiledCommandParameter parameterMetadata, ParameterBindingFlags flags) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: --- End of inner exception stack trace --- [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 packer-provisioner-powershell plugin: [INFO] 5594 bytes written for 'stdout' [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 packer-provisioner-powershell plugin: [INFO] RPC client: Communicator ended with: 1 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: C:\optimize\Virtual-Desktop-Optimization-Tool-main\Windows_VDOT.ps1 : Cannot validate argument on parameter [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: 'Optimizations'. The argument "LGPO" does not belong to the set "All,WindowsMediaPlayer,AppxPackages,ScheduledTasks,Def [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: aultUserSettings,LocalPolicy,Autologgers,Services,NetworkOptimizations,DiskCleanup" specified by the ValidateSet [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: attribute. Supply an argument that is in the set and then try the command again. [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: At C:\Windows\Temp\script-67290eaf-0ad9-5c29-8262-71aa96bd41d8.ps1:58 char:39 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + ... timizations 'AppxPackages','Autologgers','DefaultUserSettings','LGPO' ... [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + ~~~~~~~~~~~~~ [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + CategoryInfo : InvalidData: (:) [Windows_VDOT.ps1], ParentContainsErrorRecordException [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: + FullyQualifiedErrorId : ParameterArgumentValidationError,Windows_VDOT.ps1 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: azure-arm: [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 packer-provisioner-powershell plugin: c:/Windows/Temp/script-67290eaf-0ad9-5c29-8262-71aa96bd41d8.ps1 returned with exit code 1 [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 [INFO] (telemetry) ending powershell [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: ==> azure-arm: Provisioning step had errors: Running the cleanup provisioner, if present... [d4e4e1ff-57a5-4aa1-b3b6-83e0d11e6550] PACKER 2024/11/04 18:20:10 ui: ==> azure-arm:

danycontre commented 2 weeks ago

@ThojoUno thanks for your feedback, we are reviewing.

ThojoUno commented 2 weeks ago

PR #710 has been submitted with proposed change to Set-VirtualDesktopOptimizations.ps1

jbass222 commented 2 weeks ago

Status? Appreciate the update!

danycontre commented 1 week ago

@ThojoUno thank you for your contribution, we have decided to remove VDOT functionality from the code given the variability of what customers could want to be part of the image.

@swathibhat1