File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -2150,11 +2150,27 @@ function Verify-NodesArcRegistrationState{
21502150}
21512151
21522152function ValidateCloudDeployment {
2153- if ($env: DEPLOYMENTTYPE -eq " cloud_deployment" )
2154- {
2155- Write-VerboseLog " Cloud Deployment is enabled"
2153+ $regPath = " HKLM:\Software\Microsoft\AzureStackStampInformation"
2154+ $regName = " DeploymentLaunchType"
2155+ $cloudValue = " CloudDeployment"
2156+ # check environment variable
2157+ if ($env: DEPLOYMENTTYPE -eq " cloud_deployment" ) {
2158+ Write-VerboseLog " Cloud Deployment detected via environment variable"
21562159 return $true
21572160 }
2161+ # Check registry key set in Set-IdentifierForCloudDeployment by LCM Team
2162+ try {
2163+ if (Test-Path $regPath ) {
2164+ $regValue = Get-ItemPropertyValue - Path $regPath - Name $regName - ErrorAction SilentlyContinue
2165+ if ($regValue -eq $cloudValue ) {
2166+ Write-VerboseLog " Cloud Deployment detected via registry key"
2167+ return $true
2168+ }
2169+ }
2170+ }
2171+ catch {
2172+ Write-VerboseLog " Failed to read cloud deployment flag from registry: $ ( $_.Exception.Message ) "
2173+ }
21582174 Write-VerboseLog " Cloud Deployment is disabled, normal deployment"
21592175 return $false
21602176}
Original file line number Diff line number Diff line change 1818 - Additional information about change #1
1919-->
2020## Upcoming Release
21+ * Improved cloud deployment detection during Azure Arc repair operations to prevent duplicate enablement attempts and ensure smoother deployment experiences.
2122
2223## Version 2.6.5
2324* ARC Enablement of Nodes Before Triggering Registration in New Registration Flow.
You can’t perform that action at this time.
0 commit comments