[libvirt-users] TUN/TAP device for lxc guest

Daniel P. Berrange berrange at redhat.com
Fri Mar 28 12:35:45 UTC 2014


On Fri, Mar 28, 2014 at 12:06:41PM +0800, 邓尧 wrote:
> I want to run a VPN software inside an lxc guest, but the required TUN/TAP
> device (/dev/net/tun) is missing in the container. Anyone knows how to
> enable this device ? Here is the definition XML:

We only create a few device nodes by default:

  http://libvirt.org/drvlxc.html#devnodes

You can ask for more using this syntax:

  http://libvirt.org/formatdomain.html#elementsHostDevCaps

eg

  <hostdev mode='capabilities' type='misc'>
    <source>
      <char>/dev/net/tun</char>
    </source>
  </hostdev>



Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvirt-users mailing list