Marionnet post-installation setup

There are a couple of optional features of Marionnet which need some system configuration: GUI applications for virtual machines, and host network access for virtual machines.

Run the Marionnet daemon at startup

The Marionnet daemon is a very little server running as the root user which executes some system-level services for Marionnet, like creating taps. You need the daemon if you want to enable GUI applications and/or network access for virtual machines.

If you decide that you don't want to run the daemon then you will see a warning message when Marionnet starts up, and the optional features will not work. If that is the case, you're done.

You will probably want to launch the Marionnet daemon from your startup scripts, so that it's automatically executed at boot — don't worry about its performance impact, it essentially sleeps all the time waiting for commands from Marionnet.

Add these lines to your /etc/rc.local:

chmod a+rw /dev/net/tun
/usr/local/sbin/marionnet-daemon.byte &> /dev/null &

Save the file, and reboot the machine.

Now that you have the daemon running you should do a little setup to make the optional features work.

GUI applications in virtual machines (for systems using 'gdm')

If you also want to run graphical applications in your virtual machines then you should enable TCP connections to the X server. Counter-intuitively, in debian-like distributions you have to setup gdm for this.

From the main menu, go to System|Administration|Login Window1. Choose the tab Security and uncheck the checkbox “Deny TCP connections to the Xserver”. Log out to kill the X server, then log back in, and you're done.

GUI applications in virtual machines (for systems which don't start X automatically)

If you don't use gdm, but instead you manually start X with a startx command, TCP connections may be enabled by default, or (on some RedHat-like systems) you may need to comment out the line:

no-listen = tcp

in /etc/X11/fs/config.

Be sure that X is not called with the option --nolisten tcp.

Host network access for virtual machines

If you want to use the socket virtual device for giving host network access to your virtual machines, you need to setup a bridge.

A clever but dirty and fragile script for doing this is included in Marionnet:

. ~root/tmp/marionnet/useful-scripts/prepare_bridge.sh

First you should try it (yes, you also need the initial dot). If after having run it your network connection doesn't work any more then just reboot another time, and the network will work again.

If instead the script worked, a simple way of making the bridge permanent is to call the script from /etc/rc.local: add the line above to the file, just before the line which starts up the daemon.

 

Now you can launch Marionnet by typing

marionnet.byte

Have fun!

(1)Yes, I know it's strange and counter-intuitive, but it is gdm which starts up the X server. By the way, gdm is not a login window at all. It's not even a window…