3.5. 예: 호스트 컬렉션 나열
이 예에서는 Red Hat Virtualization Host를 사용합니다. Red Hat Virtualization Manager는 구성된 Red Hat Virtualization 호스트를 자동으로 등록합니다. 이 예에서는 hosts 컬렉션을 검색하고 가상화 환경에 등록된
하이퍼바이저
라는 Red Hat Virtualization Host를 보여줍니다.
예 3.5. 호스트 컬렉션 나열
request:
GET /ovirt-engine/api/hosts HTTP/1.1 Accept: application/xml
curl 명령:
# curl -X GET -H "Accept: application/xml" -u [USER:PASS] \ --cacert [CERT] \ https://[RHEVM Host]:443/ovirt-engine/api/hosts
결과:
HTTP/1.1 200 OK Accept: application/xml <hosts> <host id="0656f432-923a-11e0-ad20-5254004ac988" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988"> <name>hypervisor</name> <actions> <link rel="install" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/install"/> <link rel="activate" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/activate"/> <link rel="fence" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/fence"/> <link rel="deactivate" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/deactivate"/> <link rel="approve" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/approve"/> <link rel="iscsilogin" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/iscsilogin"/> <link rel="iscsidiscover" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/iscsidiscover"/> <link rel="commitnetconfig" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/ commitnetconfig"/> </actions> <link rel="storage" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/storage"/> <link rel="nics" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/nics"/> <link rel="tags" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/tags"/> <link rel="permissions" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/permissions"/> <link rel="statistics" href="/ovirt-engine/api/hosts/0656f432-923a-11e0-ad20-5254004ac988/statistics"/> <address>10.64.14.110</address> <status> <state>non_operational</state> </status> <cluster id="99408929-82cf-4dc7-a532-9d998063fa95" href="/ovirt-engine/api/clusters/99408929-82cf-4dc7-a532-9d998063fa95"/> <port>54321</port> <storage_manager>true</storage_manager> <power_management> <enabled>false</enabled> <options/> </power_management> <ksm> <enabled>false</enabled> </ksm> <transparent_hugepages> <enabled>true</enabled> </transparent_hugepages> <iscsi> <initiator>iqn.1994-05.com.example:644949fe81ce</initiator> </iscsi> <cpu> <topology cores="2"/> <name>Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz</name> <speed>2993</speed> </cpu> <summary> <active>0</active> <migrating>0</migrating> <total>0</total> </summary> </host> </hosts>
기본
호스트의 id
코드를 기록해 둡니다. 이 코드는 가상 환경의 다른 리소스와 관련하여 이 호스트를 식별합니다.
이 호스트는
Default
클러스터의 멤버이며 nics
하위 수집에 액세스하면 이 호스트가 ovirtmgmt
네트워크에 연결되어 있음을 보여줍니다.