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]{palacios.pdf} \\
30 Palacios Internal Developer Manual
32 \author{Jack Lange \hspace{0.5in} Lei Xia}
37 \section{Organization}
40 \section{Checking out Palacios}
42 Checkout or clone the devel branch of Palacios from the master
43 repository. You should have the read permission to these branches.
46 \section{Checking out Kitten}
48 hg clone /home/palacios/kitten
50 git clone /home/palacios/palacios
52 /opt/vmm-tools/bin/checkout\_branch devel
55 \section{Compiling Palacios}
59 This will build Palacios as a library, libv3vee.a in the palacios/palacios/build/.
62 \section{Compiling Kitten}
63 \subsection{Configuration}
64 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:
70 Make sure turn on the network device driver, networking, and input kernel command 'console=serial net=rtl8139'
71 \subsection{Compilation}
73 Build Palacios as a module for Kitten
74 In the first time, make sure to build Kitten before you building the Palacios as the module to kitten.
75 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.
79 cp built-in.o ../modules/palacios-mod.o
81 Go back to kitten root directory, and build the Kitten again.
85 \section{Running Palacios/Kitten}
86 Run the whole stuff built above in Qemu using following command:
88 /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
93 \section{Configuring the development host's Qemu network}
94 Set up Tap interfaces:
96 /root/util/tap\_create tapX
98 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
101 \subsection{Configuring Kitten}
103 How to set ip address in kitten:
105 Kitten ip address setting is in file drivers/net/ne2k/rtl8139.c, in the code below which is located in function rtl8139\_init.
107 struct ip\_addr ipaddr = { htonl(0 | 10 << 24 | 0 << 16 | 2 << 8 | 16 << 0) };
108 struct ip\_addr netmask = { htonl(0xffffff00) };
109 struct ip\_addr gw = { htonl(0 | 10 << 24 | 0 << 16 | 2 << 8 | 2 << 0) };
111 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.
115 \subsection{Running with networking}
117 \paragraph*{Tap Interface}
118 In which, the command line:
120 -net tap, ifname=tap2
122 specifies Qemu to use the host's tap0 as its network interface, then Qemu can access the host's physical network.
124 \paragraph*{Redirection}
126 Also you can use the following command instead to redirect host's 9555 port to Qemu's 80 port.
128 -net user -net nic,model=rtl8139 -redir tcp:9555::80
130 In this case, you can access Qemu's 80 port in the host like:
132 telnet localhost 9555
134 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.
139 For more questions, talk to Jack or Lei.