Azure 로컬 대한 연결이 끊긴 작업 등록

이 문서에서는 제어 평면을 사용하여 관리 클러스터를 배포한 후 Azure 로컬 대한 연결이 끊긴 작업을 등록하는 방법을 설명합니다. 적절한 등록을 통해 Azure 로컬 요구 사항을 준수하는 방법을 알아봅니다.

자체 서명 흐름을 사용한 등록

인터넷에 액세스할 수 있는 컴퓨터에서 Azure CLI 및 Azure PowerShell 설치되어 있는지 확인합니다.

PowerShell에서 제공된 함수를 복사합니다.

function New-AzureLocalDisconnectedOperationsSelfAttestation {
    <#
    .SYNOPSIS
    Registers your disconnected operations resource using a self-attestation flow.
    #>
    [CmdletBinding()]
    param(
        [Parameter(Mandatory)]
        [ValidateSet('AzureCloud', 'AzureUSGovernment')]
        [string]$Cloud,

[Parameter(Mandatory)]
        [string]$SubscriptionId,

[Parameter(Mandatory)]
        [string]$ResourceGroup,

[Parameter(Mandatory)]
        [string]$ResourceName,

[Parameter(Mandatory)]
        [int]$TotalCores,

[Parameter(Mandatory)]
        [int]$DiskSpaceInGb,

[Parameter(Mandatory)]
        [int]$MemoryInGb,

[Parameter(Mandatory)]
        [string]$Oem,

[Parameter(Mandatory)]
        [string]$HardwareSku,

[Parameter(Mandatory)]
        [int]$Nodes,

[Parameter(Mandatory)]
        [string]$VersionAtRegistration,

[Parameter(Mandatory)]
        [string]$SolutionBuilderExtension,

[Parameter(Mandatory)]
        [string]$DeviceId,

[string]$ApiVersion = '2026-03-01-preview',

[switch]$SkipLogin
    )

if (-not $SkipLogin) {
                Connect-AzAccount -EnvironmentName $Cloud -ErrorAction Stop | Out-Null
}

Select-AzSubscription -SubscriptionId $SubscriptionId -ErrorAction Stop | Out-Null

function Get-BearerToken {
                param(
                        [Parameter(Mandatory)]
                        [ValidateSet('AzureCloud', 'AzureUSGovernment')]
                        [string]$CloudEnvironment
                )

$resource = switch ($CloudEnvironment) {
                        'AzureCloud'        { 'https://management.azure.com/' }
                        'AzureUSGovernment' { 'https://management.usgovcloudapi.net/' }
                }

$tokenResponse = Get-AzAccessToken -ResourceUrl $resource -ErrorAction Stop
                $token = $tokenResponse.Token
                if ($token -is [System.Security.SecureString]) {
                        $plainTextToken = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($token))
                } else {
                        $plainTextToken = $token
                }
                return "Bearer $plainTextToken"
        }

$baseEndpoint = switch ($Cloud) {
        'AzureCloud'         { 'management.azure.com' }
        'AzureUSGovernment'  { 'management.usgovcloudapi.net' }
    }

$token = Get-BearerToken -CloudEnvironment $Cloud
Write-host "Obtained authorization token $token." -ForegroundColor Green
$uri = "https://$baseEndpoint/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroup/providers/Microsoft.Edge/disconnectedOperations/$ResourceName/hardwareSettings/default?api-version=$ApiVersion"

$body = @{
        properties = @{
            totalCores               = $TotalCores
            diskSpaceInGb            = $DiskSpaceInGb
            memoryInGb               = $MemoryInGb
            oem                      = $Oem
            hardwareSku              = $HardwareSku
            nodes                    = $Nodes
            versionAtRegistration    = $VersionAtRegistration
            solutionBuilderExtension = $SolutionBuilderExtension
            deviceId                 = $DeviceId
        }
    } | ConvertTo-Json -Depth 5

Write-Host "Creating HardwareSetting for '$ResourceName'..." -ForegroundColor Cyan
    Write-Host "  PUT $uri" -ForegroundColor DarkGray

$response = Invoke-RestMethod -Method Put -Uri $uri -Headers @{
        'Authorization' = $token
        'Content-Type' = 'application/json'
    } -Body $body

Write-Host "HardwareSetting created successfully." -ForegroundColor Green
    $response | ConvertTo-Json -Depth 10
}

Azure 로컬 의 연결이 끊긴 작업을 등록하십시오.

# Modify these to fit your disconnected operations resource. You can find the DeviceId by running the Get-ApplianceInstanceConfiguration on your deployed environment. This should be a guid.
$params = @{
    Cloud                      = 'AzureCloud'
    SubscriptionId             = ''
    ResourceGroup              = ''
    ResourceName               = ''
    TotalCores                 = 320  # Total cores managed by Azure Local disconnected operations
    Nodes                      = 10   # Total number of nodes managed
    DiskSpaceInGb              = 2000 # Management cluster total disk capacity
    MemoryInGb                 = 2000 # Total memory mangement cluster
    Oem                        = ''   # Management cluster OEM - E.g. Dell / Lenovo / HPE etc.
    HardwareSku                = ''   # Management cluster OEM - E.g. AX-760 / MX 655
    VersionAtRegistration      = '2602.2.32510'
    SolutionBuilderExtension   = 'x.y.z'
    DeviceId                   = ''   # Copy your device id from portal
    ApiVersion                 = '2026-03-01-preview'
}

New-AzureLocalDisconnectedOperationsSelfAttestation @params

등록에 성공하면 '하드웨어 설정이 성공적으로 생성되었습니다.' 메시지가 나타납니다. Azure 포털의 배너도 사라지고 연결이 끊긴 Azure 로컬 작업에 대한 하드웨어 속성이 등록된 정보로 채워집니다.

이 기능은 Azure 로컬 2602 이상에서만 사용할 수 있습니다.