소개
이 문서에서는 UCS Manager 또는 Cisco Integrated Management Controller의 디바이스 커넥터를 공장 기본값으로 재설정하는 방법에 대해 설명합니다.
사전 요구 사항
요구 사항
다음 주제에 대한 지식을 보유하고 있으면 유용합니다.
- UCS(Unified Computing Systems Servers)에 대한 기본 이해
 
- UCS Manager(UCSM)에 대한 기본 이해
 
- Cisco CIMC(Integrated Management Controller)에 대한 기본 이해
 
- Intersight에 대한 기본 이해
 
- Powershell에 대한 기본적인 이해
 
사용되는 구성 요소
이 문서는 특정 소프트웨어 버전에 제한되지 않습니다.
이 문서의 정보는 특정 랩 환경의 디바이스를 토대로 작성되었습니다. 이 문서에 사용된 모든 디바이스는 초기화된(기본) 컨피그레이션으로 시작되었습니다. 현재 네트워크가 작동 중인 경우 모든 명령의 잠재적인 영향을 미리 숙지하시기 바랍니다.
배경 정보
이 컨피그레이션을 시도하기 전에 이러한 요구 사항이 있는지 확인하십시오.
- Intersight 관리자 계정
 
- Intersight 및 UCSM 또는 CIMC에 연결
 
- Powershell이 있는 컴퓨터
 
구성
참고: 이 절차를 진행하기 전에 Powershell을 이미 설치해야 합니다.
 
독립형 서버에서 디바이스 커넥터 재설정
1단계. CIMC 라이브러리 설치
컴퓨터에서 Powershell을 시작하고 다음 명령을 실행합니다.
PS /Users/admin>  Install-Module -Name Cisco.IMC
2단계. IP 및 자격 증명 설정
참고: 관리자 계정과 비밀번호를 설정해야 합니다. 관리자 권한이 있는 사용자를 사용할 수도 있습니다.
 
PS /Users/admin> $ip = “x.x.x.x"
PS /Users/admin> $credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "admin",$(ConvertTo-SecureString -Force -AsPlainText "PASSWORD")
PS /Users/admin> $cookie = Connect-Imc $ip -Credential $credentials | Select Cookie
PS /Users/admin> $headers = @{                                                     
>>  'ucsmcookie'="ucsm-cookie="+$cookie.cookie
>>  }
3단계. 클라우드 DNS 확인 및 ID 준비
PS /Users/admin> Invoke-WebRequest https://$ip/connector/DeviceConnections -Headers $headers -SkipCertificateCheck | Select content -Expand Content | ConvertFrom-Json | Select CloudDns                                     
다음과 같은 출력이 표시됩니다.
CloudDns
--------
svc.intersight.com
본문 변수에 클라우드 DNS 출력을 사용합니다.
PS /Users/admin> $body = @{                                                        
>>     "CloudDns" ="svc.intersight.com"
>>     "ForceResetIdentity" = $true
>>     "ResetIdentity" = $true
>> }
4단계. 장치 커넥터 재설정
PS /Users/admin> Invoke-WebRequest -Method 'Put' -Uri https://$ip/connector/DeviceConnections  -Body ($body|ConvertTo-Json) -Headers $headers -ContentType "application/json" -SkipCertificateCheck
다음과 같은 출력이 표시됩니다.
StatusCode        : 200
StatusDescription : OK
Content           : [
                      {}
                    ]
RawContent        : HTTP/1.1 200 OK
                    Server: webserver
                    Date: Wed, 27 Sep 2023 00:54:16 GMT
                    Transfer-Encoding: chunked
                    Connection: keep-alive
                    X-Frame-Options: SAMEORIGIN
                    Cache-Control: no-store, no-cache, max-age=0
                    Prevent…
Headers           : {[Server, System.String[]], [Date, System.String[]], [Transfer-Encoding, System.String[]], [Connection, System.String[]]…}
Images            : {}
InputFields       : {}
Links             : {}
RawContentLength  : 8
RelationLink      : {}
5단계. CIMC에서 연결 끊기
Disconnect-Imc 
UCS Manager에서 디바이스 커넥터 재설정
1단계. UCSM 라이브러리 설치
컴퓨터에서 Powershell을 시작하고 다음 명령을 실행합니다.
PS /Users/admin>  Install-Module -Name Cisco.UCSManager
2단계. IP 및 자격 증명 설정
참고: 관리자 계정과 비밀번호를 설정해야 합니다. 관리자 권한이 있는 사용자를 사용할 수도 있습니다.
 
PS /Users/admin> $ip = “x.x.x.x"
PS /Users/admin> $credentials = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList "admin",$(ConvertTo-SecureString -Force -AsPlainText "PASSWORD")
PS /Users/admin> $cookie = Connect-Ucs $ip -Credential $credentials | Select Cookie
PS /Users/admin> $headers = @{                                                     
>>  'ucsmcookie'="ucsm-cookie="+$cookie.cookie
>>  }
3단계. 클라우드 DNS 확인 및 ID 준비
PS /Users/admin> Invoke-WebRequest https://$ip/connector/DeviceConnections -Headers $headers -SkipCertificateCheck | Select content -Expand Content | ConvertFrom-Json | Select CloudDns                                     
다음과 같은 출력이 표시됩니다.
CloudDns
--------
svc.ucs-connect.com
본문 변수에 클라우드 DNS 출력을 사용합니다.
PS /Users/admin> $body = @{                                                        
>>     "CloudDns" =“svc.ucs-connect.com"
>>     "ForceResetIdentity" = $true
>>     "ResetIdentity" = $true
>> }
4단계. 장치 커넥터 재설정
PS /Users/admin> Invoke-WebRequest -Method 'Put' -Uri https://$ip/connector/DeviceConnections  -Body ($body|ConvertTo-Json) -Headers $headers -ContentType "application/json" -SkipCertificateCheck
다음과 같은 출력이 표시됩니다.
StatusCode        : 200
StatusDescription : OK
Content           : [
                      {
                        "CloudDns": "svc.ucs-connect.com",
                        "CloudDnsList": [
                          "svc-static1.intersight.com",
                          "svc.ucs-connect.com",
                          "svc-static1.ucs-connect.com",
                          "svc.intersight.com"
                        …
RawContent        : HTTP/1.1 200 OK
                    Date: Wed, 27 Sep 2023 00:33:09 GMT
                    Server: Apache
                    Strict-Transport-Security: max-age=31536000; includeSubDomains
                    Cache-Control: no-store, must-revalidate, no-cache
                    Pragma: no-cache
                    X-…
Headers           : {[Date, System.String[]], [Server, System.String[]], [Strict-Transport-Security, System.String[]], [Cache-Control, System.String[]]…}
Images            : {}
InputFields       : {}
Links             : {}
RawContentLength  : 20468
RelationLink      : {}
5단계. UCSM에서 연결 끊기
Disconnect-Ucs
관련 정보