strongSwan UML - Installation
Contents
- Making the host system UML-capable
- Installing the required files
- Creating the UML testing environment
1. Making the host system UML-capable
You will need the UML utilities (uml_mconsole and uml_switch) available from
http://user-mode-linux.sourceforge.net/
uml_utilities_20070815.tar.bz2
Many Linux distributions offer these UML utilities as a package.
2. Installing the required files
First create a directory where you want the strongSwan UML testing environment to be located.
The default directory is
~/strongswan-testing
If you choose a different location, please adapt the UMLTESTDIR variable in testing.conf accordingly.
mkdir ~/strongswan-testing
Now copy the testing subdirectory coming with the strongSwan distribution to the UML testing environment:
cp -r testing ~/strongswan-testing
Next you need to copy several files into the ~/strongswan-testing directory that are required for the strongSwan testing environment:
- A vanilla Linux kernel on which the UML kernel will be based on. We recommend the use of
- The matching configuration file required to compile the UML kernel:
- A gentoo-based UML file system (compressed size 160 MBytes):
- The latest strongSwan distribution:
3. Creating the environment
Now change into the testing subdirectory
cd ~/strongswan-testing/testing
and make the UML testing environment:
./make-testing <hosts>
The "make-testing" script calls a series of subscripts which can be enabled or disabled individually by setting the corresponding flags in testing.conf
if [ $ENABLE_BUILD_UMLKERNEL = "yes" ]
then
scripts/build-umlkernel
fi
builds an UML kernel out of the vanilla Linux kernel and the corresponding UML kernel patch.
if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ]
then
scripts/build-hostconfig
fi
generates the default configurations for the UML hosts
alice, venus, moon, carol, winnetou, dave, sun, bob
by replacing the wildcards PH_IP_ALICE, etc. by the actual IP addresses defined in testing.conf.
if [ $ENABLE_BUILD_UMLROOTFS = "yes" ]
then
scripts/build-umlrootfs
fi
takes the gentoo-based UML file system and compiles the latest strongSwan distribution into it.
if [ $ENABLE_BUILD_SSHKEYS = "yes" ]
then
scripts/build-sshkeys
fi
adds the RSA public key of the UML instances to your ~/.ssh/known_hosts directory so that you can log onto the UML instances using ssh without typing in a password. The scripts/build-sshkeys script should only be run once.
if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ]
then
scripts/build-umlhostfs <hosts>
fi
creates the customized UML file systems for the instances given as command line arguments by adding the default host configurations to the UML root file system. If the make-starting scripts is called without any arguments then by default the UML file systems are created for the hosts
alice, venus, moon, carol, winnetou, dave, sun, bob
Each UML root file system has as size defined by the ROOTFSSIZE in testing.conf which by default is 544 MBytes. Thus all 8 UML hosts will require a total of 5 GBytes of disk space.
if [ $ENABLE_START_TESTING = "yes" ]
then
./start-testing <hosts>
fi
starts the automated testing. More details on the tests you'll find in the README document.
2012-05-02 info@strongswan.org