mato / docker-unikernel-runner Goto Github PK
View Code? Open in Web Editor NEWProvides a platform to experiment with using Docker to build, distribute and run unikernels.
License: ISC License
Provides a platform to experiment with using Docker to build, distribute and run unikernels.
License: ISC License
Is this unikernel runner built specifically for MirageOS or can it be modified to run OSv unikernels?
Thanks!
Both Mirage/unix and Mirage/Solo5 on ukvm currently use a freshly-generated random (locally administered, unicast) MAC address for each run of the unikernel. If several unikernels are started and stopped in series, the Docker-allocated IP address is re-used for each run, but with a different MAC address. If this happens before the host times out its ARP entry for thid IP address then connectivity will be delayed until the ARP entry is updated, potentially causing TCP connections to the unikernel to time out.
Possible solution: Save the container-side eth0
MAC address, replace it with a randomly-generated one and pass the saved address to the unikernel. May not be 100% reliable due to the "change of address" resulting in DAD or other undesirable communication from the container-side Linux network stack.
This is not a real issue but more like a design question. Why do you use a C binary to manage the networking? Last night I was determined to get the tap interface running in the vanilla alpine container without any C binary, just with scripting, and I got it running with this script (no packages required):
IP=$(ip -o -f inet address show eth0 | awk '{print $4}')
ip address delete $IP dev eth0
tunctl -t tap0
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 tap0
ifconfig br0 up
ifconfig tap0 up
/my-unikernel --interface tap0 --ipv4 $IP
Of course you also have to start the container with --device=/dev/net/tun:/dev/net/tun --cap-add=NET_ADMIN
.
Is there any disadvantage doing it like that?
Thanks
Sven
Hi,
at the moment I'm not able to run my unikernel inside the docker container in unix mode (built and run with unix hypervisor). The error I constantly get when I run /runtime/runner unix /unikernel/mir-console
is:
error: execv: not foundernel/mir-console failed: No such file or directory
After the first try, if I launch the same command again, I receive permanently the following error:
No AF_INET address found on veth
error: Unable to determine IP address of eth0
After that point, I have to shutdown the docker container and restart it.
Let me add that I have anyway modified the Dockerfile.runner and Dockerfile.runner-build so that the base image I'm using is an ARM debian:jessie (I had problems with the alpine image given that it doesn't run glibc but musl) and the ENTRYPOINT is /bin/sh
. Technically my unikernel should be good to go considering that all the necessary libraries are located and there are no apparent issues. The followign is the output of ldd
command:
ldd /unikernel/mir-console
linux-vdso.so.1 (0x7ef43000)
libz.so.1 => /lib/arm-linux-gnueabihf/libz.so.1 (0x76f29000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76f05000)
libgmp.so.10 => /lib/libgmp.so.10 (0x76e93000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e1f000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76e0c000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d1c000)
/lib/ld-linux-armhf.so.3 (0x54b04000)
I believe that there is something wrong with the runner
, given also the inconsistent error message prompted after subsequent executions. But that's just a guess.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.