API Login Fail

Latest response



Since RHEV 3 seems not handling the cpu load for high availability, ie. restart VM if CPU is at 100% for xx min, I wanted to look at the API to see if I could create some python script to get the vm stats and order a restart of the VM.


I did few tries with curl as following :

curl --anyauth -uadmin@isr.co.jp --cacert /home/fred/Documents/WinDocs/ca.cer "https://rhevm.isr.co.jp:8443/api"


and I got


2012-01-05 20:00:30,091 INFO  [org.ovirt.engine.core.bll.IsoDomainListSyncronizer] (pool-21-thread-628) Finished automatic refresh process for ISO file type with success, for storage domain id e7a9198b-3fd1-4b83-9866-b157476a0ca4.
2012-01-05 20:01:15,661 WARN  [org.ovirt.engine.core.bll.LoginAdminUserCommand] (http- CanDoAction of action LoginAdminUser failed. Reasons:USER_CANNOT_LOGIN_DOMAIN_NOT_SUPPORTED
2012-01-05 20:01:15,662 INFO  [org.ovirt.engine.api.restapi.security.auth.LoginValidator] (http- Login failure, user: admin domain: default reason: [USER_CANNOT_LOGIN_DOMAIN_NOT_SUPPORTED]

If you know how to login, please le me know.





I could make it work.


The default user must be admin@internal.

curl -X GET -H "Accept: application/xml" -H "Content-Type: application/xml" --cacert ./ca.cer "https://rhevm.isr.co.jp:8443/api" return the xml page.


Another question would be, how to change that "internal" domain name ?



admin@internal is the default RHEV-M admin user, that is local to the RHEV-M box. For additional users, you need to attach your RHEV-M to a directory server - IPA or AD. The command to do that is rhevm-manage-domains

I see. Thank you for the info.