Network Emulator for Mobile Universes

Tutorial - Setup NEmu on Mac OS X

This tutorial is build on Mac OS X Snow Leopard but you can choose another version of course.

Please note that the KVM support is only available for Linux and for a subset of BSD distributions which means that it is not available on MAC OS X. Therefore, you cannot use the _enable_kvm option for QEMU virtual machines.

System configuration

First of all, we have to install macports in order to download the dependent packages to build and to use NEmu. You can find the installation process here.

Then, we have to install the several NEmu dependencies:

$ sudo bash
root# port install boost boost-build cryptlib 
root# port install readline findutils graphviz
root# port install qemu python27 py27-crypto
root# port install sshfs vde2 subversion

Unfortunately, Squashfs tools are not available in macports yet, thus we have to download, patch, build and install it manually as explain here.

NEmu configuration

Then, we get NEmu:

$ svn co svn:// nemu.d

After this step, we have to build NEmu components. Your installation of boost libraries is located outside the default system library path; therefore you have to edit rcd/tools/Makefile and add the valid paths before calling the init process.

INCLUDE_DIRS={boost include path}
LIB_SHARED_DIRS={boost lib path}

In my case:


Then, we can build NEmu:

$ cd nemu.d
$ ./

A file called init.log will be created in order to summarize the result of the init process.

Environment configuration

You have also to set a shell environment variable called NEMUROOT. This one has to be set with the path of nemu.d. You can (or rather should) also setup an alias.

$ export NEMUROOT={path to nemu.d}
$ alias nemu="$NEMUROOT/"

You're ready to start

$ nemu
Welcome to the Network Emulator for Mobile Universes [NEmu]