Hi, Michel, you're right ; I got this error : virDomainAttachDeviceFlags( ) error operation forbidden: read only access prevents virDomainAttachDeviceFlags Either via "virsh attach-device" or via "virDomainAttachDeviceFlags()" , I encounter an error due to the fact that an authorized user is required. Script-wise the error is the following : 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.) I have now to add a user , following this ovirt people recommendation : 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 override that you need to create yourself a SASL user + password using the saslpasswd2 command Thx for help. Regards, J.P. -----Message d'origine----- De : Michal Privoznik [mailto:mprivozn@xxxxxxxxxx] Envoyé : lundi 7 décembre 2015 13:48 À : Jean-Pierre Ribeauville; libvirt-users@xxxxxxxxxx Objet : Re: libvirt logging of virDomainAttachDeviceFlags() On 07.12.2015 13:14, Jean-Pierre Ribeauville wrote: > Hi, > > When using « virsh attach-device ....." to add a channel device to a Guest , I see following entry in libvirt log : > > 2015-12-07 11:14:47.307+0000: 14551: debug : virDomainAttachDeviceFlags:10433 : dom=0x7f2a58252fc0, ........ > > Great !! > > But , when calling virDomainAttachDeviceFlags( ) from a C program , I got return code -1 but nothing appears related to virDomainAttachDeviceFlags( ) in the libvirt log file . > Others libvirt calls of this C program are correctly logged . > > Did I misunderstand something ? This looks like the client has not even gotten into RPC call. This means that you are passing a wrong argument somewhere. You can: 1) check here what arguments are being checked for: http://libvirt.org/git/?p=libvirt.git;a=blob;f=src/libvirt-domain.c;h=b91388e77e00bf30674f3e25fbdfd38b8626c351;hb=HEAD#l8301 2) Use virGetLastError() to check the actual error. Michal _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users