2 -------------------------------
3 strongSwan UML - Installation
4 -------------------------------
10 1. Making the host system UML-capable
11 2. Installing the required files
12 3. Creating the UML testing environment
15 1. Making the host system UML-capable
16 ----------------------------------
18 UML instances can be run on both Linux 2.4 and Linux 2.6 kernels.
19 If you are using a vanilla kernel from kernel.org then you must first
20 apply the host SKAS patch available from
22 http://www.user-mode-linux.org/~blaisorblade/patches/
24 and recompile and reboot your host kernel. Some Linux distributions as e.g.
25 SuSE already include the SKAS patch in their kernels.
27 You will also need the UML utilities (uml_mconsole and uml_switch)
30 http://prdownloads.sourceforge.net/user-mode-linux/uml_utilities_20040406.tar.bz2
32 Many Linux distributions offer the UML utilities as a package.
35 2. Installing the required files
36 -----------------------------
38 First create a directory where you want the strongSwan UML testing environment
39 to be located.The default directory is "~/strongswan-testing". If you choose a
40 different location, please adapt the UMLTESTDIR variable in "testing.conf"
43 mkdir ~/strongswan-testing
45 Now copy the "testing" subdirectory coming with the strongSwan distribution to
46 the UML testing environment:
48 cp -r testing ~/strongswan-testing
50 Next you need to copy several files into the ~/strongswan-testing directory that
51 are required for the strongSwan testing environment:
53 * A vanilla Linux kernel on which the UML kernel will be based on.
54 We recommend the use of
56 http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.34.1.tar.bz2
58 * The Linux kernel 2.6.34.1 does not require any patches for the uml guest kernel
59 to successfully start up but the xfrm_mark patch must be applied for
62 * The matching .config file required to compile the UML kernel:
64 http://download.strongswan.org/uml/.config-2.6.34
66 * A gentoo-based UML file system (compressed size 130 MBytes) found at
68 http://download.strongswan.org/uml/gentoo-fs-20100703.tar.bz2
70 * The latest strongSwan distribution
72 http://download.strongswan.org/strongswan-4.4.2.tar.bz2
75 3. Creating the environment
76 ------------------------
78 Now change into the testing subdirectory
80 cd ~/strongswan-testing/testing
82 and make the UML testing environment:
84 ./make-testing <hosts>
86 The "make-testing" script calls a series of subscripts which can be
87 enabled or disabled individually by setting the corresponding flags
90 if [ $ENABLE_BUILD_UMLKERNEL = "yes" ]
92 scripts/build-umlkernel
95 builds an UML kernel out of the vanilla Linux kernel and the corresponding
98 if [ $ENABLE_BUILD_HOSTCONFIG = "yes" ]
100 scripts/build-hostconfig
103 generates the default configurations for the UML hosts alice, venus, moon,
104 carol, winnetou, dave, sun, and bob by replacing the wildcards PH_IP_ALICE,
105 etc. by the actual IP addresses defined in "testing.conf".
107 if [ $ENABLE_BUILD_UMLROOTFS = "yes" ]
109 scripts/build-umlrootfs
112 takes the gentoo-based UML file system and compiles the latest strongSwan
113 distribution into it.
115 if [ $ENABLE_BUILD_SSHKEYS = "yes" ]
117 scripts/build-sshkeys
120 adds the common RSA public key of the UML instances to your ~/.ssh/known_hosts
121 directory so that you can log onto the UML instances using ssh without typing
122 in a password. The "scripts/build-sshkeys" script should only be run once.
124 if [ $ENABLE_BUILD_UMLHOSTFS = "yes" ]
126 scripts/build-umlhostfs <hosts>
129 creates the customized UML file systems for the instances given as command line
130 arguments by adding the default host configurations to the UML root file system.
131 If the "make-starting" scripts is called without any arguments then by default
132 the UML file systems are created for the hosts alice, venus, moon, carol,
133 winnetou, dave, sun, and bob. Each UML root file system has as size defined by
134 the ROOTFSSIZE in testing.conf which by default is 544 MBytes. Thus all 8 UML
135 hosts plus the master copy will require a total of 5 GBytes of disk space.
137 if [ $ENABLE_START_TESTING = "yes" ]
139 ./start-testing <hosts>
142 starts the automated testing. More details on the tests you'll find in the
145 -----------------------------------------------------------------------------