Hi, I found an answer : Use virConnectOpenAuth() instead of virConnectOpenReadOnly(). As my piece of code is running silently (without user connected) , by using virConnectOpenAuth() , is it possible to avoid to prompt user to get user /password ? Thx. J.P. -----Message d'origine----- De : libvirt-users-bounces@xxxxxxxxxx [mailto:libvirt-users-bounces@xxxxxxxxxx] De la part de libvirt-users-request@xxxxxxxxxx Envoyé : vendredi 8 janvier 2016 12:51 À : libvirt-users@xxxxxxxxxx Objet : libvirt-users Digest, Vol 73, Issue 6 Send libvirt-users mailing list submissions to libvirt-users@xxxxxxxxxx To subscribe or unsubscribe via the World Wide Web, visit https://www.redhat.com/mailman/listinfo/libvirt-users or, via email, send a message with subject or body 'help' to libvirt-users-request@xxxxxxxxxx You can reach the person managing the list at libvirt-users-owner@xxxxxxxxxx When replying, please edit your Subject line so it is more specific than "Re: Contents of libvirt-users digest..." Today's Topics: 1. Unable to retrieve Guest IP Addresses via libvirt API (Jean-Pierre Ribeauville) 2. Re: Unable to retrieve Guest IP Addresses via libvirt API (Martin Kletzander) 3. Re: Unable to retrieve Guest IP Addresses via libvirt API (Jean-Pierre Ribeauville) 4. Re: libvirtd and polkit: internal error: No Unix Process ID (Daniel P. Berrange) 5. operation forbidden Read Only Access (Jean-Pierre Ribeauville) ---------------------------------------------------------------------- Message: 1 Date: Thu, 7 Jan 2016 19:31:57 +0000 From: Jean-Pierre Ribeauville <jpribeauville@xxxxxxxxx> To: "libvirt-users@xxxxxxxxxx" <libvirt-users@xxxxxxxxxx> Subject: Unable to retrieve Guest IP Addresses via libvirt API Message-ID: <1051EFB4D3A1704680C38CCAAC5836D292F01EF8@xxxxxxxxxxxxxxxxxxxxxxx> Content-Type: text/plain; charset="iso-8859-1" Hi , Despite the fact that my Guest has an IP address , by running this piece of code on a KVM host : ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE, NULL); ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT, NULL); I'm not able to get a ifaces_count different from -1 Additionnaly : - IP Addresses are not present within the xmldesc of this Guest.(not sure that they should appear there) I'm running libvirt-1.2.17-13.el7.x86_64 Did I misunderstood something ? As ovirt manager shows the address correctly , it should be possible to get it via libvirt ... Thanks for help. J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Puteaux 3 Etage 5 Bureau 4 jpribeauville@xxxxxxxxx<mailto:jpribeauville@xxxxxxxxx> http://www.axway.com<http://www.axway.com/> P Pensez ? l'environnement avant d'imprimer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.redhat.com/archives/libvirt-users/attachments/20160107/0a13702c/attachment.html> ------------------------------ Message: 2 Date: Fri, 8 Jan 2016 10:36:05 +0100 From: Martin Kletzander <mkletzan@xxxxxxxxxx> To: Jean-Pierre Ribeauville <jpribeauville@xxxxxxxxx> Cc: "libvirt-users@xxxxxxxxxx" <libvirt-users@xxxxxxxxxx> Subject: Re: Unable to retrieve Guest IP Addresses via libvirt API Message-ID: <20160108093605.GL22332@wheatley> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed" On Thu, Jan 07, 2016 at 07:31:57PM +0000, Jean-Pierre Ribeauville wrote: >Hi , > >Despite the fact that my Guest has an IP address , by running this piece of code on a KVM host : > > ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE, NULL); > ifaces_count = F_virDomainInterfaceAddresses(domain, > &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT, NULL); > > >I'm not able to get a ifaces_count different from -1 > > >Additionnaly : >- IP Addresses are not present within the xmldesc of this Guest.(not >sure that they should appear there) > >I'm running libvirt-1.2.17-13.el7.x86_64 > >Did I misunderstood something ? > >As ovirt manager shows the address correctly , it should be possible to get it via libvirt ... > Can you get them using virsh domifaddr? If yes, look at the code virsh uses. If not, then it might be ovirt's workaround using their agent for older qemu/libvirt/something combinations. >Thanks for help. > > >J.P. Ribeauville > > >P: +33.(0).1.47.17.20.49 >. >Puteaux 3 Etage 5 Bureau 4 > >jpribeauville@xxxxxxxxx<mailto:jpribeauville@xxxxxxxxx> >http://www.axway.com<http://www.axway.com/> > > > >P Pensez ? l'environnement avant d'imprimer. > > > >_______________________________________________ >libvirt-users mailing list >libvirt-users@xxxxxxxxxx >https://www.redhat.com/mailman/listinfo/libvirt-users -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: <https://www.redhat.com/archives/libvirt-users/attachments/20160108/81e4c217/attachment.bin> ------------------------------ Message: 3 Date: Fri, 8 Jan 2016 09:47:35 +0000 From: Jean-Pierre Ribeauville <jpribeauville@xxxxxxxxx> To: Martin Kletzander <mkletzan@xxxxxxxxxx> Cc: "libvirt-users@xxxxxxxxxx" <libvirt-users@xxxxxxxxxx> Subject: Re: Unable to retrieve Guest IP Addresses via libvirt API Message-ID: <1051EFB4D3A1704680C38CCAAC5836D292F01F48@xxxxxxxxxxxxxxxxxxxxxxx> Content-Type: text/plain; charset="iso-8859-1" Hi, My piece of code is inspired from domifaddr one. Virsh domifaddr doesn't return anything. Then , it could be useful for me to have a look in ovirt sources to understand how it deals with that. As a workaround , it should be possible to combine a dumpxml to retrieve Guest MAC addresses and then issue an "arp -an" to retrieve IP adresses. Regards, J.P. -----Message d'origine----- De?: Martin Kletzander [mailto:mkletzan@xxxxxxxxxx] Envoy??: vendredi 8 janvier 2016 10:36 ??: Jean-Pierre Ribeauville Cc?: libvirt-users@xxxxxxxxxx Objet?: Re: Unable to retrieve Guest IP Addresses via libvirt API On Thu, Jan 07, 2016 at 07:31:57PM +0000, Jean-Pierre Ribeauville wrote: >Hi , > >Despite the fact that my Guest has an IP address , by running this piece of code on a KVM host : > > ifaces_count = F_virDomainInterfaceAddresses(domain, &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_LEASE, NULL); > ifaces_count = F_virDomainInterfaceAddresses(domain, > &ifaces,VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_AGENT, NULL); > > >I'm not able to get a ifaces_count different from -1 > > >Additionnaly : >- IP Addresses are not present within the xmldesc of this Guest.(not >sure that they should appear there) > >I'm running libvirt-1.2.17-13.el7.x86_64 > >Did I misunderstood something ? > >As ovirt manager shows the address correctly , it should be possible to get it via libvirt ... > Can you get them using virsh domifaddr? If yes, look at the code virsh uses. If not, then it might be ovirt's workaround using their agent for older qemu/libvirt/something combinations. >Thanks for help. > > >J.P. Ribeauville > > >P: +33.(0).1.47.17.20.49 >. >Puteaux 3 Etage 5 Bureau 4 > >jpribeauville@xxxxxxxxx<mailto:jpribeauville@xxxxxxxxx> >http://www.axway.com<http://www.axway.com/> > > > >P Pensez ? l'environnement avant d'imprimer. > > > >_______________________________________________ >libvirt-users mailing list >libvirt-users@xxxxxxxxxx >https://www.redhat.com/mailman/listinfo/libvirt-users ------------------------------ Message: 4 Date: Fri, 8 Jan 2016 10:52:39 +0000 From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> To: Benedikt Heine <benedikt@heine.rocks> Cc: libvirt-users@xxxxxxxxxx Subject: Re: libvirtd and polkit: internal error: No Unix Process ID Message-ID: <20160108105239.GA14764@xxxxxxxxxx> Content-Type: text/plain; charset=utf-8 On Mon, Jan 04, 2016 at 03:44:10PM +0100, Benedikt Heine wrote: > Hi all, > > I want to use libvirtd and polkit to create simple access > restricitions for incoming TLS connections. This is sadly not possible. polkit will only authenticate against unix users. I filed an RFE long ago requesting for polkit to be generalized so that we could use it against virtual (ie non-UNIX system) identities but it was rejected. So effectively the libvirt polkit access control driver is only useful if you're connecting to libvirt over UNIX sockets :-( I really ought to get around to writing a custom libvirt access control driver that works in all cases..... 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 :| ------------------------------ Message: 5 Date: Fri, 8 Jan 2016 11:51:24 +0000 From: Jean-Pierre Ribeauville <jpribeauville@xxxxxxxxx> To: "libvirt-users@xxxxxxxxxx" <libvirt-users@xxxxxxxxxx> Subject: operation forbidden Read Only Access Message-ID: <1051EFB4D3A1704680C38CCAAC5836D292F01F6A@xxxxxxxxxxxxxxxxxxxxxxx> Content-Type: text/plain; charset="iso-8859-1" Hi, When issuing virDomainInterfaceAddresses() libvirt C language API, I got following error: libvirt: Domain Config error : operation forbidden: read only access prevents virDomainInterfaceAddresses How may I ask for a non-readonly connexion ? ( looks like to be RO by default) Thx for help. Regards, J.P. Ribeauville P: +33.(0).1.47.17.20.49 . Puteaux 3 Etage 5 Bureau 4 jpribeauville@xxxxxxxxx<mailto:jpribeauville@xxxxxxxxx> http://www.axway.com<http://www.axway.com/> P Pensez ? l'environnement avant d'imprimer. -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://www.redhat.com/archives/libvirt-users/attachments/20160108/96fce101/attachment.html> ------------------------------ _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users End of libvirt-users Digest, Vol 73, Issue 6 ******************************************** _______________________________________________ libvirt-users mailing list libvirt-users@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvirt-users