[libvirt] Libvirt Auth

Matthias Bolte matthias.bolte at googlemail.com
Wed Mar 3 19:33:33 UTC 2010

2010/3/3 Marco Mornati <mmornati at byte-code.com>:
> I tried to modify the python esx script to provide authentication (without
> asking to user) and it doesn't work!!
> Any other idea?
> Bye
> Marco
> Il giorno 03/mar/2010, alle ore 19.03, Matthias Bolte
> <matthias.bolte at googlemail.com> ha scritto:
>> 2010/3/3 Marco Mornati <mmornati at byte-code.com>:
>>> Hello guys,
>>> I've created a plugin for Hudson (CI) to manage virtmachines using
>>> libvirt
>>> java (start vm for a build and stop just after).
>>> I've just a problem in authentication, in fact I cannot send uname and
>>> password using code, libvirt ask me for the credentials on CLI. someone
>>> could explain me How I can use authentican or where I can find an usage
>>> guide or example?
>>> Thanks a lot
>>> Bye
>>> Marco
>> You have to use virConnectOpenAuth to open a connection and provide an
>> authentication callback.
>> I have no Java example at hand but you can look at the
>> examples/python/esxlist.py Python script for an example how to provide
>> an authentication callback.
>> Also see the ConnectAuth and ConnectAuthDefault classes in the Java
>> bindings.
>> Matthias

Ah, the authentication callback is used for hypervisor level
authentication. You cannot provide credentials for SSH transport level
authentication through the libvirt API. You'll need to setup the SSL
certificates properly to enable automatic SSH login if you don't want
to be prompted for the SSH credentials.


More information about the libvir-list mailing list