Summary: | app-emulation/libvirt-0.8.1-r1: add elog to load tun module (was Failed to add tap interface to bridge 'virbr0') | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Dennis Schridde <dschridde+gentoobugs> |
Component: | Current packages | Assignee: | Doug Goldstein (RETIRED) <cardoe> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | virtualization, xmw |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.redhat.com/show_bug.cgi?id=601118 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Dennis Schridde
2010-05-30 16:26:43 UTC
Hello Dennis, can you please verify that you've TUN/TAP support in the kernel (`grep CONFIG_TUN /boot/config` or better `zgrep CONFIG_TUN /proc/config.gz`). If it says `# ... is not set`, please recompile the kernel with TUN/TAP enabled (Device Drivers -> Network Deviced -> Universal TUN/TAP...). If it says `CONFIG_TUN=m` please verify that you've loaded the module (`lsmod | grep tun` and `modprobe tun` if it's not listed). If it says, `CONFIG_TUN=y` then comment this fact here and, excuse my blind guess. Michael # zgrep CONFIG_TUN /proc/config.gz CONFIG_TUN=m # lsmod | grep tun # Can the module be loaded automatically, like most other modules seem to be loaded on demand? Can maybe the libvirtd init script load it? Or can the ebuild warn about loading the module if CONFIG_TUN=m? After "modprobe tun" everything worked, thanks a lot! I'll submit a bug to upstream libvirt, so they check for the existance of that module first, to ease diagnosis. (In reply to comment #3) > I'll submit a bug to upstream libvirt, so they check for the existance of that > module first, to ease diagnosis. https://bugzilla.redhat.com/show_bug.cgi?id=601118 (In reply to comment #2) > Can the module be loaded automatically, like most other modules seem to be > loaded on demand? Sure, just add it to /etc/conf.d/modules as `modules=tun`. > Can maybe the libvirtd init script load it? You need root privileges to do so, it'll fail if this script runns as regular user. > Or can the ebuild warn about loading the module if CONFIG_TUN=m? app-emulation/virtualbox-modules does so in pkg_postinst(), i'll assign it to the maintainer to add such a notice. Michael (In reply to comment #5) > (In reply to comment #2) > > Can the module be loaded automatically, like most other modules seem to be > > loaded on demand? > Sure, just add it to /etc/conf.d/modules as `modules=tun`. I meant more like: Is it technically possible to make the kernel load the module automatically when e.g. libvirtd tries to use it? > > Can maybe the libvirtd init script load it? > You need root privileges to do so, it'll fail if this script runns as regular > user. Init scripts (/etc/init.d) are always run by root, are they not? (In reply to comment #6) > I meant more like: Is it technically possible to make the kernel load the > module automatically when e.g. libvirtd tries to use it? That depends on what exactly libvirt opens the device. There is a kernel module autoloader but it requires a device file to exists inside /dev, with is event-driven upon module loading these days. Virtualbox didn't find a better way, too. > Init scripts (/etc/init.d) are always run by root, are they not? Yes, they are. I misread that as "application init script". That can be the solution. There's 3 different ways to have networking in virtualized environments. Host Bridge, Host Only, and NAT. Only the last actually requires a tun driver. Now I say "a tun" driver specifically as there's a few different tun drivers. The old boring tun, mactun, vmnet, and xennet. Which one will be used is really entirely up to how the user configured their system. So adding it to the init script isn't an option. The device node that controls the "tun" module is /dev/net/tun, which is a character device with a major of 10 and minor of 200. But this doesn't solve the issue for people that built their kernel with CONFIG_TUN=n and are trying to use tun networking. So really what do you guys propose the message look like? With macvtap support, now you either need the macvtap module loaded or the tun module based on your configuration. This message is going to be very confusing to get right. I've instead made libvirt load the tun module when it attempts to use it and it can't find it. Fixed in 0.8.3 |