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

How to run a service chain? It can not launch the click example #24

Open zhangwei1984 opened 8 years ago

zhangwei1984 commented 8 years ago

Could anyone give some guidance how to do the VM service chain? The same experiment is clickos figure10. How should I write the click example, then make them chain together and the packets can go to the VM service chain?

Another problem is that when I compile clickos, it shows xenstore.h something header files which can not be found. After hardcoded it, it can get compiled successfully. The VM can start successfully.

Thread "shutdown": pointer: 0x2000802fb0, stack: 0x200000
Dummy main: start_info=0x198040
Thread "main": pointer: 0x2000803760, stack: 0x210000
sparsing 0MB at 177000
"main" 

But if it uses cosmos launch the click example, It does not show errors. But I can not see any happening on vm console side. It should print something. I am wondering whether other than hardcoded, should I do some extra configurations?

fmanco commented 8 years ago

Hello

About the chaining of VMs, when we wrote the ClickOS paper we used our own module for vale that allowed us to "hardwire" ports to form the chain. However that module is not open source. One quick alternative is to use multiple bridges, each with the pair of ports you want to connect.

About cosmos. Please use ClickOS-ctl. Cosmos is not compatible any more with the latest ClickOS version.

wenhuizhang commented 8 years ago

So, when mentioning latest ClickOS version, does it mean clickos v0.2 ?

zhangwei1984 commented 8 years ago

clickos-ctl does not work. Eg, if I start an vale-based vm

root@nimbnode21:/home/wei# xl list
Name                                        ID   Mem VCPUs  State   Time(s)
Domain-0                                     0 32271    24     r-----    2072.1
clickos                                     18     8     1     -b----       0.0

Then I use clickos-ctl launch vm, It shows invalid parameter

root@nimbnode21:~/clickos-ctl# ./clickos -m xenstore install -s 18  ../mirror.click 
Invalid number of arguments for command install

root@nimbnode21:~/clickos-ctl# ./clickos -m xenstore install -s clickos ../mirror.click 
Invalid number of arguments for command install
fmanco commented 8 years ago

Hi,

Indeed, there is a fix already available as a pull request https://github.com/cnplab/clickos-ctl/pull/2 but the easiest solution would be remove the -m xenstore given is anyway the default.

ClickOS control only works with the master branch of ClickOS.

zhangwei1984 commented 8 years ago

I use the master branch generate the img. But I have the same exact problem which my vm crash once I launch the app. If I do not launch the click app,

root@nimbnode21:~# xl list
Name                                        ID   Mem VCPUs  State   Time(s)
Domain-0                                     0 32271    24     r-----    2100.1
clickos                                     19     8     1     r-----      13.9
root@nimbnode21:~/clickos-ctl# ./clickos install -s clickos  ../mirror.click 
[ clickos ][ 0 ]: installed new router.
[ clickos ][ 0 ]: started router.
[on_status:205] router id 0
[on_status:206] status change to Stopped
[on_status:205] router id 0
[on_status:206] status change to Running
Thread "click": pointer: 0x2000810a00, stack: 0x350000
backend dom 0
Mapping TX rings
    0 map errors
Mapping RX rings
    0 map errors
Mapping TX buffers
    0 map errors
Mapping RX buffers
Cannot handle page request order 10!
    0 map errors
root@nimbnode21:~/clickos-ctl# xl list
Name                                        ID   Mem VCPUs  State   Time(s)
Domain-0                                     0 32271    24     r-----    2101.0
clickos                                     19     8     1     ---sc-      15.4
fmanco commented 8 years ago

Please try to assign more memory to the VM.

wenhuizhang commented 8 years ago

You mean in *.cfg file, assign , for e.g. memory = 512 (MB)?

On Thu, Mar 24, 2016 at 6:23 PM, Filipe Manco notifications@github.com wrote:

Please try to assign more memory to the VM.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/cnplab/clickos/issues/24#issuecomment-201051538

V/R,

Wenhui Zhang

Email: wenhui@gwmail.gwu.edu Telephone: 1-(703) 424 3193

fmanco commented 8 years ago

Yes, however you shouldn't need 512 MB. Usually it will be something like 16 MB. There is no method to determine how much memory is necessary, so you need to just try out.

zhangwei1984 commented 8 years ago

No, it does not work. I changed it to 64, it still gets crashed. Other tries?

fmanco commented 8 years ago

You shouldn't need that much memory, but please try with 512MB or 1GB.

wenhuizhang commented 8 years ago

Thanks @fmanco , awesome information~