Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


reorganized things, pasted in old text
[palacios.git] / manual / manual.tex
1
2 \documentclass[11pt]{article}
3
4 \usepackage{calc}
5 \usepackage{graphics}
6 %\usepackage{latex8}
7 \usepackage{times}
8 \usepackage{epsf}
9 \usepackage{epsfig}
10 \usepackage{graphicx}
11 \usepackage{changebar}
12 \usepackage{portland}
13 \usepackage{lscape}
14
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}
22
23
24 \begin{document}
25
26 \title{
27 \includegraphics[height=1.5in]{v3vee.pdf}
28 \includegraphics[height=1.5in]{palacios.pdf} \\
29 \vspace{0.5in} 
30 Palacios Internal Developer Manual
31 }
32 \author{Jack Lange \hspace{0.5in} Lei Xia}
33
34 \maketitle
35
36
37 \section{Organization}
38
39
40 \section{Checking out Palacios}
41
42 Checkout or clone the devel branch of Palacios from the master
43 repository. You should have the read permission to these branches.
44
45
46 \section{Checking out Kitten}
47
48 hg clone /home/palacios/kitten
49
50 git clone /home/palacios/palacios
51
52 /opt/vmm-tools/bin/checkout\_branch devel
53
54
55 \section{Compiling Palacios}
56 cd palacios/build/
57
58
59 This will build Palacios as a library, libv3vee.a in the palacios/palacios/build/.
60
61
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:
65
66 make xconfig
67 make config
68 make menuconfig
69
70 Make sure turn on the network device driver, networking, and input kernel command 'console=serial net=rtl8139'
71 \subsection{Compilation}
72
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.
76
77 cd kitten/palacios
78 make -C .. M=`pwd`
79 cp built-in.o ../modules/palacios-mod.o
80 Build Kitten
81 Go back to kitten root directory, and build the Kitten again.
82
83 make  isoimage
84
85 \section{Running Palacios/Kitten}
86 Run the whole stuff built above in Qemu using following command: 
87
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
89
90
91 \section{networking}
92
93 \section{Configuring the development host's Qemu network}
94 Set up Tap interfaces:
95
96 /root/util/tap\_create tapX
97
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
99
100
101 \subsection{Configuring Kitten}
102
103 How to set ip address in kitten:
104
105 Kitten ip address setting is in file drivers/net/ne2k/rtl8139.c, in the code below which is located in function rtl8139\_init.
106
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) };
110
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.
112
113
114
115 \subsection{Running with networking}
116
117 \paragraph*{Tap Interface}
118 In which, the command line: 
119
120 -net tap, ifname=tap2
121
122 specifies Qemu to use the host's tap0 as its network interface, then Qemu can access the host's physical network.
123
124 \paragraph*{Redirection}
125
126 Also you can use the following command instead to redirect host's 9555 port to Qemu's 80 port.
127
128 -net user -net nic,model=rtl8139  -redir tcp:9555::80
129
130 In this case, you can access Qemu's 80 port in the host like:
131
132 telnet localhost 9555
133
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.
135
136
137
138
139 For more questions, talk to Jack or Lei.
140
141 \end{document}