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(a)redhat.com [mailto:libvirt-users-bounces@redhat.com] De la part
de libvirt-users-request(a)redhat.com
Envoyé : vendredi 8 janvier 2016 12:51
À : libvirt-users(a)redhat.com
Objet : libvirt-users Digest, Vol 73, Issue 6
Send libvirt-users mailing list submissions to
libvirt-users(a)redhat.com
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(a)redhat.com
You can reach the person managing the list at
libvirt-users-owner(a)redhat.com
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(a)axway.com>
To: "libvirt-users(a)redhat.com" <libvirt-users(a)redhat.com>
Subject: [libvirt-users] Unable to retrieve Guest IP Addresses via
libvirt API
Message-ID:
<1051EFB4D3A1704680C38CCAAC5836D292F01EF8(a)WPTXMAIL2.ptx.axway.int>
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@axway.com<mailto:jpribeauville@axway.com>
http://www.axway.com<http://www.axway.com/>
P Pensez ? l'environnement avant d'imprimer.