2 \documentclass[11pt]{article}
11 \usepackage{changebar}
15 \setlength{\textheight}{8.50in}
16 \setlength{\textwidth}{6.5in}
17 \setlength{\topmargin}{-0.3in}
18 %\setlength{\leftmargin}{2.9in}
19 %\setlength{\rightmargin}{-2.9in}
20 \setlength{\oddsidemargin}{0in}
21 \setlength{\parindent}{0.5in}
27 \includegraphics[height=1.5in]{v3vee.pdf}
28 \includegraphics[height=1.5in]{logo6.png} \\
30 Palacios Internal Developer Manual
37 This manual is written for Internal Palacios developers. It contains
38 information on how to obtain the palacios code base, how to go about
39 the development process, and how to commit those changes to the
40 mainline source tree. For in depth information on the palacios code
41 structure please see {\em An Introduction to the Palacios Virtual
42 Machine Monitor -- Release 1.0}.
48 Both Palacios and Kitten follow a hybrid development process that
49 uses both the centralized repository and distributed development
50 models. A central repository exists that holds the master version of
51 the code base. This central repository is cloned by multiple people
52 and in multiple places to support various development efforts. A
53 feature of git is that every developer actually has a fully copy of
54 the entire repository, and so can function independently until such
55 time as they need to resync with the master version.
57 There are typically multiple levels of access to the central
58 repository, that are granted based on the type of developer being
59 granted access. The three basic developer types and their access
63 \item Core Developers: These are the lead developers and are in
64 charge of managing the master repository. They have full read/write
65 access permissions to the central repository.
67 \item Internal Developers: Formal members of the development
68 team. These people are capable of pulling directly from the central
69 repository, but lack the ability to write directly to it.
71 \item External Developers: People who are not actual members of the
72 development team. These people can only access the public repository
73 which is only updated to contain the release versions.
76 Because internal and external developers cannot write directly to the
77 master repository, they need to first submit their changes to a core
78 developer before they can be added to the mainline. We will discuss
79 that process in Section~\ref{sec:submission}.
84 The central palacios repository
86 \includegraphics[height=3.5in]{dev_chart.pdf}
90 \section{Checking out Palacios}
92 Checkout or clone the devel branch of Palacios from the master
93 repository. You should have the read permission to these branches.
96 \section{Checking out Kitten}
98 hg clone /home/palacios/kitten
100 git clone /home/palacios/palacios
102 /opt/vmm-tools/bin/checkout\_branch devel
105 \section{Compiling Palacios}
109 This will build Palacios as a library, libv3vee.a in the palacios/palacios/build/.
112 \section{Compiling Kitten}
113 \subsection{Configuration}
114 Kitten building can be configured by either text or graph configure interface, which is similar to the Linux kernel configure, By one of the following commands:
120 Make sure turn on the network device driver, networking, and input kernel command 'console=serial net=rtl8139'
121 \subsection{Compilation}
123 Build Palacios as a module for Kitten
124 In the first time, make sure to build Kitten before you building the Palacios as the module to kitten.
125 Palacios now is built as a module of the Kitten. You can find the palacios.c and palacios.h in the kitten/palacios/. Enter the directory, build the palacios module.
129 cp built-in.o ../modules/palacios-mod.o
131 Go back to kitten root directory, and build the Kitten again.
135 \section{Running Palacios/Kitten}
136 Run the whole stuff built above in Qemu using following command:
138 /usr/local/qemu/bin/qemu-system-x86\_64 -smp 1 -m 1024 -serial file:./serial.out -cdrom ./arch/x86\_64/boot/image.iso -net tap, ifname=tap0 < /dev/null
143 \section{Configuring the development host's Qemu network}
144 Set up Tap interfaces:
146 /root/util/tap\_create tapX
148 Bridging tapX with eth1 will only work (work = send packet and also make packet visible on localhost) if the IP address is set correctly (correctly = match network it is connected to e.g., network of eth1) so bring up the network inside of the VM / QEMU as 10-net, and it should route through the eth1 rule and be visible both on the host and in the physical network
151 \subsection{Configuring Kitten}
153 How to set ip address in kitten:
155 Kitten ip address setting is in file drivers/net/ne2k/rtl8139.c, in the code below which is located in function rtl8139\_init.
157 struct ip\_addr ipaddr = { htonl(0 | 10 << 24 | 0 << 16 | 2 << 8 | 16 << 0) };
158 struct ip\_addr netmask = { htonl(0xffffff00) };
159 struct ip\_addr gw = { htonl(0 | 10 << 24 | 0 << 16 | 2 << 8 | 2 << 0) };
161 This sets the ip address as 10.0.2.16, netmask 255.255.255.0 and gateway address 10.0.2.2, change it as you need.
165 \subsection{Running with networking}
167 \paragraph*{Tap Interface}
168 In which, the command line:
170 -net tap, ifname=tap2
172 specifies Qemu to use the host's tap0 as its network interface, then Qemu can access the host's physical network.
174 \paragraph*{Redirection}
176 Also you can use the following command instead to redirect host's 9555 port to Qemu's 80 port.
178 -net user -net nic,model=rtl8139 -redir tcp:9555::80
180 In this case, you can access Qemu's 80 port in the host like:
182 telnet localhost 9555
184 Qemu has many options to build up a virtual or real networking. See http://www.h7.dion.ne.jp/~qemu-win/HowToNetwork-en.html for more information.
189 \section{Code Submission}
190 \label{sec:submission}
191 \subsection{Palacios}
195 For more questions, talk to Jack or Lei.