Repository : ssh://git@open-mesh.org/doc
On branches: backup-redmine/2019-11-07,master
commit 69735e773ff2be7e7504125c35d635d2c007aa11 Author: Sven Eckelmann sven@narfation.org Date: Sun Oct 27 14:04:02 2019 +0000
doc: open-mesh/OpenWrt_in_QEMU
69735e773ff2be7e7504125c35d635d2c007aa11 open-mesh/OpenWrt_in_QEMU.textile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/open-mesh/OpenWrt_in_QEMU.textile b/open-mesh/OpenWrt_in_QEMU.textile index 2deb88d..9e9bfa1 100644 --- a/open-mesh/OpenWrt_in_QEMU.textile +++ b/open-mesh/OpenWrt_in_QEMU.textile @@ -55,9 +55,24 @@ chmod +x interconnect.sh
h3. VM instances bringup
-The three node environment must be started inside a screen session. +Each instance will need to write to the provided image. If the same image is specified as drive for each instance then write to this file would conflict and data corruption would happen. To avoid this, each instance gets its own (copy on write) snapshot of the base image.
-The @SHARED_PATH@ in run.sh has to be changed to a valid path which is used to share thins like a precompiled batman-adv.ko and other tools +The three node environment must be started inside a screen session. Each instance will end up in an own screen window. This allows access to the serial console of each instance while having each instance's output separated from each other. + +The qemu instance is started in a rather specific way to enable all features which might be needed during the test: + +* KVM is enabled to speed up the virtual instances (by avoiding slow emulation as much as possible) +* no graphic display is activated +* serial output is enabled for kernel output and login shell +* 2 core SMP is activated to better recreate SMP race conditions +* 512 MB RAM is provided to the virtual instance ("KSM":https://en.wikipedia.org/wiki/Kernel_same-page_merging should be activated in setups with larger number of virtual instances) +* a nic is connected to the tap interface (from the interconnect) to transport mesh (and other) traffic +* a user nic is created to transport (NAT'ed) traffic to/from the internet +* a shared path from host is provided for the client +* the qemu gdb server is enabled to allow [[open-mesh:Kernel_debugging_with_qemu's_GDB_server|kernel debugging]] + + +The @SHARED_PATH@ in run.sh has to be changed to a valid path which is used to share things like a precompiled batman-adv.ko and other tools
<pre><code class="shell"> cat > run.sh << "EOF"