Jean-Pierre Ribeauville
2015-Dec-04 15:18 UTC
[libvirt-users] virsh athentification failure
Hi, I wrote a C program running in a KVM host. Part of it adds a Unix Channel device in all Guests in order to have a dialog from Host to Guest. As long as my host wasn't part of an Ovirt cluster , all was running fine. I added my host in a ovirt cluster , and then , when running the script creating the channel device ( by using "virsh attach-device --persistent -live ....." ) , I got following error : Please enter your authentication name: Please enter your password: error: failed to connect to the hypervisor error: no valid connection error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.) What's the user/password I've to use then ? BTW , I've seen that following channel device was added to the Guest at its creation : /var/lib/libvirt/qemu/channels/ad1a8b0e-f8b6-4038-be3d-275f38e66eb3.org.qemu.guest_agent.0 What's used for ? I presume I cannot use for my private purpose ? I sent this topic to ovirt and libvirt mailing lists , cos I don't know which forum is the right one for this kind of subject. Thanks for help. Regards, J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Puteaux 3 Etage 5 Bureau 4 jpribeauville@axway.com<mailto:jpribeauville@axway.com> http://www.axway.com<http://www.axway.com/> P Pensez à l'environnement avant d'imprimer.
Daniel P. Berrange
2015-Dec-04 15:26 UTC
Re: [libvirt-users] virsh athentification failure
On Fri, Dec 04, 2015 at 03:18:19PM +0000, Jean-Pierre Ribeauville wrote:> Hi, > > I wrote a C program running in a KVM host. > Part of it adds a Unix Channel device in all Guests in order to have a dialog from Host to Guest. > As long as my host wasn't part of an Ovirt cluster , all was running fine. > > > I added my host in a ovirt cluster , and then , when running the script creating the channel device ( by using "virsh attach-device --persistent -live ....." ) , I got following error : > > Please enter your authentication name: > Please enter your password: > error: failed to connect to the hypervisor > error: no valid connection > error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.) > > > What's the user/password I've to use then ?When you attach a compute node to oVirt, it sets up auth with libvirt to prevent admins from connecting to libvirt. If you want to oiverride that you need to create yourself a SASL user + password using the saslpasswd2 command eg see http://libvirt.org/auth.html#ACL_server_username Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Michal Skrivanek
2015-Dec-04 16:09 UTC
Re: [libvirt-users] [ovirt-users] virsh athentification failure
> On 04 Dec 2015, at 16:26, Daniel P. Berrange <berrange@redhat.com> wrote: > > On Fri, Dec 04, 2015 at 03:18:19PM +0000, Jean-Pierre Ribeauville wrote: >> Hi, >> >> I wrote a C program running in a KVM host. >> Part of it adds a Unix Channel device in all Guests in order to have a dialog from Host to Guest.are you adding it later, when the VM is running? Is it a requirement to do it this way? You can use oVirt vdsm hook[1] to inject custom snippet to libvirt’s xml on VM startup and add any channel you want. It would also allow you to pass arbitrary parameters from oVirt UI, should you ever need them. Thanks, michal [1] http://www.ovirt.org/VDSM-Hooks>> As long as my host wasn't part of an Ovirt cluster , all was running fine. >> >> >> I added my host in a ovirt cluster , and then , when running the script creating the channel device ( by using "virsh attach-device --persistent -live ....." ) , I got following error : >> >> Please enter your authentication name: >> Please enter your password: >> error: failed to connect to the hypervisor >> error: no valid connection >> error: authentication failed: Failed to step SASL negotiation: -1 (SASL(-1): generic failure: All-whitespace username.) >> >> >> What's the user/password I've to use then ? > > When you attach a compute node to oVirt, it sets up auth with libvirt > to prevent admins from connecting to libvirt. If you want to oiverride > that you need to create yourself a SASL user + password using the > saslpasswd2 command eg see > > http://libvirt.org/auth.html#ACL_server_username > > Regards, > Daniel > -- > |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| > |: http://libvirt.org -o- http://virt-manager.org :| > |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| > |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| > _______________________________________________ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users > >