The MLN Project

Complex virtual machine management made easy










SourceForge.net Logo

Introduction

MLN (Manage Large Networks) is a perl program that can be used to create a complete network of Xen or User-Mode-Linux systems from a short configuration file.

The goal is to ease the configuration and management of virtual networks. Xen and User-Mode Linux are widely used as tools for testing, learning and virtual hosting. MLN builds and configures filesystem templates based on its descriptive and easy programming language and stores them in an organized manner. It also generates start and stop scripts for each virtual host, enabling you to manage a running virtual network by stopping individual virtual machines within a network and starting them again. MLN makes it possible to have serveral separate networks, projects, at once and even connect them together to create larger networks.

Designing a virtual network in mln can be as easy as this:

global {

       project foobar

}



switch lan {

}



host one {



     network eth0 {

             switch lan

             address 10.0.0.1

	     netmask 255.255.255.0

     }

}



host two {



     network eth0 {

             switch lan

             address 10.0.0.2

	     netmask 255.255.255.0

     }

}

Benefits of Virtual Machines and MLN

  • LogisticsYou can now test and develop on several machines, and even different platforms, on your laptop while you travel or are without an internet connection.
  • Economy There is also a clear economical factor. One does not always have the money (or space) for several machines and switching equipment, not to mention the time required to install and administer them. If you change your mind, you'll have to reinstall. But not with virtual machines, just switch back to a pristine image or upgrade the project.
  • LearningIn an educational or scientific context, one often needs several machines for an experiment, student assignment, or class. MLN was spawned from this need: A quick and effective way to configure, build, re-build and share complex networks almost on the fly.
  • CPU emulators are very handy, but with kernel emulators we remove one layer of emulation. The UML kernel will run as fast as any other process on your system and recent advances with Xen yield near-native performance. However, the performance is also subject to how you configure your virtual machines and how much memory you assign them. With MLN the case would be like this: I just read about VPN on linux and found out I wanted to test this for myself. So I either write a short mln configuration yourself or just take one from the mln site containing a star topology with a router in the middle and three subnets, each with their gateway. A nice startoff point. The building of this network took about two and a half minutes on my laptop. It took less then forty seconds on a P4 1.7GHz with a new disc. That's a quick way to create a fully-functional linux network!

    Language Features

    The mln language supports many features, including:
    • Specifying which UML kernel to boot from
    • Support for variables and inheritance
    • Specifying size of memory and filesystem size for each virtual machine
    • Connecting virtual switches to tun/tap devices
    • Several filesystem templates to choose among or modify yourself
    • Virtual machines can be booted in either a xterm or a backgrounded "screen" so that it keeps running when you log out
    • Startup commands when the virtual machine boots
    • Copy files into the filesystem at build time
    • What modules to load into the kernel at boot time
    • Add users and assign them passwords, home directory and UID
    • Hosts and switches can run as different users
    • Set nice-values to virtual hosts
    The important thing is that you are able to design the network the way you want it. It is straight forward to build simple networks, but through the use of inheritance and variables it is possible to build complex topologies as well. The machines can be as complex as you can imagine. Sometimes the goal is to build machines that are only wired together so that you (or others) can learn how to configure a network manually. Or you want a fully functional network because you care more about the services on top, i.e webserving, security, VPN or a shell server for restricted users that you just want to keep off your machine. All of this is possible.

    MLN Features

    These are some of the features of mln:
    • Building virtual networks written in the mln language
    • Upgrading a running virtual network by taking down only the machines that need to be rebuilt
    • Downloading filesystem templates from our repository
    • Starting and stopping virtual networks (both hosts and switches)
    • Removing virtual networks
    • Setting up a bridge device on your host so that the virtual machines become a part of your LAN (see README)
    • Build process can be done as non-root (by circumventing the mount command)

    Inteded Usage

    MLN can be used in educational institutions to create many Xen or UML instances that students use for doing root network or host configuration. Or it can be used to create testbed systems which you test new configurations for system administrators. Or it can be used as a part of a production network to seperate services into seperate instances.

    MLN is written with long-time usage in mind. In an educational context it must be possible to administer several virtual networks over a long period of time without much difficulty. Students should also be able to build their own networks as a sandbox for them to learn UNIX system administration.