Signed-off-by: Olaf Hering <olaf(a)aepfle.de>
---
Switching from attach-method "appliance" to "libvirt" has surprising
side effects, so show a hint how to resolve the "authentication failed"
error from libvirt.
Patch is not compile tested.
src/libvirtdomain.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/libvirtdomain.c b/src/libvirtdomain.c
index eecea26..110ee86 100644
--- a/src/libvirtdomain.c
+++ b/src/libvirtdomain.c
@@ -104,6 +104,8 @@ guestfs__add_domain (guestfs_h *g, const char *domain_name,
err = virGetLastError ();
error (g, _("could not connect to libvirt (code %d, domain %d): %s"),
err->code, err->domain, err->message);
+ if (err->code == VIR_ERR_AUTH_FAILED)
+ error (g, _("Possible fix: 'polkit-auth --user <username> --grant
org.libvirt.unix.manage'"));
goto cleanup;
}
--
1.7.12.2