These steps helped here:
Workaround:
- removing LCM extension via PS or Portal
- creating the mentioned HKLM Key (as removing will delete it) via PS
- reboot the nodes via PS
- register LCM extension via PS
Root Cause:
The function Test-Nodeinitialization runs before or during LCM extension creation. It will test for a registry key which is not present before the LCM deployment is not already succeded.
Only after the successful creation of LCM extension this registry key is created and contains the expected String Value.
Solution:
The exception in the function should not terminate the deployment of the LCM extension but rather check for the existance of this registry key (Test-Path), and if it does not exist should create the registry key.
xtension Message: Enable-Extension.ps1 : Installing LCM extention failed:
Extension Error: Get-ItemProperty : Cannot find path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LCMAzureStackStampInformation' because it
does not exist.
At C:\NugetStore\Microsoft.AzureStack.Solution.LCMControllerWinService.10.2402.0.15\content\LCMControllerWinService\Dep
loymentScripts\LCMControllerWinService.psm1:128 char:30
the error refers to this function below and in fact the complete hive is empty. And on a fresh 23H2 box it does not exist.
NOTHING in the whole LCMControllerWinService.psm1 module does actually create this hive in the registry.
Especially NOT the function Install-LCMController.
Please try https://github.com/DellGEOS/AzureStackHOLs/tree/main/lab-guides/01a-DeployAzureStackHCICluster-CloudBasedDeployment in WestEU.
LCMControllerWinService.psm1 reference
function Test-NodeInitialization
{
$existingService = Get-WmiObject Win32_Service | where {$_.Name -eq 'LcmController'}
$eceLiteDir = Split-Path $existingService.PathName
$eceLite = Join-Path $eceLiteDir "EnterpriseCloudEngine.psd1"
$InitializeAction = "InitializeDeploymentService"
$initializationStatus = (Get-ItemProperty -path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\LCMAzureStackStampInformation -Name InitializationComplete).InitializationComplete
if (![string]::IsNullOrEmpty($initializationStatus) -and ($initializationStatus -eq "Complete"))
{
Write-Verbose "Node Initialization successfull."
}
elseif (Test-path -path $eceLite)
{
Import-Module $eceLite
$actionProgress = Get-ActionProgress -ActionType $InitializeAction
if (!$actionProgress)
{
throw "Node Initialization not started."
}
elseif ($actionProgress -and $actionProgress.Attribute("Status").Value -eq "Success")
{
Write-Verbose "Node Initialization successfull."
}
elseif ($actionProgress -and $actionProgress.Attribute("Status").Value -eq "Error")
{
Write-Verbose "Node Initialization failed with error: $($actionProgress.Attribute("Status").Parent.Value)"
throw "Node Initialization failed with error: $($actionProgress.Attribute("Status").Parent.Value)"
}
elseif ($actionProgress -and $actionProgress.Attribute("Status").Value -eq "InProgress")
{
Write-Verbose "Initialization action plan status:$($actionProgress.Attribute("Status").Value)"
throw "Node Initialization in progress."
}
else
{
Write-Verbose "Node Initialization failed."
}
}
else
{
throw "Node Initialization failed."
}
}