I'm now using User Mode Linux to rapidly build a staging environment for my Sonic broker/esb network which includes many message routing nodes and SSL over the 'WAN'. It will be a nearly complete mirror image of my production environment allowing me to push my configuration changes from staging to production without any intermediate modifications (domain names, certificates, jdbc connection strings, etc).
Once you get a uml kernel that works with Java, this setup is quite nice. Note that the downloadable uml kernel won't work with Java, you need to roll your own.
A quick recipe follows:
Download and compile/install TAP/TUN. This allows you to start many uml instances and have them be accessible from the network. If compiling, a quick 'make oldconfig' in your /usr/src/linux dir will help overcome any ./configure errors. You also need to read the README to start it up after 'make install'.
Install the uml tools. uml_net is your friend.
Download the RH 7.2 full pristine image.
Get the latest uml kernel patch.
Find the latest linux kernel.
Apply the patch and compile.
I use a line similiar to this for startup.
./bin/linux ubd0=./images/root_fs.rh-7.2.sonic-5.0.1 mem=2G eth0=tuntap,,,127.0.0.10
Use a loop back address to configure the host side of the uml instance. Log in using root/root. If the system doesn't give you a console (which it may not), you can ssh in. Type 'arp' on the host to find a machine named "rh72.goober.org".
Also, look into copy on write (cow) files. This allows you to have one primary image you can base all your machine specific images off of, without having to copy the whole file system image every time (the cow only stores changes).
Thus you can install Java, disable unused daemons, etc etc, in the base image so you don't have to make all the same changes for your unique uml instances.
Leave a comment