sysml / clickos

The Click modular router: fast modular packet processing and analysis
http://www.read.cs.ucla.edu/click/
Other
136 stars 35 forks source link

ClickOS failed to run on Xen+Ubuntu 14.04.2 #10

Closed shashibici closed 9 years ago

shashibici commented 9 years ago

Hi,

Recently, I am trying to make ClickOS run on Xen hypervisor with Ubuntu-14.04-64bits LTS desktop as Dom0. But I cannot work it out.

I have made it work on Debian-7.8-64bits. Seems it runs perfectly on Debian. Just wondering whether the toolchain and clickos is compatible with Ubuntu? Did you ever make it work on Ubuntu?

A very similar problem is here: https://github.com/cnplab/cosmos/issues/3 I encoutered the same thing on Debian, but I made it work by following the instructions discussed in that issue. It is the "cosmos make DOMLIB=xl" that matters. For Ubuntu, it did not work.

In Ubuntu, I do exactly the way I did on Debian:

1) Install Ubuntu 14.04 desktop as host. 2) Download Xen-4.4.1 source code, compile and install. 3) Reboot from Ubuntu-Xen-hypervisor with Ubuntu 14.04 as Dom0. 4) Git clickos, toolchain, cosmos, minios. 5) Make toolchain. 6) Make clickos 8) Make cosmos 9) Setup bridges for Xen. 10) xl create /home/work/clickos/minios/config.xen (This point, xl list shows clickos -b----. ) 11) /home/work/cosmos/dist/bin/cosmos start $DOMID /home/work/clickos/minios/rule.click (This point, xl list show clickos -b---- .) 12) xl console $DOMID ($DOMID set correctly.)

After that the output is as following:

Xen Minimal OS! start_info: 0x2ef000(VA) nr_pages: 0xc00 shared_inf: 0x380fa000(MA) pt_base: 0x2f2000(VA) nr_pt_frames: 0x5 mfn_list: 0x2e9000(VA) mod_start: 0x0(VA) mod_len: 0 flags: 0x0 cmd_line: stack: 0x241f40-0x261f40 MM: Init _text: 0x0(VA) _etext: 0xecd06(VA) _erodata: 0x16a000(VA) _edata: 0x16bb98(VA) stack start: 0x241f40(VA) _end: 0x2e8010(VA) start_pfn: 2fa max_pfn: c00 Mapping memory range 0x400000 - 0xc00000 setting 0x0-0x16a000 readonly skipped 0x1000 MM: Initialise page allocator for 2fe000(2fe000)-c00000(c00000) MM: done Demand map pfns at c01000-2000c01000. Heap resides at 2000c02000-4000c02000. Initialising timer interface Initialising console ... done. gnttab_table mapped at 0xc01000. Initialising scheduler Thread "Idle": pointer: 0x2000c02050, stack: 0x310000 Thread "xenstore": pointer: 0x2000c02800, stack: 0x320000 xenbus initialised on irq 1 mfn 0x294b8 Thread "shutdown": pointer: 0x2000c02fb0, stack: 0x330000 Dummy main: start_info=0x261f40 Thread "main": pointer: 0x2000c03760, stack: 0x340000 sparsing 0MB at 17e000 "main"

It is blocked here. xl list still shows clickos with status -b----.

config.xen

kernel = './minios/build/clickos_x86_64' vcpus = '1'

cpus = '2'

memory = '40' vif = ['mac=00:15:17:15:5d:74,bridge=xenbr0'] name = 'click0' on_crash = 'preserve'

rule.click

define ($MACARP 00:15:17:15:5d:74) define ($IP 172.16.97.81) in :: FromDevice(); out :: ToDevice(); c :: Classifier( 12/0806 20/0001, // ARP request 12/0800, -); arpr :: ARPResponder($IP $MACARP) in -> c; c[0] -> arpr -> out; c[1] -> CheckIPHeader(14) -> Print("start") -> Discard(); c[2] -> Discard();

Many thanks!

--Hongda.