1 \documentclass{article}[11pt]
9 \def\colfigsize{\epsfxsize=5in}
11 \title{Building guest bootable image for the Palacios and Kitten}
16 \section{Getting the stuffs used for building guest image}
18 In order to build the bootable guest iso image, we need to build Linux kernel image from its source,
19 an initial file system containing a set of useful binary files and other necessary directories and files,
20 which will be specified in the following text.
22 We will use a new directory for demonstration,
23 the root directory for our following examples are all in the \verb+test/+ as root directory.
30 There are a set of tools and sources that are useful for this building procedure. You can checkout these resources from our git repositories. To checkout them to your local directory, using commands:
33 git clone http://hornet.cs.northwestern.edu:9005/busybox
34 git clone http://hornet.cs.northwestern.edu:9005/initrd
35 git clone http://hornet.cs.northwestern.edu:9005/linux-2.6.30.y
38 \section{Build the ramdisk filesystem}
40 Copy needed devices into the \verb+initramfs/dev/+ directory,
41 for minimal support, you need console, ram, null, tty.
42 (You probably need root privilege to copy and make the device files)
44 There is an already costumed initial ramdisk system made
45 by Jack which you can leverage. The file is temporarily
46 in \verb|/home/jarusl/initrd/disks/v3vee_initramfs.tar.gz|
49 \section{Configure and Install Busybox tools}
51 BusyBox is a software application released as Free software
52 under the GNU GPL that provides many standard Unix tools. BusyBox
53 combines tiny versions of many common UNIX utilities into a single
54 small executable. For more details on Busybox, visiting http://busybox.net.
56 To configure BusyBox, in the \verb+busybox/+ directory, type
60 make xconfig (X version)
63 You can add tools as you needed into the guest image. There are
64 two specified configurations are required here:
65 First, in the "\verb|Build Options|", check the option
66 "\verb|Build BusyBox as a static binary (no shared libs)|",
67 as shown in figure \ref{fig:busyboxcf1}. Second,
68 in the "\verb|Installation Options|", Change
69 the "\verb|Busybox installation prefix|" to be the path
70 of your "\verb|initramfs|" directory, as shown in figure \ref{fig:busyboxcf2}.
72 \begin{figure}\begin{center}\colfigsize\epsffile{busyboxConf1.eps}\end{center}\caption{BusyBox configuartion}\label{fig:busyboxcf1}\end{figure}
74 \begin{figure}\begin{center}\colfigsize\epsffile{busyboxConf2.eps}\end{center}\caption{BusyBox configuartion}\label{fig:busyboxcf2}\end{figure}
76 After you finish the configuration, save your configuration
77 and quit the window. Then, to make the Busybox tools, type
81 And then install the tools to your inital ramdisk directory
87 \section{Configure and Compile Linux Kernel}
89 Go to \verb|linux-2.6.30.y/| directory (or whatever your
90 Linux kernel source directory). Type
94 make xconfig (X version)
97 To configure the kernel as your need.
98 There is a customed configuration file "\verb|jrl-default-config|"
99 which is configured with minimal kernel options (all of
100 unnecessary stuffs are turned off to keep guest booting process faster).
102 For more on configuring and compiling Linux kernel image, check online. Here, one
103 option for configuring the initial ramdisk file system directory (such
104 as \verb|initrd/initramfs|) in the option
105 "\verb|initial RAM filesystem and Ram Disk|" is needed,
106 as shown in figure \ref{fig:linuxcf}.
108 \begin{figure}\begin{center}\colfigsize\epsffile{linuxConf.eps}\end{center}\caption{Linux Kernel configuartion}\label{fig:linuxcf}\end{figure}
110 \section{Configure guest devices}
111 Checkout the updated Palacios repository to \verb|palacios/|.
112 (You can find the instruction of how to get the Palacios and
113 Kitten repository in http://www.v3vee.org/palacios/).
115 In the "\verb|palacios/utils/guest_creator|", Type
119 You will get the guest configuration files creator "\verb|build_vm|".
121 The guest configuration file is using XML format. There is a sample configuration file: \verb|default.xml|.
122 You can create your own guest configuration, after creating your file, type
125 ./build_vm myconfig.xml -o guest.iso
128 Where \verb+myconfig.xml+ is your guest configuration file,
129 and \verb+guest.iso+ is the output image file that can be
130 feed into kitten¡¯s configuration (see next section).
132 \section{Configure and Make Palacios and Kitten}
133 \subsection*{Configure and build Palacios}
135 You can find the detail manual of getting and building Palacios and Kitten
136 from scratch in the Palacios website (http://www.v3vee.org/palacios).
137 Here we only give the specific requirements related to the booting guest procedure.
139 To configure Palacios, in Palacios root directory, such as \verb+palacios/+, type
147 To configure the components you want to build into Palacios. And then type
155 To build Palacios static library, after build, you can find the Palacios library file \verb+libv3vee.a+ in root directory.
157 \subsection*{Configure and build Kitten}
159 To build Kitten, first configure it using the similar way as Palacios, go to \verb+kitten/+, type
167 Specifically, you have to enable Palacios VMM support in Kitten,
168 and configure the root directory of Palacios and the
169 path of the guest image file we just built in previous step,
170 as show in figure \ref{fig:kittencf} and \ref{fig:kittencf2}.
172 \begin{figure}\begin{center}\colfigsize\epsffile{kittenConf1.eps}\end{center}\caption{Kitten configuartion}\label{fig:kittencf}\end{figure}
174 \begin{figure}\begin{center}\colfigsize\epsffile{kittenConf2.eps}\end{center}\caption{Kitten configuartion}\label{fig:kittencf2}\end{figure}
176 After configure, to build the Kitten, type
182 to make the bootable ISO image file with guest OS, Palacios and Kitten.
183 The ISO file is located in \verb+kitten/arch/x86_64/boot/image.iso+.
185 Until here, you have successfully created a guest CD image file that can be
186 booted on machine. You can boot the file on Qemu using following sample command
189 /opt/vmm-tools/qemu/bin/qemu-system-x86_64 \
192 -serial file:./serial.out \
193 -cdrom kitten/arch/x86_64/boot/image.iso \
197 Here, we finally finish the entire procedure to
198 build costumed guest and boot it on Palacios VMM.
199 For more updated details, check Palacios
200 website \verb+http://www.v3vee.org/palacios+ and
201 Kitten website \verb+https://software.sandia.gov/trac/kitten+ regularly.