Drivers
Overview
Koble uses a modular driver system allowing different backends to be used to run virtual machines and networks. Currently the available drivers are podman and uml. The podman driver uses Podman rootless containers as virtual machines. The uml driver uses User Mode Linux instances.
Podman
The podman driver uses rootless containers as virtual machines. This provides a low level of virtualisation as these machines are just isolated processes running on the same host. This provides the benefit of speed compared as there is no translation of running code for virtualisation, and no need for running a separate kernel to the host.
The current podman driver relies on the Podman API server running at an accessible endpoint. This can be run manually with:
Setup
If you have followed the installation guide these steps will already be completed |
This driver requires Podman to be installed. Version 3.4 or higher is recommended.
podman --log-level=info system service
However the easier way to run this is with systemd socket activation:
systemctl --user start podman
Configuration
driver:
name: podman
podman:
uri: "unix://run/user/1000/podman/podman.sock"
default_image: "koble/debian"
-
uri - The address of the podman api server.
-
default_image - The default container image to use for machines.
Using a remote instance of Podman will not work properly due to a bug with creating Podman networks. As a current workaround, Koble creates cni networks on disk manually. This will be resolved once Podman issue 12990 is fixed. |
User Mode Linux
The uml driver uses User Mode Linux instances to run virtual machines. This provides lightweight isolation, with each virtual machine having a separate kernel. This allows more system level tweaking (e.g. sysctl) than what is available/easy with containers, whilst being less resource intensive than traditional full virtualisation methods.
The uml driver runs instances within Podman containers to allow for full rootless networking, attach/detach functionality, easier instance management etc.
Setup
If you have followed the installation guide these steps will already be completed |
-
Download the UML filesystem to ~/.local/share/uml/images/koble-fs
-
Download the UML kernel to ~/.local/share/uml/kernel/koble-kernel
Configuration
driver:
name: uml
uml:
storage_dir: ~/.local/share/uml
kernel: koble-kernel
default_image: koble-fs
-
storage_dir - The base directory for UML filesystems, overlay images and kernel binaries.
-
kernel - The name of the kernel binary within the $STORAGE_DIR/kernel/ directory.
-
default_image - The name of the filesystem image within the $STORAGE_DIR/images/ directory.