az networkcloud baremetalmachine run-data-extract
명령을 사용하여 운영 체제 미설치 컴퓨터 문제 해결
사용자가 온-프레미스 운영 체제 미설치 컴퓨터의 문제를 조사하고 해결해야 하는 경우가 있을 수 있습니다. Azure Operator Nexus는 az networkcloud baremetalmachine run-data-extract
를 통해 정해진 데이터 추출 명령 집합을 제공합니다. 이러한 명령을 사용하면 사용자가 운영 체제 미설치 컴퓨터에서 진단 데이터를 얻을 수 있습니다.
이 명령은 클러스터 관리자의 Azure Storage 계정에 있는 데이터 추출 결과를 포함하는 출력 파일을 생성합니다.
필수 조건
- 이 문서에서는 Azure 명령줄 인터페이스 및
networkcloud
명령줄 인터페이스 확장을 설치했다고 가정합니다. 자세한 내용은 CLI 확장을 설치하는 방법을 참조하세요. - 대상 운영 체제 미설치 컴퓨터가 켜져 있고 readyState가 True로 설정되어 있습니다.
- 이러한 명령에 대한 구문은
az networkcloud
CLI의 0.3.0 이상 버전을 기반으로 합니다. - 클러스터 리소스에 대해 만든 클러스터 관리되는 리소스 그룹 이름(cluster_MRG)을 가져옵니다.
스토리지 계정 액세스 확인
클러스터 관리자의 스토리지 계정에 대한 액세스 권한이 있는지 확인합니다.
- Azure Portal에서 클러스터 관리자의 스토리지 계정으로 이동합니다.
- 저장소 계정 세부정보의 왼쪽 탐색 메뉴에서 스토리지 브라우저를 선택합니다.
- 스토리지 브라우저 세부정보에서 BLOB 컨테이너를 선택합니다.
- 스토리지 계정에 액세스하는 동안
403 This request is not authorized to perform this operation.
이(가) 발생하는 경우 공용 IP 주소를 포함하도록 스토리지 계정의 방화벽 설정을 업데이트해야 합니다. - 클러스터 관리자 리소스에서 포털을 통해 지원 티켓을 만들어 액세스를 요청합니다. 액세스가 필요한 공용 IP 주소를 제공합니다.
run 명령 실행
run data extract 명령은 하나 이상의 미리 정의된 스크립트를 실행하여 운영 체제 미설치 컴퓨터에서 데이터를 추출합니다.
Warning
Microsoft는 일반 텍스트 사용자 이름 및/또는 암호가 제공되어야 하는 Operator Nexus API 호출을 제공하거나 지원하지 않습니다. 전송된 모든 값은 기록되며 노출된 비밀로 간주되며, 회전 및 해지되어야 합니다. 비밀을 안전하게 사용하기 위해 Microsoft에서 문서화한 방법은 Azure Key Vault에 저장하는 것입니다. 특정 질문이나 우려 사항이 있는 경우 Azure Portal을 통해 요청을 제출하세요.
지원되는 명령의 현재 목록은 다음과 같습니다.
Dell 문제 해결을 위한 SupportAssist/TSR 컬렉션
명령 이름:hardware-support-data-collection
인수: 요청된 로그 유형SysInfo
- 시스템 정보TTYLog
- Storage TTYLog 데이터Debug
- 디버그 로그
MDE(엔드포인트용 Microsoft Defender) 에이전트 정보 수집
명령 이름:mde-agent-information
인수: 없음MDE 진단 지원 로그 수집
명령 이름:mde-support-diagnostics
인수: 없음Dell 하드웨어 롤업 상태 수집
명령 이름:hardware-rollup-status
인수: 없음클러스터 CVE 보고서 생성
명령 이름:cluster-cve-report
인수: 없음
명령 구문은 다음과 같습니다.
az networkcloud baremetalmachine run-data-extract --name "<machine-name>" \
--resource-group "<cluster_MRG>" \
--subscription "<subscription>" \
--commands '[{"arguments":["<arg1>","<arg2>"],"command":"<command1>"}]' \
--limit-time-seconds "<timeout>"
--commands
옵션에서 json 형식을 사용하여 여러 명령을 지정합니다. 각 command
는 명령과 인수를 지정합니다. 여러 인수가 있는 명령의 경우 arguments
매개 변수에 목록으로 제공합니다. --commands
구조체를 구성하는 방법에 대한 지침은 Azure CLI 약어를 참조하세요.
이러한 명령은 오래 실행될 수 있으므로 --limit-time-seconds
를 최소 600초(10분)로 설정하는 것이 좋습니다. Debug
옵션 또는 여러 추출 실행에는 10분 이상 걸릴 수 있습니다.
응답으로 작업은 비동기적으로 수행되고 HTTP 상태 코드 202를 반환합니다. 명령 완료를 추적하고 출력 파일을 보는 방법에 대한 자세한 내용은 출력 보기 섹션을 참조하세요.
하드웨어 지원 데이터 수집
이 예제에서는 hardware-support-data-collection
명령을 실행하고 Dell Server에서 SysInfo
TTYLog
로그를 가져옵니다. 스크립트는 지정된 운영 체제 미설치 머신에서 racadm supportassist collect
명령을 실행합니다. 결과 tar.gz 파일에는 hardware-support-data-<timestamp>.zip
의 압축된 추출 명령 파일 출력이 포함되어 있습니다.
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "cluster_MRG" \
--subscription "subscription" \
--commands '[{"arguments":["SysInfo", "TTYLog"],"command":"hardware-support-data-collection"}]' \
--limit-time-seconds 600
hardware-support-data-collection
출력
====Action Command Output====
Executing hardware-support-data-collection command
Getting following hardware support logs: SysInfo,TTYLog
Job JID_814372800396 is running, waiting for it to complete ...
Job JID_814372800396 Completed.
---------------------------- JOB -------------------------
[Job ID=JID_814372800396]
Job Name=SupportAssist Collection
Status=Completed
Scheduled Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Actual Start Time=[Thu, 13 Apr 2023 20:54:40]
Actual Completion Time=[Thu, 13 Apr 2023 20:59:51]
Message=[SRV088: The SupportAssist Collection Operation is completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
Deleting Job JID_814372800396
Collection successfully exported to /hostfs/tmp/runcommand/hardware-support-data-2023-04-13T21:00:01.zip
================================
Script execution result can be found in storage account:
https://cm2p9bctvhxnst.blob.core.windows.net/bmm-run-command-output/dd84df50-7b02-4d10-a2be-46782cbf4eef-action-bmmdataextcmd.tar.gz?se=2023-04-14T01%3A00%3A15Zandsig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%2BM6rmxDFqXE%3Dandsp=randspr=httpsandsr=bandst=2023-04-13T21%3A00%3A15Zandsv=2019-12-12
수집된 하드웨어 지원 파일 목록 예
Archive: TSR20240227164024_FM56PK3.pl.zip
creating: tsr/hardware/
creating: tsr/hardware/spd/
creating: tsr/hardware/sysinfo/
creating: tsr/hardware/sysinfo/inventory/
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_BIOSAttribute.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Sensor.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_View.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_SoftwareIdentity.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Capabilities.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_StatisticalData.xml
creating: tsr/hardware/sysinfo/lcfiles/
inflating: tsr/hardware/sysinfo/lcfiles/lclog_0.xml.gz
inflating: tsr/hardware/sysinfo/lcfiles/curr_lclog.xml
creating: tsr/hardware/psu/
creating: tsr/hardware/idracstateinfo/
inflating: tsr/hardware/idracstateinfo/avc.log
extracting: tsr/hardware/idracstateinfo/avc.log.persistent.1
[..snip..]
MDE 에이전트 정보 수집
데이터는 mde-agent-information
명령을 사용하여 수집되고 /hostfs/tmp/runcommand/mde-agent-information.json
으로 JSON 형식이 지정됩니다. JSON 파일은 스토리지 계정에 있는 데이터 추출 zip 파일에서 찾을 수 있습니다. 스크립트는 지정된 운영 체제 미설치 머신에서 일련의 mdatp
명령을 실행합니다.
이 예제에서는 인수 없이 mde-agent-information
명령을 실행합니다.
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "cluster_MRG" \
--subscription "subscription" \
--commands '[{"command":"mde-agent-information"}]' \
--limit-time-seconds 600
mde-agent-information
출력
====Action Command Output====
Executing mde-agent-information command
MDE agent is running, proceeding with data extract
Getting MDE agent information for bareMetalMachine
Writing to /hostfs/tmp/runcommand
================================
Script execution result can be found in storage account:
https://cmzhnh6bdsfsdwpbst.blob.core.windows.net/bmm-run-command-output/f5962f18-2228-450b-8cf7-cb8344fdss63b0-action-bmmdataextcmd.tar.gz?se=2023-07-26T19%3A07%3A22Z&sig=X9K3VoNWRFP78OKqFjvYoxubp65BbNTq%2BGnlHclI9Og%3D&sp=r&spr=https&sr=b&st=2023-07-26T15%3A07%3A22Z&sv=2019-12-12
수집된 JSON 개체 예
{
"diagnosticInformation": {
"realTimeProtectionStats": $real_time_protection_stats,
"eventProviderStats": $event_provider_stats
},
"mdeDefinitions": $mde_definitions,
"generalHealth": $general_health,
"mdeConfiguration": $mde_config,
"scanList": $scan_list,
"threatInformation": {
"list": $threat_info_list,
"quarantineList": $threat_info_quarantine_list
}
}
MDE 지원 진단 수집
mde-support-diagnostics
명령에서 수집된 데이터는 MDE 클라이언트 분석기 도구를 사용하여 mdatp
명령 및 관련 로그 파일의 정보를 묶습니다. 스토리지 계정 tgz
파일에는 mde-support-diagnostics-<hostname>.zip
이라는 zip
파일이 포함됩니다. 필요한 경우 지원 팀이 문제 해결 및 근본 원인 분석을 위해 로그를 사용할 수 있도록 지원 요청과 함께 zip
을 전송해야 합니다.
이 예제에서는 인수 없이 mde-support-diagnostics
명령을 실행합니다.
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "cluster_MRG" \
--subscription "subscription" \
--commands '[{"command":"mde-support-diagnostics"}]' \
--limit-time-seconds 600
mde-support-diagnostics
출력
====Action Command Output====
Executing mde-support-diagnostics command
[2024-01-23 16:07:37.588][INFO] XMDEClientAnalyzer Version: 1.3.2
[2024-01-23 16:07:38.367][INFO] Top Command output: [/tmp/top_output_2024_01_23_16_07_37mel0nue0.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Summary: [/tmp/top_summary_2024_01_23_16_07_370zh7dkqn.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Outliers: [/tmp/top_outlier_2024_01_23_16_07_37aypcfidh.txt]
[2024-01-23 16:07:38.368][INFO] [MDE Diagnostic]
[2024-01-23 16:07:38.368][INFO] Collecting MDE Diagnostic
[2024-01-23 16:07:38.613][WARNING] mde is not running
[2024-01-23 16:07:41.343][INFO] [SLEEP] [3sec] waiting for agent to create diagnostic package
[2024-01-23 16:07:44.347][INFO] diagnostic package path: /var/opt/microsoft/mdatp/wdavdiag/5b1edef9-3b2a-45c1-a45d-9e7e4b6b869e.zip
[2024-01-23 16:07:44.347][INFO] Successfully created MDE diagnostic zip
[2024-01-23 16:07:44.348][INFO] Adding mde_diagnostic.zip to report directory
[2024-01-23 16:07:44.348][INFO] Collecting MDE Health
[...snip...]
================================
Script execution result can be found in storage account:
https://cmmj627vvrzkst.blob.core.windows.net/bmm-run-command-output/7c5557b9-b6b6-a4a4-97ea-752c38918ded-action-bmmdataextcmd.tar.gz?se=2024-01-23T20%3A11%3A32Z&sig=9h20XlZO87J7fCr0S1234xcyu%2Fl%2BVuaDh1BE0J6Yfl8%3D&sp=r&spr=https&sr=b&st=2024-01-23T16%3A11%3A32Z&sv=2019-12-12
실행 결과 파일을 다운로드한 후 지원 파일의 압축을 풀어 분석할 수 있습니다.
MDE 클라이언트 분석기가 수집한 정보 목록 예
Archive: mde-support-diagnostics-rack1compute02.zip
inflating: mde_diagnostic.zip
inflating: process_information.txt
inflating: auditd_info.txt
inflating: auditd_log_analysis.txt
inflating: auditd_logs.zip
inflating: ebpf_kernel_config.txt
inflating: ebpf_enabled_func.txt
inflating: ebpf_syscalls.zip
inflating: ebpf_raw_syscalls.zip
inflating: messagess.zip
inflating: conflicting_processes_information.txt
[...snip...]
하드웨어 롤업 상태
데이터는 hardware-rollup-status
명령을 사용하여 수집되고 /hostfs/tmp/runcommand/rollupStatus.json
으로 JSON 형식이 지정됩니다. JSON 파일은 스토리지 계정에 있는 데이터 추출 zip 파일에서 찾을 수 있습니다. 수집된 데이터는 컴퓨터 하위 시스템의 상태를 보여 줍니다.
이 예제에서는 인수 없이 hardware-rollup-status
명령을 실행합니다.
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "clusete_MRG" \
--subscription "subscription" \
--commands '[{"command":"hardware-rollup-status"}]' \
--limit-time-seconds 600
hardware-rollup-status
출력
====Action Command Output====
Executing hardware-rollup-status command
Getting rollup status logs for b37dev03a1c002
Writing to /hostfs/tmp/runcommand
================================
Script execution result can be found in storage account:
https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea38-4394-9db1-21a0d392eff0-action-bmmdataextcmd.tar.gz?se=2023-09-19T18%3A47%3A17Z&sig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%3D&sp=r&spr=https&sr=b&st=2023-09-19T14%3A47%3A17Z&sv=2019-12-12
수집된 JSON 예
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatusCollection.DellRollupStatusCollection",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus",
"@odata.type" : "#DellRollupStatusCollection.DellRollupStatusCollection",
"Description" : "A collection of DellRollupStatus resource",
"Members" :
[
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
"CollectionName" : "CurrentRollupStatus",
"Description" : "Represents the subcomponent roll-up statuses.",
"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Current",
"Name" : "DellRollupStatus",
"RollupStatus" : "Ok",
"SubSystem" : "Current"
},
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
"CollectionName" : "VoltageRollupStatus",
"Description" : "Represents the subcomponent roll-up statuses.",
"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Voltage",
"Name" : "DellRollupStatus",
"RollupStatus" : "Ok",
"SubSystem" : "Voltage"
},
[..snip..]
클러스터 CVE 보고서 생성
취약성 데이터는 cluster-cve-report
명령을 사용하여 수집되고 {year}-{month}-{day}-nexus-cluster-vulnerability-report.json
에 JSON 형식으로 지정됩니다. JSON 파일은 스토리지 계정에 있는 데이터 추출 zip 파일에서 찾을 수 있습니다. 수집된 데이터에는 클러스터의 컨테이너 이미지당 취약성 데이터가 포함됩니다.
이 예제에서는 인수 없이 cluster-cve-report
명령을 실행합니다.
참고 항목
대상 컴퓨터는 컨트롤 플레인 노드여야 하며 그렇지 않으면 작업이 실행되지 않습니다.
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "cluster_MRG" \
--subscription "subscription" \
--commands '[{"command":"cluster-cve-report"}]' \
--limit-time-seconds 600
cluster-cve-report
출력
====Action Command Output====
Nexus cluster vulnerability report saved.
================================
Script execution result can be found in storage account:
https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea38-4394-9db1-21a0d392eff0-action-bmmdataextcmd.tar.gz?se=2023-09-19T18%3A47%3A17Z&sig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%3D&sp=r&spr=https&sr=b&st=2023-09-19T14%3A47%3A17Z&sv=2019-12-12
CVE 보고서 스키마
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Vulnerability Report",
"type": "object",
"properties": {
"metadata": {
"type": "object",
"properties": {
"dateRetrieved": {
"type": "string",
"format": "date-time",
"description": "The date and time when the data was retrieved."
},
"platform": {
"type": "string",
"description": "The name of the platform."
},
"resource": {
"type": "string",
"description": "The name of the resource."
},
"runtimeVersion": {
"type": "string",
"description": "The version of the runtime."
},
"managementVersion": {
"type": "string",
"description": "The version of the management software."
},
"vulnerabilitySummary": {
"type": "object",
"properties": {
"criticalCount": {
"type": "integer",
"description": "Number of critical vulnerabilities."
},
"highCount": {
"type": "integer",
"description": "Number of high severity vulnerabilities."
},
"mediumCount": {
"type": "integer",
"description": "Number of medium severity vulnerabilities."
},
"lowCount": {
"type": "integer",
"description": "Number of low severity vulnerabilities."
},
"noneCount": {
"type": "integer",
"description": "Number of vulnerabilities with no severity."
},
"unknownCount": {
"type": "integer",
"description": "Number of vulnerabilities with unknown severity."
}
},
"required": ["criticalCount", "highCount", "mediumCount", "lowCount", "noneCount", "unknownCount"]
}
},
"required": ["dateRetrieved", "platform", "resource", "runtimeVersion", "managementVersion", "vulnerabilitySummary"]
},
"containers": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "object",
"properties": {
"namespace": {
"type": "string",
"description": "The namespace of the container."
},
"digest": {
"type": "string",
"description": "The digest of the container image."
},
"os": {
"type": "object",
"properties": {
"family": {
"type": "string",
"description": "The family of the operating system."
}
},
"required": ["family"]
},
"summary": {
"type": "object",
"properties": {
"criticalCount": {
"type": "integer",
"description": "Number of critical vulnerabilities in this container."
},
"highCount": {
"type": "integer",
"description": "Number of high severity vulnerabilities in this container."
},
"lowCount": {
"type": "integer",
"description": "Number of low severity vulnerabilities in this container."
},
"mediumCount": {
"type": "integer",
"description": "Number of medium severity vulnerabilities in this container."
},
"noneCount": {
"type": "integer",
"description": "Number of vulnerabilities with no severity in this container."
},
"unknownCount": {
"type": "integer",
"description": "Number of vulnerabilities with unknown severity in this container."
}
},
"required": ["criticalCount", "highCount", "lowCount", "mediumCount", "noneCount", "unknownCount"]
},
"vulnerabilities": {
"type": "array",
"items": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "Title of the vulnerability."
},
"vulnerabilityID": {
"type": "string",
"description": "Identifier of the vulnerability."
},
"fixedVersion": {
"type": "string",
"description": "The version in which the vulnerability is fixed."
},
"installedVersion": {
"type": "string",
"description": "The currently installed version."
},
"referenceLink": {
"type": "string",
"format": "uri",
"description": "Link to the vulnerability details."
},
"publishedDate": {
"type": "string",
"format": "date-time",
"description": "The date when the vulnerability was published."
},
"score": {
"type": "number",
"description": "The CVSS score of the vulnerability."
},
"severity": {
"type": "string",
"description": "The severity level of the vulnerability."
},
"resource": {
"type": "string",
"description": "The resource affected by the vulnerability."
},
"target": {
"type": "string",
"description": "The target of the vulnerability."
},
"packageType": {
"type": "string",
"description": "The type of the package."
},
"exploitAvailable": {
"type": "boolean",
"description": "Indicates if an exploit is available for the vulnerability."
}
},
"required": ["title", "vulnerabilityID", "fixedVersion", "installedVersion", "referenceLink", "publishedDate", "score", "severity", "resource", "target", "packageType", "exploitAvailable"]
}
}
},
"required": ["namespace", "digest", "os", "summary", "vulnerabilities"]
}
}
}
},
"required": ["metadata", "containers"]
}
CVE 데이터 세부 정보
CVE 데이터는 Kubernetes 리소스 인스턴스화를 기반으로 24시간마다 또는 이미지를 참조하는 Kubernetes 리소스에 변경 사항이 있을 때마다(둘 중 먼저 발생하는 경우 적용) 컨테이너 이미지별로 새로 고쳐집니다.
출력 보기
명령 실행에서 제공된 tar.gz 압축 파일에 대한 링크를 확인합니다. tar.gz 파일 이름은 클러스터 관리자 리소스 그룹의 Storage 계정의 파일을 식별합니다. 링크를 사용하여 출력 zip 파일에 직접 액세스할 수도 있습니다. tar.gz 파일에는 압축된 추출 명령 파일 출력도 포함되어 있습니다. 선택적 인수 --output-directory
에 디렉터리 경로를 지정하여 스토리지 BLOB에서 로컬 디렉터리로 출력 파일을 다운로드합니다.
참고: 네트워킹 또는 방화벽 제한으로 인해 스토리지 계정이 잠기고 403 This request is not authorized to perform this operation.
이(가) 발생할 수 있습니다. 액세스를 확인/요청하는 절차는 스토리지 계정 액세스 확인을 참조하세요.