15.6.7. 显示虚拟机会话信息
提交虚拟机的
GET
请求,并使用 会话
子集合来查看启动 SPICE 控制台会话的用户的会话信息,以及登录到虚拟机的用户。
虚拟机的会话信息列为子集合:
例 15.45. 显示虚拟机的会话信息
GET /ovirt-engine/api/roles/a1a701f1-aa06-4f02-af17-158be31489b3/sessions HTTP/1.1 Accept: application/xml HTTP/1.1 200 OK Content-Type: application/xml <sessions> <session id="37a6259c-c0c1-dae2-99a7-866489dff0bd" href= "/ovirt-engine/api/vms/a1a701f1-aa06-4f02-af17-158be31489b3/sessions/37a6259c-c0c1-dae2-99a7-866489dff0bd"> <vm href= "/ovirt-engine/api/vms/a1a701f1-aa06-4f02-af17-158be31489b3" id="a1a701f1-aa06-4f02-af17-158be31489b3"/> <ip address="192.0.2.0"/> <user href= "/ovirt-engine/api/users/fdfc627c-d875-11e0-90f0-83df133b58cc" id="fdfc627c-d875-11e0-90f0-83df133b58cc"> <domain href= "/ovirt-engine/api/domains/696e7465-726e-616c-696e-7465726e616c" id="696e7465-726e-616c-696e-7465726e616c"> <name>internal</name> </domain> <user_name>admin</user_name> </user> <console_user>true</console_user> </session> <session id="37a6259c-c0c1-dae2-99a7-866489dff0bd" href= "/ovirt-engine/api/vms/a1a701f1-aa06-4f02-af17-158be31489b3/sessions/37a6259c-c0c1-dae2-99a7-866489dff0bd" > <vm href= "/ovirt-engine/api/vms/a1a701f1-aa06-4f02-af17-158be31489b3" id="a1a701f1-aa06-4f02-af17-158be31489b3"/> <user> <user_name>root</user_name> </user> </session> </sessions>