L1VM - OSv

I did write new build scripts for the OSv containers in the L1VM repository. With the scripts you can create the OSv unikernel images, saved as a .qcow2 image file. The images can be run on for example a server to have a simple web server running.

If you get an error message while running the build script about the unsupported file flags of “vnc-domain-socket”, then do this:

$ rm vnc-domain-socket
$ touch vnc-domain-socket

And run the build script again.

The .qcow2 file which will be created is in: ~/.capstan/instances/qemu/l1vm/

Update

I did separate the examples paths in the ~/.capstan/repository folder. So each of them gets it own folder.

Now I have the problem that the image builds but can’t run anymore. Because the command line to start l1vm is not set right. Here is the build:

Downloading osv.bootstrap.yaml... from https://github.com/cloudius-systems/osv/releases/download/v0.57.0/osv.bootstrap.yaml
112 B / 112 B [--------------------------------------------------] 100.00% ? p/s
Downloading osv.bootstrap.mpm... from https://github.com/cloudius-systems/osv/releases/download/v0.57.0/osv.bootstrap.mpm.x86_64
58.50 KiB / 58.50 KiB [------------------------------------------] 100.00% ? p/s
Command line will be set based on config_set_default attribute of meta/run.yaml
Resolved runtime into: native
extractPackageContent: osv.bootstrap
Importing l1vm-webserver-thr...
Importing into /home/stefan/.capstan/repository/l1vm-webserver-thr/l1vm-webserver-thr.qemu
Uploading files to /home/stefan/.capstan/repository/l1vm-webserver-thr/l1vm-webserver-thr.qemu...
Setting cmdline: --console=serial --norandom --nomount --noinit --preload-zfs-library /tools/mkfs.so; /tools/cpiod.so --prefix /zfs/zfs; /zfs.so set compression=off osv
qemu-system-x86_64: warning: Deprecated CPU topology (considered invalid): CPU topology parameters must be greater than zero
Uploading files  <-----------------------------------------------> ? p/s 100.00%
Command line set to: 'runscript /run/default;'
running OSv image using qemu...
Command line will be set to default boot
Created instance: l1vm-webserver-thr
Setting cmdline: runscript /run/default;
OSv v0.57.0
eth0: 192.168.122.15
Booted up in 167.60 ms
Cmdline: runscript /run/default;
Failed to open runscript file '/run/default'.
Failed to parse command line.

This is the meta/run.yaml file:


runtime: native

config_set:

   ################################################################
   ### This is one configuration set (feel free to rename it).  ###
   ################################################################
   default:
      # REQUIRED
      # Command to be executed in OSv.
      # Note that package root will correspond to filesystem root (/) in OSv image.
      # Example value: /usr/bin/simpleFoam.so -help
      bootcmd: /l1vm-osv.so webserver-thread-local

   # Add as many named configurations as you need

# OPTIONAL
# What config_set should be used as default.
# This value can be overwritten with --runconfig argument.
config_set_default: default

So the boot command should be set. What is the error here? If you know it then contact me please. Thanks!