[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 2/2] Add a detailed message when tap device add fails



Added a more detailed error message when adding a tap devices fails and
the kernel is missing tun support.

Signed-off-by: Doug Goldstein <cardoe gentoo org>
---
 src/uml/uml_conf.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c
index 025169f..4b1df84 100644
--- a/src/uml/uml_conf.c
+++ b/src/uml/uml_conf.c
@@ -146,6 +146,11 @@ umlConnectTapDevice(virDomainNetDefPtr net,
             umlReportError(VIR_ERR_INTERNAL_ERROR,
                            _("Failed to add tap interface to bridge. "
                              "%s is not a bridge device"), bridge);
+        } else if (err == ENOENT) {
+            virReportSystemError(err, "%s",
+                    _("Failed to add tap interface to bridge. Your kernel "
+                      "is missing the 'tun' module or CONFIG_TUN or you need "
+                      "to add the /dev/net/tun device node."));
         } else if (template_ifname) {
             virReportSystemError(err,
                                  _("Failed to add tap interface to
bridge '%s'"),
-- 
1.7.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]