1 \documentclass{article}[11pt]
9 \def\colfigsize{\epsfxsize=5in}
14 \setlength\topmargin{0in}
15 \setlength\evensidemargin{0in}
16 \setlength\oddsidemargin{0in}
17 \setlength\textheight{8.0in}
18 \setlength\textwidth{6.5in}
20 \title{Building a bootable guest image for Palacios and Kitten}
25 \section{Getting the guest image build tools}
27 In order to build the bootable guest iso image, we need to build a Linux kernel
28 image from source and an initial file system containing a set of useful binary
29 files which will be described in the following text. We will use a new directory
30 for demonstration; the root directory for the following examples is
40 There are a set of tools and sources that are useful for the guest image
41 building procedure. You can checkout these resources from our git repositories;
42 to check them out to your local \verb+test/+ directory use the following
46 git clone http://hornet.cs.northwestern.edu:9005/busybox
47 git clone http://hornet.cs.northwestern.edu:9005/initrd
48 git clone http://hornet.cs.northwestern.edu:9005/linux-2.6.30.y
51 \section{Building the ramdisk filesystem}
53 % Introductory text explaining why a ramdisk filesystem is necessary, and a
54 % small blurb about what it is. Mostly this is necessary because the
55 % introduction said that the "useful binary files" would be described.
57 Jack has made an initial ramdisk system that you can leverage. The file is
58 temporarily in the directory
59 \verb|/home/jarusl/initrd/disks/v3vee_initramfs.tar.gz| on the
60 newskysaw machine. If you require a custom initial ramdisk, copy the directories
61 and files that you require into the \verb+initramfs+/ directory. For minimal
62 device support, copy theses devices into the \verb+initramfs/dev/+ directory:
63 console, ram, null, tty (you probably need root privilege to copy and make the
70 \begin{figure}[h]\begin{center}\colfigsize\epsffile{busyboxConf1.eps}\end{center}\caption{BusyBox configuration}\label{fig:busyboxcf1}\end{figure}
76 \begin{figure}[h]\begin{center}\colfigsize\epsffile{busyboxConf2.eps}\end{center}\caption{BusyBox configuration}\label{fig:busyboxcf2}\end{figure}
81 \section{Configuring and installing BusyBox tools}
83 BusyBox is a software application released as Free software under the GNU GPL
84 that provides many standard Unix tools. BusyBox combines tiny versions of many
85 common UNIX utilities into a single small executable. For more details on
86 BusyBox, visiting http://busybox.net. To configure BusyBox, in the
87 \verb+busybox/+ directory, type the following:
96 make xconfig (X version)
101 You can add the tools you need into the guest image. There are two required
102 configuration options: in ``\verb|BusyBox settings->Build Options|", check the
103 ``\verb|Build BusyBox as a static binary|" option, and in
104 ``\verb|BusyBox settings->Installation Options|", set the
105 ``\verb|Busybox installation prefix|" to the path of your \verb|initramfs|
106 directory, as shown in figure \ref{fig:busyboxcf2}. After you finish configuring
107 BusyBox, save your configuration and quit the window. Then, to make the BusyBox
108 tools, type the following:
112 Install the tools to your initial ramdisk directory:
118 \begin{figure}[h]\begin{center}\colfigsize\epsffile{linuxConf.eps}\end{center}\caption{Linux Kernel configuration}\label{fig:linuxcf}\end{figure}
122 \section{Configuring and compiling the Linux kernel}
124 Change to the \verb|linux-2.6.30.y/| directory (or whatever your Linux kernel
125 source directory is named) and type the following:
132 make xconfig (X version)
137 Configure the kernel to meet your requirements. There is a custom configuration
138 file \verb|jrl-default-config| which is configured with minimal kernel options
139 (all unnecessary options are removed to keep the guest booting process fast).
140 For more on configuring and compiling Linux kernel images, check online.
144 The kernel must be configured with the initial ramdisk file system directory
145 (e.g. \verb|initrd/initramfs|): in the ``\verb|General setup|" menu under
147 ``\verb|Initial RAM filesystem and RAM disk support|" set the
148 ``\verb|Initramfs source file(s)|" option to the path of your \verb|initramfs|
149 directory as shown in figure \ref{fig:linuxcf}. When you are finished
150 configuring the kernel, save your configuration, and type the following:
154 Some blurb about where the kernel image is...
159 \section{Configuring guest devices}
161 % Can we make this a true hyperlink?
162 Checkout the updated Palacios repository to \verb|palacios/|. (You can find
163 instructions for checking out the Palacios and Kitten repositories at
164 http://www.v3vee.org/palacios/). To build the guest VM creator tool, change to
165 the \verb|palacios/utils/guest_creator| directory and type the following:
173 You will get the \verb|build_vm| executable. The guest configuration file uses
174 XML. A sample configuration file is provided: \verb|default.xml|.
178 ***Various information about how to configure the VM.***
182 Once you have configured the VM, type the following to build the full guest VM
185 ./build_vm myconfig.xml -o guest.iso
187 where \verb+myconfig.xml+ is your guest configuration file, and \verb+guest.iso+
188 is the output image file that will be used to configure kitten in the next
195 \begin{figure}[h]\begin{center}\colfigsize\epsffile{kittenConf1.eps}\end{center}\caption{Kitten configuration}\label{fig:kittencf}\end{figure}
201 \begin{figure}[h]\begin{center}\colfigsize\epsffile{kittenConf2.eps}\end{center}\caption{Kitten configuration}\label{fig:kittencf2}\end{figure}
206 \section{Configuring and building Palacios and Kitten}
207 \subsection*{Configuring and building Palacios}
209 You can find the detailed manual of getting and building Palacios and Kitten
210 from scratch in the Palacios website (http://www.v3vee.org/palacios). Here we
211 only give the specific requirements related to the booting guest procedure. To
212 configure Palacios, in the Palacios root directory (i.e. \verb+palacios/+) type
224 When you have configured the components you want to build into Palacios type
236 Once the Palacios static library has been built you can find the library file
237 \verb+libv3vee.a+ in the Palacios root directory.
239 \subsection*{Configuring and building Kitten}
241 To build Kitten, first configure it in as you did Palacios. Change to the
242 \verb+kitten/+ directory and type the following:
253 Under the ``\verb|Virtualization|" menu select the
254 ``\verb|Include Palacios virtual machine monitor|" option. Set the
255 ``\verb|Path to pre-built Palacios tree|" option to the path of your Palacios
256 build, and set the ``\verb|Path to guest ISO image|" option to the path
257 containing the guest image that was built in the Configuring guest devices
258 section of this manual.
262 After configuring Kitten, to build Kitten, type the following:
269 This builds the bootable ISO image file with guest OS, Palacios and Kitten.
270 The ISO file is located in \verb+kitten/arch/x86_64/boot/image.iso+.
274 You have successfully created a guest CD image file that can be booted on a
275 machine. You can boot the file on Qemu using the following sample command:
278 /opt/vmm-tools/qemu/bin/qemu-system-x86_64 \
281 -serial file:./serial.out \
282 -cdrom kitten/arch/x86_64/boot/image.iso \
288 We have finished the entire procedure for building a guest image and booting it
289 on the Palacios VMM. For more updated details, check the Palacios website
290 \verb+http://www.v3vee.org/palacios+ and Kitten website
291 \verb+https://software.sandia.gov/trac/kitten+ regularly.