1 \documentclass{article}[11pt]
10 \def\colfigsize{\epsfxsize=5in}
15 \setlength\topmargin{0in}
16 \setlength\evensidemargin{0in}
17 \setlength\oddsidemargin{0in}
18 \setlength\textheight{8.0in}
19 \setlength\textwidth{6.5in}
21 \title{Building a bootable guest image for Palacios and Kitten}
26 \section{Getting the guest image build tools}
28 In order to build the bootable guest iso image, we need to build a Linux kernel
29 image from source and an initial file system containing a set of useful binary
30 files which will be described in the following text. We will use a new directory
31 for demonstration; the root directory for the following examples is
41 There are a set of tools and sources that are useful for the guest image
42 building procedure. You can checkout these resources from our git repositories;
43 to check them out to your local \verb+test/+ directory use the following
47 git clone http://hornet.cs.northwestern.edu:9005/busybox
48 git clone http://hornet.cs.northwestern.edu:9005/initrd
49 git clone http://hornet.cs.northwestern.edu:9005/linux-2.6.30.y
52 \section{Building the ramdisk filesystem}
54 % Introductory text explaining why a ramdisk filesystem is necessary, and a
55 % small blurb about what it is. Mostly this is necessary because the
56 % introduction said that the "useful binary files" would be described.
58 Jack has made an initial ramdisk system that you can leverage. The file is
59 temporarily in the directory
60 \verb|/home/jarusl/initrd/disks/v3vee_initramfs.tar.gz| on the
61 newskysaw machine. If you require a custom initial ramdisk, copy the directories
62 and files that you require into the \verb+initramfs+/ directory. For minimal
63 device support, copy theses devices into the \verb+initramfs/dev/+ directory:
64 console, ram, null, tty (you probably need root privilege to copy and make the
72 \colfigsize\epsffile{busyboxConf1.eps}
73 \caption{BusyBox configuration}
74 \label{fig:busyboxcf1}
80 \colfigsize\epsffile{busyboxConf2.eps}
82 \caption{BusyBox configuration}
83 \label{fig:busyboxcf2}
86 \section{Configuring and installing BusyBox tools}
88 BusyBox is a software application released as Free software under the GNU GPL
89 that provides many standard Unix tools. BusyBox combines tiny versions of many
90 common UNIX utilities into a single small executable. For more details on
91 BusyBox, visiting \url{http://busybox.net}. To configure BusyBox, in the
92 \verb+busybox/+ directory, type the following:
101 make xconfig (X version)
106 You can add the tools you need into the guest image. There are two required
107 configuration options: in ``\verb|BusyBox settings->Build Options|", check the
108 ``\verb|Build BusyBox as a static binary|" option, and in
109 ``\verb|BusyBox settings->Installation Options|", set the
110 ``\verb|Busybox installation prefix|" to the path of your \verb|initramfs|
111 directory, as shown in figure \ref{fig:busyboxcf2}. After you finish configuring
112 BusyBox, save your configuration and quit the window. Then, to make the BusyBox
113 tools, type the following:
118 Install the tools to your initial ramdisk directory:
125 \colfigsize\epsffile{linuxConf.eps}
127 \caption{Linux Kernel configuration}
132 \section{Configuring and compiling the Linux kernel}
134 Change to the \verb|linux-2.6.30.y/| directory (or whatever your Linux kernel
135 source directory is named) and type the following:
142 make xconfig (X version)
147 Configure the kernel to meet your requirements. There is a custom configuration
148 file \verb|jrl-default-config| which is configured with minimal kernel options
149 (all unnecessary options are removed to keep the guest booting process fast).
150 For more on configuring and compiling Linux kernel images, check online.
154 The kernel must be configured with the initial ramdisk file system directory
155 (e.g. \verb|initrd/initramfs|): in the ``\verb|General setup|" menu under
157 ``\verb|Initial RAM filesystem and RAM disk support|" set the
158 ``\verb|Initramfs source file(s)|" option to the path of your \verb|initramfs|
159 directory as shown in figure \ref{fig:linuxcf}. When you are finished
160 configuring the kernel, save your configuration, and type the following:
164 Some blurb about where the kernel image is...
167 \section{Configuring guest devices}
169 Checkout the updated Palacios repository to \verb|palacios/|. (You can find
170 instructions for checking out the Palacios and Kitten repositories at
171 \url{http://www.v3vee.org/palacios/}). To build the guest VM creator tool,
172 change to the \verb|palacios/utils/guest_creator| directory and type the
181 You will get the \verb|build_vm| executable. The guest configuration file uses
182 XML. A sample configuration file is provided: \verb|default.xml|.
186 ***Various information about how to configure the VM.***
190 Once you have configured the VM, type the following to build the full guest VM
193 ./build_vm myconfig.xml -o guest.iso
195 where \verb+myconfig.xml+ is your guest configuration file, and \verb+guest.iso+
196 is the output image file that will be used to configure kitten in the next
205 \colfigsize\epsffile{kittenConf1.eps}
207 \caption{Kitten configuration}
213 \colfigsize\epsffile{kittenConf2.eps}
215 \caption{Kitten configuration}
216 \label{fig:kittencf2}
220 \section{Configuring and building Palacios and Kitten}
221 \subsection*{Configuring and building Palacios}
223 You can find the detailed manual of getting and building Palacios and Kitten
224 from scratch in the Palacios website (\url{http://www.v3vee.org/palacios}). Here
225 we only give the specific requirements related to the booting guest procedure.
226 To configure Palacios, in the Palacios root directory (i.e. \verb+palacios/+)
239 When you have configured the components you want to build into Palacios type
252 Once the Palacios static library has been built you can find the library file
253 \verb+libv3vee.a+ in the Palacios root directory.
255 \subsection*{Configuring and building Kitten}
257 To build Kitten, first configure it in as you did Palacios. Change to the
258 \verb+kitten/+ directory and type the following:
270 Under the ``\verb|Virtualization|" menu select the
271 ``\verb|Include Palacios virtual machine monitor|" option. Set the
272 ``\verb|Path to pre-built Palacios tree|" option to the path of your Palacios
273 build, and set the ``\verb|Path to guest ISO image|" option to the path
274 containing the guest image that was built in the Configuring guest devices
275 section of this manual.
279 After configuring Kitten, to build Kitten, type the following:
287 This builds the bootable ISO image file with guest OS, Palacios and Kitten.
288 The ISO file is located in \verb+kitten/arch/x86_64/boot/image.iso+.
292 You have successfully created a guest CD image file that can be booted on a
293 machine. You can boot the file on Qemu using the following sample command:
296 /opt/vmm-tools/qemu/bin/qemu-system-x86_64 \
299 -serial file:./serial.out \
300 -cdrom kitten/arch/x86_64/boot/image.iso \
306 We have finished the entire procedure for building a guest image and booting it
307 on the Palacios VMM. For more updated details, check the Palacios website
308 \url{http://www.v3vee.org/palacios} and Kitten website
309 \url{https://software.sandia.gov/trac/kitten} regularly.