All Projects → ottomatica → Slim

ottomatica / Slim

Licence: apache-2.0
Build and run tiny vms from Dockerfiles. Small and sleek.

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
Dockerfile
14818 projects
Mustache
554 projects

Projects that are alternatives of or similar to Slim

Demo
Easy to use KubeVirt demo based on minikube.
Stars: ✭ 88 (-95.37%)
Mutual labels:  virtualization
Keylime
A CNCF Project to Bootstrap & Maintain Trust on the Edge / Cloud and IoT
Stars: ✭ 128 (-93.27%)
Mutual labels:  virtualization
Maruos
Your phone is your PC.
Stars: ✭ 1,814 (-4.63%)
Mutual labels:  virtualization
Os Autoinst
OS-level test automation
Stars: ✭ 99 (-94.79%)
Mutual labels:  virtualization
Asm
Assembly Tutorial for DOS
Stars: ✭ 125 (-93.43%)
Mutual labels:  virtualization
Napoca
Lightweight type-1 hypervisor offering a foundation for building advanced security-focused functionality.
Stars: ✭ 135 (-92.9%)
Mutual labels:  virtualization
Hyperwin
A native hypervisor designed for the Windows operating system
Stars: ✭ 80 (-95.79%)
Mutual labels:  virtualization
Core
Eru, a simple, stateless, flexible, production-ready orchestrator designed to easily integrate into existing workflows. Can run any virtualization things in long or short time.
Stars: ✭ 147 (-92.27%)
Mutual labels:  virtualization
React Virtual
⚛️ Hooks for virtualizing scrollable elements in React
Stars: ✭ 2,369 (+24.55%)
Mutual labels:  virtualization
Grid
Declarative React Canvas Grid primitive for Data table, Pivot table, Excel Worksheets and more 💥
Stars: ✭ 573 (-69.87%)
Mutual labels:  virtualization
Vermin
The smart virtual machines manager. A modern CLI for Vagrant Boxes.
Stars: ✭ 110 (-94.22%)
Mutual labels:  virtualization
Virt86
x86 virtualization abstraction framework
Stars: ✭ 126 (-93.38%)
Mutual labels:  virtualization
Osx Kvm
Run macOS on QEMU/KVM. With OpenCore + Big Sur + Monterey support now! Only commercial (paid) support is available now to avoid spammy issues. No Mac system is required.
Stars: ✭ 12,926 (+579.6%)
Mutual labels:  virtualization
Karesansui
Karesansui is an open-source virtualization management application made in Japan.
Stars: ✭ 97 (-94.9%)
Mutual labels:  virtualization
Vic Product
vSphere Integrated Containers enables VMware customers to deliver a production-ready container solution to their developers and DevOps teams.
Stars: ✭ 143 (-92.48%)
Mutual labels:  virtualization
Training Material
A collection of code examples as well as presentations for training purposes
Stars: ✭ 85 (-95.53%)
Mutual labels:  virtualization
Neko
A self hosted virtual browser (rabb.it clone) that runs in docker.
Stars: ✭ 1,957 (+2.89%)
Mutual labels:  virtualization
Containers
Lightweight containers using Linux user namespaces
Stars: ✭ 153 (-91.96%)
Mutual labels:  virtualization
Appvm
Nix-based app VMs
Stars: ✭ 146 (-92.32%)
Mutual labels:  virtualization
V86
x86 virtualization in your browser, recompiling x86 to wasm on the fly
Stars: ✭ 12,765 (+571.14%)
Mutual labels:  virtualization

slim | Build Status dependencies Status

slim will build a micro-vm from a Dockerfile. Slim works by building and extracting a rootfs from a Dockerfile, and then merging that filesystem with a small minimal kernel that runs in RAM.

This results in a real VM that can boot instantly, while using very limited resources. If done properly, slim can allow you to design and build immutable unikernels for running services, or build tiny and embedded development environments.

Using slim

Build a micro-vm

Create a micro-vm from a Dockerfile. Use build command with a directory containing a Dockerfile.

$ slim build images/alpine3.8-simple

build

This will add a bootable iso in the slim registry. See example Dockerfile.

slim build will use your default provider unless the -p flag is specified (ie -p hyperkit).

Listing micro-vm images

See a list of micro-vm images on your machine.

$ slim images

images command

Running a micro-vm

Provision a new instance of the given micro-vm image as a virtual machine.

Slim currently supports Virtualbox, KVM, and hyperkit (MacOS only) as providers for running VMs. Slim will discover all available providers, defaulting to virtualbox, if more than one provider is available. The -p flag can be used to force Slim to use a specific provider.

Using hyperkit (requires sudo):

$ slim run micro1 alpine3.8-simple -p hyperkit

nanobox

Using virtualbox:

$ slim run micro2 alpine3.8-simple

nanobox

VirtualBox will run the micro-vm instance as an attached iso loaded into a cdrom, and boot up the iso in seconds.

For convenience, a ssh connection command is provided at the end of the command, allowing easy access into the machine:

Example: ssh -i /Users/cjparnin/.slim/baker_rsa [email protected] -p 2008 -o StrictHostKeyChecking=no

Advanced Features

Build formats

Slim supports building multiple image formats, but by default will only build the image required for the given provider. The -f flag can be used to specify any additional image formats that should be built, which will be stored in the registry directory for that image. The currently supported formats and their corresponding providers are:

raw iso qcow2
kvm
hyperkit
virtualbox
  • The raw format signifies an unbundled ramfs archive and kernel.

Example: running slim build images/alpine3.8-simple -p kvm -f qcow2 will build a raw image (KVM's default image format), as well as a qcow2 image.

Shared Folders

Slim will automatically mount / at /host and cwd (ie the directory where you run the slim run command) at /slim within the VM. This automounting can be disabled by passing the --sync=no option in the slim run command. The example alpine3.8-simple and ubuntu16.04-simple images illustrate how to support mounting within the image, and is documented here.

Build and run parameters

  • Using slim build <image> --no-cache will skip the docker build cache, allowing you to repair stale apt-get caches, for example.
  • Using slim run v0 ubuntu16.04-jenkins --memory 4096 --cpus 2 will allow you allocate more memory and cpus to your instance.

Managing vms and images

  • You can get a list of vms with slim vms.
  • Force shutdown of a vm. slim stop micro1 (Note: for hyperkit, this will be the equivalent of delete.)
  • You can delete a specific vm called "v0" with slim delete vm v0
  • You can delete a specific image in registry called "ubuntu" with slim delete image ubuntu
  • You can clean out the entire image registry with slim clean.

Extending base images (experimental)

Instead of having to copy and extend an existing Dockerfile, we're experimenting with a reuse pattern that lets you reference an existing base image hosted in a git repository, and extend it by passing in build arguments. For example, by defining this in an info.yml, you could extend the base alpine3.9 image with ansible and runc.

description: A simple configuration server with ansible and runc (for running containers).
base_repository: https://github.com/ottomatica/slim
base_directory: images/alpine3.9-simple
base_args:
  PKGS: runc ansible

Example micro-vms

A collection of micro-vms can be found here, including ubuntu base images, jenkins, kubenetes, and more: https://github.com/ottomatica/slim-images

Installing slim

Simply clone this repo and run:

npm install
npm link

Unfortunately, due to the experimental nature, there are a few system dependencies you must also install:

  • docker, for building and extracting the kernel and filesystem.
  • cdrtools: brew install cdrtools, for building the micro-vm iso.

To boot and run the image, you also need a hypervisor:

For kvm, you can install the following dependencies for ubuntu:

sudo apt-get install qemu-kvm libvirt-bin virtinst bridge-utils cpu-checker mkisofs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].