차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
sushy-tools_redfish-vbmc_설정하기 [2025/04/23 03:58] koovsushy-tools_redfish-vbmc_설정하기 [2025/04/23 10:11] (현재) – [인증] koov
줄 48: 줄 48:
 ''SUSHY_EMULATOR_AUTH_FILE = '/etc/sushy/sushy-authfile''' ''SUSHY_EMULATOR_AUTH_FILE = '/etc/sushy/sushy-authfile'''
  
-인증정보를 ''htpasswd''형식 파일로 생성한다.+인증정보를 ''htpasswd''형식 파일로 생성한다. 이때 주의해야할 점은 ''htpasswd''는 기본적으로 ''MD5 Hash''를 이용하는데 ''sushy-tools''에서는 반드시 ''bcrypt''함수를 이용해서 암호문자열을 생성해야 한다. 따라서 ''htpasswd'' 사용시 ''-B'' 옵션을 이용해야 한다.
 ''/etc/sushy/sushy-authfile'' ''/etc/sushy/sushy-authfile''
 <WRAP prewrap> <WRAP prewrap>
줄 54: 줄 54:
 # 예: /etc/sushy/sushy_authfile 파일에 'admin' 사용자 추가 # 예: /etc/sushy/sushy_authfile 파일에 'admin' 사용자 추가
 sudo mkdir -p /etc/sushy sudo mkdir -p /etc/sushy
-sudo htpasswd -c /etc/sushy/sushy-authfile admin +sudo htpasswd -B -c /etc/sushy/sushy-authfile admin 
-New password: <비밀번호 입력> +New password: <비밀번호 입력> 
-Re-type new password: <비밀번호 다시 입력>+Re-type new password: <비밀번호 다시 입력>
 </code> </code>
 </WRAP> </WRAP>
줄 82: 줄 82:
 </WRAP> </WRAP>
  
 +<WRAP prewrap>
 +<code bash>
 +curl -u "admin:admin" http://localhost:8000/redfish/v1/Systems
 +
 +[root@kvm33 sushy]# curl -u "admin:admin" http://localhost:8000/redfish/v1/Systems
 +{
 +    "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection",
 +    "Name": "Computer System Collection",
 +    "Members@odata.count": 3,
 +    "Members": [
 +
 +            {
 +                "@odata.id": "/redfish/v1/Systems/96cc2716-4670-4b0b-ae66-5a68febc9525"
 +            },
 +
 +            {
 +                "@odata.id": "/redfish/v1/Systems/02a6ecfe-cf95-4138-9467-545e9f380a45"
 +            },
 +
 +            {
 +                "@odata.id": "/redfish/v1/Systems/92241405-6e50-4c44-af0b-864e52bd6d45"
 +            }
 +
 +    ],
 +    "@odata.context": "/redfish/v1/$metadata#ComputerSystemCollection.ComputerSystemCollection",
 +    "@odata.id": "/redfish/v1/Systems",
 +    "@Redfish.Copyright": "Copyright 2014-2016 Distributed Management Task Force, Inc. (DMTF). For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
 +</code>
 +</WRAP>
 +
 +==== 서버 정보 조회 ====
 +<WRAP prewrap>
 +<code bash>
 +curl -k -u "{username}:{password}" http://localhost:8000/redfish/v1/Systems/{vm_uuid} | jq .
 +# ex)
 +curl -k -u "admin:admin" http://localhost:8000/redfish/v1/Systems/ee5cb7b7-84d0-4e62-9a42-5a8b9282d8fa
 +</code>
 +</WRAP>
 +
 +==== 전원 상태 확인 ====
 +<WRAP prewrap>
 +<code bash>
 +curl -k -u "{username}:{password}" http://localhost:8000/redfish/v1/Systems/{vm_uuid} | jq '.PowerState'
 +</code>
 +</WRAP>
 +
 +==== 전원 켜기 ====
 +<WRAP prewrap>
 +<code bash>
 +curl -k -u "{username}:{password}" \
 +     -X POST \
 +     -H "Content-Type: application/json" \
 +     -d '{"ResetType": "On"}' \
 +     http://localhost:8000/redfish/v1/Systems/{vm_uuid}/Actions/ComputerSystem.Reset
 +
 +# ex)
 +curl -k -u "admin:admin" \
 +     -X POST \
 +     -H "Content-Type: application/json" \
 +     -d '{"ResetType": "On"}' \
 +     http://localhost:8000/redfish/v1/Systems/ee5cb7b7-84d0-4e62-9a42-5a8b9282d8fa/Actions/ComputerSystem.Reset
 +</code>
 +</WRAP>
 +     
 +==== 전원 끄기 ====
 +  * 강제 종료
 +<WRAP prewrap>
 +<code bash>
 +curl -k -u "{username}:{password}" \
 +     -X POST \
 +     -H "Content-Type: application/json" \
 +     -d '{"ResetType": "ForceOff"}' \
 +     http://localhost:8000/redfish/v1/Systems/{vm_uuid}/Actions/ComputerSystem.Reset
 +</code>
 +</WRAP>
 +
 +  * 정상 종료
 +<WRAP prewrap>
 +<code bash>
 +curl -k -u "{username}:{password}" \
 +     -X POST \
 +     -H "Content-Type: application/json" \
 +     -d '{"ResetType": "GracefulShutdown"}' \
 +     http://localhost:8000/redfish/v1/Systems/{vm_uuid}/Actions/ComputerSystem.Reset
 +</code>
 +</WRAP>
  
 ===== 참조링크 ===== ===== 참조링크 =====
   * https://docs.openstack.org/sushy-tools/latest/   * https://docs.openstack.org/sushy-tools/latest/
-  * +
  
  • sushy-tools_redfish-vbmc_설정하기.1745380685.txt.gz
  • 마지막으로 수정됨: 2025/04/23 03:58
  • 저자 koov