Displaying 19 results from an estimated 19 matches for "vir_connect_ro".
2016 Nov 16
0
[PATCH 2/2] libvirt: read secrets of disks (RHBZ#1392798)
...e, const char *volume_name);
static bool xPathObjectIsEmpty (xmlXPathObjectPtr obj);
@@ -95,8 +97,12 @@ guestfs_impl_add_domain (guestfs_h *g, const char *domain_name,
return -1;
}
- /* Connect to libvirt, find the domain. */
- conn = guestfs_int_open_libvirt_connection (g, libvirturi, VIR_CONNECT_RO);
+ /* Connect to libvirt, find the domain. We cannot open the connection
+ * in read-only mode (VIR_CONNECT_RO), as that kind of connection
+ * is considered untrusted, and thus libvirt will prevent to read
+ * the values of secrets.
+ */
+ conn = guestfs_int_open_libvirt_connection (g,...
2016 Nov 16
3
[PATCH 1/2] libvirt: un-duplicate XPath code
Move the checks for empty xmlXPathObjectPtr, and for extracting the
result string out of it, to a new helper functions.
This is just code motion, there should be no behaviour changes.
---
src/libvirt-domain.c | 122 +++++++++++++++++++++------------------------------
1 file changed, 50 insertions(+), 72 deletions(-)
diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index 4d4142d..baab307
2015 May 05
2
[PATCH 0/2] v2v: -o libvirt: Check if the domain exists on the target (RHBZ#889082).
https://bugzilla.redhat.com/show_bug.cgi?id=889082
2016 Jan 08
1
operation forbidden Read Only Access
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
2017 Sep 08
2
[PATCH] RFC: v2v: add and use libvirt connection objects
...(connv, 0)); /* Some conn */
-
- /* We have to call the default authentication handler, not least
- * since it handles all the PolicyKit crap. However it also makes
- * coding this simpler.
- */
- conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
- VIR_CONNECT_RO);
- if (conn == NULL) {
- if (conn_uri)
- snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection ā%sā"), conn_uri);
- else
- snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
- caml_invalid_argument (errmsg);...
2014 Nov 07
2
Re: libguestfs-tools with libvirt SASL authentication
Thanks for the info, Richard.
Hi Dan,
Any additional information on this?
Thanks,
Dan Ryder
-----Original Message-----
From: Richard W.M. Jones [mailto:rjones@redhat.com]
Sent: Wednesday, November 05, 2014 8:46 AM
To: Dan Ryder (daryder); berrange@redhat.com
Cc: libguestfs@redhat.com
Subject: Re: [Libguestfs] libguestfs-tools with libvirt SASL authentication
On Tue, Nov 04, 2014 at
2011 Feb 23
0
[PATCH 1/2] libvirt/qemu : allow persistent modification of disks via A(De)ttachDeviceFlags
...def;
+ virDomainObjPtr vm;
+ int ret = -1;
+
+ if (!dom || !dom->conn || !dom->name || !xml) {
+ qemuReportError(VIR_ERR_INVALID_ARG,
+ _("internal error : %s"), __FUNCTION__);
+ return -1;
+ }
+
+ if (dom->conn->flags & VIR_CONNECT_RO)
+ return -1;
+
+ driver = dom->conn->privateData;
+ qemuDriverLock(driver);
+ vm = virDomainFindByUUID(&driver->domains, dom->uuid);
+ if (!vm) {
+ qemuReportError(VIR_ERR_NO_DOMAIN, _("cannot find domain '%s'"),
+...
2014 Nov 13
0
Re: libguestfs-tools with libvirt SASL authentication
...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.com]
> Sent: Wednesday, November 05, 2014 8:46 AM
> To: Dan Ryder (daryder); berrange@redhat.com
> Cc: libguestfs@redhat...
2014 Oct 30
2
[PATCH 0/2] v2v: Add --password-file parameter (RHBZ#1158526).
These patches add the --password-file parameter, allowing you to pass
a single password via a file.
https://bugzilla.redhat.com/show_bug.cgi?id=1158526
Rich.
2019 Apr 08
0
[PATCH v4 3/7] v2v: switch to ocaml-libvirt
...(connv, 0)); /* Some conn */
-
- /* We have to call the default authentication handler, not least
- * since it handles all the PolicyKit crap. However it also makes
- * coding this simpler.
- */
- conn = virConnectOpenAuth (conn_uri, virConnectAuthPtrDefault,
- VIR_CONNECT_RO);
- if (conn == NULL) {
- if (conn_uri)
- snprintf (errmsg, sizeof errmsg,
- _("cannot open libvirt connection ā%sā"), conn_uri);
- else
- snprintf (errmsg, sizeof errmsg, _("cannot open libvirt connection"));
- caml_invalid_argument (errmsg);...
2012 Oct 13
0
[PATCH] New APIs: Model libvirt authentication events through the API.
...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
2018 Aug 30
8
[PATCH 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2018 Nov 27
8
[PATCH v2 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2019 Jan 30
8
[PATCH v3 0/7] RFC: switch v2v to ocaml-libvirt
Hi,
this is a mostly done attempt to switch to ocaml-libvirt, embedding the
latest version of it from git. This way, it is possible to improve the
way v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not
2019 May 20
8
[PATCH v5 0/7] v2v: switch to ocaml-libvirt
Hi,
this series switches virt-2v to ocaml-libvirt, embedding the latest
version of it from git. This way, it is possible to improve the way
v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not test all
2019 Apr 08
12
[PATCH 43 0/7] v2v: switch to ocaml-libvirt
Hi,
this series switches virt-2v to ocaml-libvirt, embedding the latest
version of it from git. This way, it is possible to improve the way
v2v connects to libvirt for both input, and output modules, and
interacts with libvirt (e.g. no more virsh calls needed in virt-v2v).
As side effect, virt-v2v now requires libvirt, as keeping it optional
would create too much burden.
I could not test all
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers.
These aren't valid for global names in C++.
(http://stackoverflow.com/a/228797)
These large but completely mechanical patches change the illegal
identifiers to legal ones.
Rich.
2019 Apr 08
0
[PATCH v4 2/7] common: Bundle the libvirt-ocaml library for use by virt-v2v
...amev, authv, 0);
+ rv = Val_connect (conn);
+
+ CAMLreturn (rv);
+}
+
+CAMLprim value
+ocaml_libvirt_connect_open_auth_readonly (value namev, value authv)
+{
+ CAMLparam2 (namev, authv);
+ CAMLlocal1 (rv);
+ virConnectPtr conn;
+
+ conn = _ocaml_libvirt_connect_open_auth_common (namev, authv, VIR_CONNECT_RO);
+ rv = Val_connect (conn);
+
+ CAMLreturn (rv);
+}
+
+CAMLprim value
+ocaml_libvirt_connect_get_version (value connv)
+{
+ CAMLparam1 (connv);
+ virConnectPtr conn = Connect_val (connv);
+ unsigned long hvVer;
+ int r;
+
+ NONBLOCKING (r = virConnectGetVersion (conn, &hvVer));
+ CHECK...
2019 Dec 16
3
[v2v PATCH 0/2] Move libvirt-ocaml copy to v2v repo
libvirt-ocaml is used only by virt-v2v, so move it to this repository,
instead of having it around in the common submodule.
The removal from common will happen later.
Pino Toscano (2):
common: Bundle the libvirt-ocaml library for use by virt-v2v
build: switch embedded copy of libvirt-ocaml
.gitignore | 2 +
3rdparty/libvirt-ocaml/Makefile.am |