virgo – the linux unikernel runner
Everyone is talking about unikernels today and the magical things they can do.
Unikernels are ultra light-weight secure applications cross-compiled to virtual machines. That is – they don’t run linux, but they can run *on* linux. They are coupled with drivers to talk to the disk and network and that’s about it along with your app code.
They’re similar to RTOS’s like the one on the Mars Rover but they run ordinary web application software designed for intel x86 in the datacenter – it doesn’t need to run on a different planet.
Beacuse of security and because of performance.
Unikernels are single process systems by design so they completely thwart shell code exploits and most remote code execution problems by design. They can also be faster than native software simply because they have less context switching. When you couple with PCI passthrough we’re talking about performance better than what you could get on ‘bare metal’.
There are tons of articles and presentations out there on what unikernels are but very little on how you can run them today on your very own laptop – no cloud required. So if you want to run unikernels but you don’t now how this article is for you. This article assumes you are running Linux (or at least some bastardized form of BSD :).
Just to get a hello world example running download the local unikernel runner virgo and grab an account to get a pre-built unikernel.
Slightly Longer Web Start:
If you want to learn how to build your own unikernels you can take the longer route via this path.
Sign up for a free account at https://deferpanic.com .
Cut/Paste your token in ~/.dprc.
Watch the demo video @ https://youtu.be/P8RUrx4jE5A .
Fork/Compile/Run a unikernel on deferpanic and then run it locally.
To get going you just need to install the virgo unikernel runner:
go get github.com/deferpanic/dpcli/dpcli go install github.com/deferpanic/dpcli/dpcli go install echo "mytoken" > ~/.dprc
Pull a Unikernel Project:
Pull will yank down unikernel projects from the only unikernel hub out there in use. This allows you to run existing unikernels with ease and not have to compile your own if you don’t want to. It also allows you to share unikernels you have built yourself and works with any unikernel implementation.
virgo pull html
Run a Unikernel Project:
This is the part you were looking for – run a unikernel on your own laptop. It’s literally this easy.
virgo run html
Kill a local Unikernel Project:
Want to stop running that unikernel? Kill it with one command.
virgo kill html
Fetch the log for the Unikernel Project:
Trying to figure out what is wrong with your unikernel? Grab the logs from this handy command.
virgo log html
List all Unikernels that are Installed:
You can easily build up a library of unikernels that you are working with locally. Grep for your favorites here.
List the Running Unikernels:
Not sure what is running locally? Grab the process list of unikernels that are currently running.
Remove a local Unikernel Project:
Ready to delete that hello world project and move onto something better? Go ahead and reclaim that disk space with a simple ‘rm’ command.
virgo rm html