kvm-host
is a minimalist type 2 hypervisor using Linux Kernel-based Virtual Machine (KVM),
capable of running Linux kernel partially.
To compile:
make
Download and build Linux kernel from scratch:
make build/bzImage
Download and build Busybox for root file system from scratch:
make rootfs
Run Linux guest with kvm-host
:
make check
build/kvm-host -k bzImage [-i initrd] [-d disk-image]
bzImage
is the path to linux kernel bzImage. The bzImage file is in a specific format,
containing concatenated bootsect.o + setup.o + misc.o + piggy.o
. initrd
is the path to
initial RAM disk image, which is an optional argument.
disk-image
is the path to disk image which can be mounted as a block device via virtio. For the reference Linux guest, ext4 filesystem is used for disk image.
kvm-host
is released under the BSD 2 clause license. Use of this source code is governed by
a BSD-style license that can be found in the LICENSE file.