Displaying 20 results from an estimated 32 matches for "virconnectopenreadon".
Did you mean:
virconnectopenreadonly
2014 Nov 07
2
Re: libguestfs-tools with libvirt SASL authentication
...blob/master/src/libvirt-auth.c#L192
(3) Finally if you are using the libvirt backend (which you are not on
Ubuntu) then there would be a third connection to run the appliance, although it uses the same code as (2).
I believe the problem here is that (1) does not pass an auth handler.
ie. it calls virConnectOpenReadonly, not virConnectOpenAuth. It's my understanding that virConnectOpenReadonly bypasses the policy kit and SASL stuff, but Dan Berrange (CC'd) will be able to tell me if I'm correct about that.
If that was the case then you would see an error when virt-df tries to get a list of domains....
2013 May 27
2
hangs in libvirt function virLogMessage
Hi,
We are hitting a deadlock on libvirt on 0.9.4 version. Can someone help us ?
1) Is there any way to specify timeout for all the calls made by libvirt especially virConnectOpenReadOnly
2) Does virCommandRunAsync always fork a new process ?
gdb) bt
#0 0x00007fc17b53ce6e in __lll_lock_wait_private () from /lib64/libc.so.6
#1 0x00007fc17b4e3f2d in _L_lock_2164 () from /lib64/libc.so.6
#2 0x00007fc17b4e3ce7 in __tz_convert () from /lib64/libc.so.6
#3 0x00007fc16e4bfdab in vi...
2008 Nov 19
0
Unable to open a connection to the Xen hypervisor/daemon 2
This is the report from Virt-Manager
Unable to open a connection to the Xen hypervisor/daemon.
Verify that:
- A Xen host kernel was booted
- The Xen service has been started
Details:
Unable to open connection to hypervisor URI ''xen:///'':
libvirt.libvirtError virConnectOpenReadOnly() failed
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 307, in
_open_thread
self.vmm = libvirt.openReadOnly(self.uri)
File "/usr/lib/python2.4/site-packages/libvirt.py", line 132, in
openReadOnly
if ret is None:ra...
2008 Jul 08
0
virt-manager problem on Ubuntu
...ng errors occurred:
Unable to open a connection to the Xen hypervisor/daemon.
Verify that:
- A Xen host kernel was booted
- The Xen service has been started
Details:
Unable to open connection to hypervisor URI ''xen:///'':
<class ''libvirt.libvirtError''> virConnectOpenReadOnly() failed
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 332,
in _open_thread
self.vmm = libvirt.openReadOnly(self.uri)
File "/usr/lib/python2.5/site-packages/libvirt.py", line 144, in openReadOnly
if ret is None:ra...
2014 Nov 13
0
Re: libguestfs-tools with libvirt SASL authentication
...to chime in here, but can you try
out the following patch?
diff --git a/df/domains.c b/df/domains.c
index b2d9537..6cbc0f9 100644
--- a/df/domains.c
+++ b/df/domains.c
@@ -77,7 +77,8 @@ get_all_libvirt_domains (const char *libvirt_uri)
size_t i;
/* Get the list of all domains. */
- conn = virConnectOpenReadOnly (libvirt_uri);
+ conn = virConnectOpenAuth (libvirt_uri, virConnectAuthPtrDefault,
+ VIR_CONNECT_RO);
if (!conn) {
err = virGetLastError ();
fprintf (stderr,
Rich.
>
> -----Original Message-----
> From: Richard W.M. Jones [mailto:rjones@redhat...
2014 Nov 04
2
libguestfs-tools with libvirt SASL authentication
Hello,
I'm running into an issue using the 'virt-df' command when SASL is enabled in libvirt. I'm running version 1.26.5 of libguestfs on an Ubuntu 14.04 OS.
I'm running 'virt-df' for all guests at one time, not specifying a domain or image to use. I was expecting a SASL authentication prompt but to no avail. Below is a sample run:
root@all-in-one:~# virt-df -P 15
2016 Feb 04
1
libvirt.so is not safe to use from setuid programs
Hi,
When trying to connect the HyperVisor from a binary having setuid bit set , then I got following error:
Unable to perform virConnectOpenReadOnly function error(internal error: libvirt.so is not safe to use from setuid programs)
My test software config is the following :
-rwsr-xr-x. 1 root root 3374956 Feb 4 13:45 test
As this test software needs S bit to be able to access O.S. metrics counters , how may I use it to retrieve KVM metr...
2013 Jan 07
1
how to use libvirt
Hi everyone:
I am just a new user to libvirt. I installed libvirt as:
./configure
make
sudo make
After that I run the program in the development guide. But it seems that
the program is stuck in the function of virConnectOpenReadOnly. When I
tried the command: virsh list --all, it is also stuck. So could anyone tell
me what's wrong with this?
Thank you so much
Tianwei Zhang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/201...
2014 Nov 05
0
Re: libguestfs-tools with libvirt SASL authentication
...blob/master/src/libvirt-auth.c#L192
(3) Finally if you are using the libvirt backend (which you are not on
Ubuntu) then there would be a third connection to run the appliance,
although it uses the same code as (2).
I believe the problem here is that (1) does not pass an auth handler.
ie. it calls virConnectOpenReadonly, not virConnectOpenAuth. It's my
understanding that virConnectOpenReadonly bypasses the policy kit and
SASL stuff, but Dan Berrange (CC'd) will be able to tell me if I'm
correct about that.
If that was the case then you would see an error when virt-df tries to
get a list of domains....
2016 Jan 08
2
Re: operation forbidden Read Only Access
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@redhat.com [mailto:libvirt-users-bounces@redhat.com]...
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...gt;set_hostname(hostname);
+
+ // Hypervisor, arch, memory
+ management_object->set_memory(0);
+ management_object->set_hypervisor("unknown");
+ management_object->set_arch("unknown");
+
+ virConnectPtr connection;
+ virNodeInfo info;
+ connection = virConnectOpenReadOnly(NULL);
+ if (connection) {
+ const char *hv = virConnectGetType(connection);
+ if (hv != NULL)
+ management_object->set_hypervisor(hv);
+ ret = virNodeGetInfo(connection, &info);
+ if (ret == 0) {
+ management_object->set_arch(info.model);
+ m...
2016 Jan 11
0
Re: operation forbidden Read Only Access
On 08.01.2016 14:30, Jean-Pierre Ribeauville wrote:
> 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 ?
Yes it is. You basically need just to pass a callback that will supply
credentials to libvirt. Does not matter...
2008 Jul 01
0
cannot migrate vm back to original machine (currently with libvirt)
...y program on both machine #2 (connecting to
machine #1 with ssh, and machine #2 with local (NULL) or ssh), and on
a separate 3rd machine (connecting to machine #1 and #2 with ssh), but
I get the same error message in both cases. I''ve tried connecting
with both virConnectOpen() and virConnectOpenReadOnly().
I don''t see any obvious error messages when running libvirtd --
verbose, other than the one above, which shows up on machine #1.
There are no obvious error messages in libvirtd --verbose on machine #2.
I checked /var/log/xen/xend.log and xend-debug.log, but didn''t see a...
2010 Jan 22
1
libvirtd remote access
...libvir: QEMU error : server closed connection
Traceback (most recent call last):
File "test.py", line 5, in ?
conn=libvirt.openReadOnly(uri)
File "/usr/lib/python2.4/vendor-packages/libvirt.py", line 174, in openReadOnly
if ret is None:raise libvirtError(''virConnectOpenReadOnly() failed'')
libvirt.libvirtError: server closed connection
remote$ telnet xvm0 16509
9010/1: pollsys(0x00450570, 6, 0x00000000, 0x00000000) = 1
9010/1: accept(10, 0x7FFFFFDFE8A0, 0x7FFFFFDFE888, SOV_DEFAULT) = 11
9010/1: getpeerucred(11, 0x00450290)...
2010 May 13
0
[PATCH matahari] Moving QMF functionality into a transport layer.
...name = string(details.nodename);
- architecture = string(details.machine);
- }
- else
- {
- throw runtime_error("Unable to retrieve system details");
- }
+void
+Host::set_hypervisor(const string hypervisor)
+{
+ _hypervisor = hypervisor;
+}
- virConnectPtr lvconn = virConnectOpenReadOnly(NULL);
+string
+Host::get_hypervisor() const
+{
+ return _hypervisor;
+}
- if(lvconn)
- {
- hypervisor = string(virConnectGetType(lvconn));
- virConnectClose(lvconn);
- }
+void
+Host::set_architecture(const string architecture)
+{
+ _architecture = architecture;
+}
- struc...
2020 Jan 10
2
Re: [PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
...gisterAny(
virConnectGetAllDomainStats (
virConnectGetCapabilities (
virConnectGetDomainCapabilities (
virConnectGetMaxVcpus (
virConnectGetVersion (
virConnectListDefinedDomains (
virConnectListDomains (
virConnectNumOfDefinedDomains (
virConnectNumOfDomains (
virConnectOpen (
virConnectOpenAuth (
virConnectOpenReadOnly (
virConnectRef(
virConnectSetKeepAlive(
virConnResetLastError (
virConnSetErrorFunc (
virDomainAttachDeviceFlags (
virDomainBlockPeek (
virDomainBlockStats (
virDomainCreateXML (
virDomainDestroy (
virDomainDestroyFlags (
virDomainDetachDeviceFlags (
virDomainFree (
virDomainGetConnect (
virDoma...
2020 Jan 10
5
[PATCH Fedora libguestfs] Don't depend on libvirt-daemon-kvm monolith.
libguestfs usually needs qemu. However it only requires an emulator
for the same architecture, not for all architectures.
libvirt-daemon-kvm pulls in qemu which pulls in emulators for all
architectures, as well as a bunch of other stuff we don't need at all
like network interface support and nwfilter.
There are no Fedora TCG-only arches, so drop the conditional section.
I also made support
2017 Mar 16
0
[PATCH 1/4] p2v: Pass host CPU details to virt-v2v.
...LFREEDOC xmlDocPtr doc = NULL;
+ CLEANUP_XMLXPATHFREECONTEXT xmlXPathContextPtr xpathCtx = NULL;
+ CLEANUP_XMLXPATHFREEOBJECT xmlXPathObjectPtr xpathObj = NULL;
+ xmlNodeSetPtr nodes;
+ size_t nr_nodes, i;
+ xmlNodePtr node;
+
+ /* Connect to libvirt and get the capabilities XML. */
+ conn = virConnectOpenReadOnly (NULL);
+ if (!conn) {
+ libvirt_error (_("could not connect to libvirt"));
+ return;
+ }
+
+ /* Suppress default behaviour of printing errors to stderr. Note
+ * you can't set this to NULL to ignore errors; setting it to NULL
+ * restores the default error handler ......
2017 Mar 23
2
[PATCH] p2v: Use lscpu instead of libvirt to get CPU information.
...ULL;
- CLEANUP_XMLXPATHFREECONTEXT xmlXPathContextPtr xpathCtx = NULL;
- CLEANUP_XMLXPATHFREEOBJECT xmlXPathObjectPtr xpathObj = NULL;
- const char *xpathexpr;
- xmlNodeSetPtr nodes;
- size_t nr_nodes, i;
- xmlNodePtr node;
-
- /* Connect to libvirt and get the capabilities XML. */
- conn = virConnectOpenReadOnly (NULL);
- if (!conn) {
- libvirt_error (_("could not connect to libvirt"));
- return;
- }
+ const char *flags;
- /* Suppress default behaviour of printing errors to stderr. Note
- * you can't set this to NULL to ignore errors; setting it to NULL
- * restores the def...
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...t compile time */
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index eecea26..f65686c 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -99,7 +99,7 @@ guestfs__add_domain (guestfs_h *g, const char *domain_name,
}
/* Connect to libvirt, find the domain. */
- conn = virConnectOpenReadOnly (libvirturi);
+ conn = guestfs___open_libvirt_connection (g, libvirturi, VIR_CONNECT_RO);
if (!conn) {
err = virGetLastError ();
error (g, _("could not connect to libvirt (code %d, domain %d): %s"),
--
1.7.11.4