Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TSG/Update/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@
* [Troubleshooting MSI Does Not Have Access to Subscription](../EnvironmentValidator/Troubleshooting-MSI-Does-Not-Have-Access-To-Subscription.md)
* [2510 Update fails at CauPostVersionCheck](./CauPostVersionCheck-2510-23H2.md)
* [Update preparation fails with 'Could not find part of the path' after 24H2 upgrade](./Update-preparation-fails-Could-not-find-part-of-the-file-path.md)
* [2509 | Update Service terminated repeatedly by ALM due to high memory usage](./Update-Service-terminated-repeatedly-by-ALM.md)
* [2509 | Update Service terminated repeatedly by ALM due to high memory usage](./Update-Service-terminated-repeatedly-by-ALM.md)
* [2601 | SBE Update fails with "Cannot validate argument on parameter 'DeployADLess'"](./SBE-Update-Fails-with-Cannot-Validate-Argument-on-Parameter-DeployADLess.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# SBE Update Fails with "Cannot validate argument on parameter 'DeployADLess'"

## Overview

If a cluster was initially deployed (or brownfield-upgraded) with versions earlier than 2408, then after updating it to 2601, subsequent SBE update may fail with the error "Cannot validate argument on parameter 'DeployADLess'".

## Symptoms

For a cluster on 2601, SBE update fails with the message (any partner OEM may be impacted):

```
 Cannot validate argument on parameter 'DeployADLess'.
The argument "[DEPLOYADLESS]" does not belong to the set "true,false," specified by the ValidateSet attribute. 
Supply an argument that is in the set and then try the command again.
at TestHardwarePluginUsed, C:\NugetStore\Microsoft.AzureStack.Role.SBE.10.2601.1002.2027\content\Classes\SBE\SBE.psm1: line 766,
```

## Root Cause

DeployADLess parameter entry was introduced in version 2408, but is only applicable to clusters deployed on this version or later. For earlier clusters, update process did not insert the entry to CloudParameters.

2601 introduced some new SBE scripts that depends on the value of this parameter. In the absence of the parameter, the value becomes the placeholder literal string '[DEPLOYADLESS]'. This value is unexpected by the script and thus fails the update.
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the sentence "2601 introduced some new SBE scripts that depends on the value of this parameter.", the subject is plural ("scripts"), so the verb should also be plural ("depend") for correct grammar and clearer reading.

Suggested change
2601 introduced some new SBE scripts that depends on the value of this parameter. In the absence of the parameter, the value becomes the placeholder literal string '[DEPLOYADLESS]'. This value is unexpected by the script and thus fails the update.
2601 introduced some new SBE scripts that depend on the value of this parameter. In the absence of the parameter, the value becomes the placeholder literal string '[DEPLOYADLESS]'. This value is unexpected by the script and thus fails the update.

Copilot uses AI. Check for mistakes.


## Resolution

The following script may be run from any host node. After running the script, resume update.

```Powershell
$ErrorActionPreference = "Stop"
Import-Module -Name ECEClient -Verbose:$false -DisableNameChecking -ErrorAction SilentlyContinue

$eceClient = Create-ECEClusterServiceClient
$eceParamsXml = [XML]($eceClient.GetCloudParameters().GetAwaiter().GetResult().CloudDefinitionAsXmlString)

# Only add if we cannot get the parameter.
if (-not ($eceParamsXml.SelectSingleNode("//Category[@Name='Domain']//Parameter[@Name='DeployADLess']")))
{
# Add the DeployADLess parameter
Write-Output "Adding DeployADLess parameter to CloudParameters."
$parametersUpdateDefinition = New-Object Microsoft.AzureStack.Solution.Deploy.EnterpriseCloudEngine.Controllers.Models.CloudParametersUpdateDescription
$parametersUpdateDefinition.Type = "AddElement"
$parametersUpdateDefinition.BaseElementXPath = "//Category[@Name='Domain']"
$parametersUpdateDefinition.UpdateXml = @"
<Parameter Name="DeployADLess" Type="bool" Value="false" AllowedValues="" Reference="[{DEPLOYADLESS}]" />
"@
$null = $eceClient.UpdateCloudParameters($parametersUpdateDefinition).GetAwaiter().GetResult()
Write-Output "Validating add DeployADLess parameter"
$null = $ececlient.InvalidateCloudDefinitionCache().GetAwaiter().GetResult()
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The variable is declared as $eceClient earlier in the script but referenced here as $ececlient with different casing; while PowerShell variable names are case-insensitive, using consistent casing improves readability and avoids confusion when scanning for variable usages.

Suggested change
$null = $ececlient.InvalidateCloudDefinitionCache().GetAwaiter().GetResult()
$null = $eceClient.InvalidateCloudDefinitionCache().GetAwaiter().GetResult()

Copilot uses AI. Check for mistakes.
$eceParamsXml = [XML]($eceClient.GetCloudParameters().getAwaiter().GetResult().CloudDefinitionAsXmlString)
if (-not ($eceParamsXml.SelectSingleNode("//Category[@Name='Domain']//Parameter[@Name='DeployADLess']")))
{
throw "Failed to add DeployADLess parameter."
}
Write-Output "Added DeployADLess parameter to CloudParameters."
}
else
{
Write-Warning "DeployADLess parameter already exists."
}
```
Loading