Code Monkey home page Code Monkey logo

Comments (2)

sgalgano avatar sgalgano commented on July 26, 2024

Something changed after lxc version 2.0.5 causing the issue you are experiencing. The below emane-tutorial develop branch patch makes the appropriate container config modification and adds an lxc.hook.autodev.

diff --git a/scripts/democtl-host b/scripts/democtl-host
index 92bbfe2..1b09f3e 100755
--- a/scripts/democtl-host
+++ b/scripts/democtl-host
@@ -358,10 +358,21 @@ lxc.tty = 1
 lxc.pts = 128
 lxc.cgroup.devices.allow = a
 
-lxc.autodev = 0
+lxc.autodev = 1
+lxc.hook.autodev = $topdir/$demoid/persist/$nodeid/var/run/lxc.hook.autodev.sh
 
 EOF
 
+            cat <<EOF > persist/$nodeid/var/run/lxc.hook.autodev.sh
+#!/bin/bash -
+if ! [ -c /dev/net/tun ]; then
+ mkdir -p /dev/net
+ mknod -m 666 /dev/net/tun c 10 200
+fi
+
+EOF
+            chmod a+x persist/$nodeid/var/run/lxc.hook.autodev.sh
+
             if [[ $lxcmajorversion -ne 0 ]]
             then
                 echo "lxc.aa_profile = unconfined" >> persist/$nodeid/var/run/lxc.conf.$nodeid

In the future, issues related to the emane-tutorial should be created using that project's issues. I'll open up a corresponding tutorial issue to merge this patch in. Some tweaks may be necessary to support distributions with lxc versions 2.0.5 and older.

from emane.

mdcovarr avatar mdcovarr commented on July 26, 2024

Thank you, this did the trick for me. I apologize for not creating this issue under the emane-tutorial project and will definitely so in future issues.

from emane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.