mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
qemu: improve error if tun device is missing
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>
This commit is contained in:
parent
5f211d4bc5
commit
bcc8b58be3
@ -1694,6 +1694,13 @@ qemudNetworkIfaceConnect(virConnectPtr conn,
|
|||||||
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
qemuReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("Failed to add tap interface to bridge. "
|
_("Failed to add tap interface to bridge. "
|
||||||
"%s is not a bridge device"), brname);
|
"%s is not a bridge device"), brname);
|
||||||
|
} else if (err == ENOENT) {
|
||||||
|
/* When the tun drive is missing, give a better message. */
|
||||||
|
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%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) {
|
} else if (template_ifname) {
|
||||||
virReportSystemError(err,
|
virReportSystemError(err,
|
||||||
_("Failed to add tap interface to bridge '%s'"),
|
_("Failed to add tap interface to bridge '%s'"),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user