[Vm-dev] Re: Cog Rump Xen unikernel

Ben Coman btc at openinworld.com
Sat Dec 12 06:57:22 UTC 2015


Here is the recipe for my first successful build and run through to an error...
         StackVM.unikernel: could not find any display driver

This is done under 32-bit Debian 8 Jessie.
Attached is StackRumpXenUnikernelConfig.st

# Built the Rumprun Platform

$ mkdir -p cogunikernel
$ git clone http://repo.rumpkernel.org/rumprun
$ cd rumprun
$ git submodule update --init
$ CC=cc ./build-rr.sh xen
>> toolchain tuple: i486-rumprun-netbsdelf
>> cc wrapper: i486-rumprun-netbsdelf-gcc
>> installed to "/home/ben/Repos/cogunikernel/rumprun/./rumprun"


# Generated Cog VM sources

$ cd ../../cogunikernel
$ git clone https://github.com/pharo-project/pharo-vm.git
$ cd pharo-vm/image
$ ./newImage.sh
$ ./pharo-ui generator.image
     Tools > File Browser
     Filed in StackRumpXenUnikernelConfig.st
     From class comment, evaluated...
          StackRumpXenUnikernelConfig new
               generateSources; generate.


# Built the StackVM and StackVM.unikernel

$ bash build.sh


# Tested them...

$ cd ../results
$ ./StackVM
   > bash: ./StackVM: cannot execute binary file: Exec format error
   Good. That was the expected result.

$ rumprun xen -i StackVM.unikernel

   > StackVM.unikernel: could not find any display driver


# Stop unikernel machine running, from another terminal...
$ xl list
$ xl destroy rumprun-StackVM.unikernel

================

Now I basically just poked, cut and slashed the config until it could
compile and boot up the unikernel, without regard for what that may
break.  Making the VM *actually* work is bigger step that for now is
beyond me, but I'll have a bite at it.   Really my motivation in doing
this after I stumbled on the rumprun tutorial, was I wanted to crack
the seal on it to interest others capable :).   I'd be interested if
the above recipe is successful for others.

Todo:
* incorporate rumprun as an auto-built third party library, rather
than outside, perhaps using git submodule like the rump kernel already
does (if these can be nested)
* determine how to deal with different rumprun toolchains (depending
on which platform the target)
* move the baking step from the build script to the generated CMake
configuration
* determine how to deal with lack of display
* determine how an image file might be passed to the VM - maybe baking
the VM and image into a ram disk (?)

cheers -ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: StackRumpXenUnikernelConfig.st
Type: application/octet-stream
Size: 8494 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20151212/4ba57c2e/StackRumpXenUnikernelConfig.obj


More information about the Vm-dev mailing list