mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 10:09:07 +00:00
A toolkit for building secure, portable and lean operating systems for containers
Passing accel=kvm:tcg causes it to try KVM first if available with a fallback to TCG (emulated/JIT mode) if it is not available. With this the boot logs gain: +Hypervisor detected: KVM and also -Booting paravirtualized kernel on bare hardware +Booting paravirtualized kernel on KVM Among various other noise. If I rename my host /dev/kvm then this is reversed, although with the following message: Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or directory Back to tcg accelerator. Q35 is a more modern emulated platform based on the ICH9 host chipset rather than the default "pc" I440FX (Pentium Pro / Pentium II era) emulation. See http://wiki.qemu-project.org/Features/Q35 for more info. Switching to Q35 is not a requirement for enabling KVM but seemed like a reasonable change. Signed-off-by: Ian Campbell <ian.campbell@docker.com> |
||
---|---|---|
base | ||
docs | ||
ebpf | ||
kernel | ||
pkg | ||
reports | ||
scripts | ||
tools | ||
vendor | ||
.datakitci.json | ||
.gitignore | ||
config.go | ||
main.go | ||
Makefile | ||
moby.yaml | ||
output.go | ||
README.md | ||
test.yaml | ||
vendor.conf |
Moby
Moby, a toolkit for custom Linux distributions
Getting Started
Build
Simple build instructions: use make
to build.
This will build the Moby customisation tool and a Moby initrd image.
Requirements:
- GNU
make
- GNU or BSD
tar
(not Busybox tar) - Docker
Booting and Testing
make qemu
will boot up a sample Moby in qemu in a container- on OSX:
make hyperkit
will boot up Moby in hyperkit, and also download hyperkit and vpnkit binaries for later use make test
ormake hyperkit-test
will run the test suite
Customise
To customise, copy or modify the moby.yaml
to your own file.yaml
and then run ./bin/moby file.yaml
to
generate its specified output. You can run the output with ./scripts/qemu.sh
or ./scripts/hyperkit.sh
.
Yaml Specification
The Yaml format is loosely based on Docker Compose:
kernel
specifies a kernel Docker image, containing a kernel and a filesystem tarball, eg containing modules.mobylinux/kernel
is built fromkernel/
init
is the baseinit
process Docker image, which is unpacked as the base system, containinginit
,containerd
,runc
and a few tools. Built frombase/init/
system
are the system containers, executed sequentially in order. They should terminate quickly when done.daemon
is the system daemons, which normally run for the whole timefiles
are additional files to add to the imageoutputs
are descriptions of what to build, such as ISOs.
For the images, you can specify the configuration much like Compose, with some changes, eg capabilities
must be specified in full, rather than add
and drop
, and
there are no volumes only binds
.
The config is liable to be changed, eg there are missing features (specification of kernel command line, more options etc).