33** This project is an experiment and should not be used production workloads.**
44
55This repository contains a simple KVM firmware that is designed to be launched
6- from anything that supports loading ELF binaries and running them with the Linux
7- kernel loading standard.
6+ from anything that supports loading ELF binaries and running them with the
7+ Linux kernel loading standard.
88
99The ultimate goal is to be able to use this "firmware" to be able to load a
1010bootloader from within a disk image.
1111
1212Currently it will directly load a kernel from a disk image that follows the
1313[ Boot Loader Specification] ( https://systemd.io/BOOT_LOADER_SPECIFICATION )
1414
15- Although this project has been developed using
16- [ Firecracker] ( https://github.com/firecracker-microvm ) as it does not currently
17- support resetting the virtio block device it is not possible to boot all the
18- way into the OS.
15+ The firmware is primarily developed against [ Cloud
16+ Hypervisor] ( https://github.com/intel/cloud-hypervisor ) .
17+
18+ This project was orginally developed using
19+ [ Firecracker] ( https://github.com/firecracker-microvm ) however as it does not
20+ currently support resetting the virtio block device it is not possible to boot
21+ all the way into the OS.
1922
2023## Building
2124
@@ -27,8 +30,6 @@ The result will be in:
2730
2831target/target/release/hypervisor-fw
2932
30- Debug builds do not currently function.
31-
3233## Features
3334
3435* virtio (MMIO & PCI) block support
@@ -39,12 +40,38 @@ Debug builds do not currently function.
3940
4041## Running
4142
42- Works with Firecracker as a drop in replacement for the Linux kernel. It does
43- not work with crosvm as crosvm has a hardcoded kernel function start address.
43+ Works with Cloud Hypervisor and Firecracker as a drop in replacement for the
44+ Linux kernel. It does not work with crosvm as crosvm has a hardcoded kernel
45+ function start address.
46+
47+ Cloud Hypervisor is currently the primary development target for the firmware
48+ although support for other VMMs will be considered.
49+
50+ ### Cloud Hypervisor
51+
52+ As per [ getting
53+ started] ( https://github.com/intel/cloud-hypervisor/blob/master/README.md#2-getting-started )
54+
55+ However instead of using the binary firmware for the parameter to ` --kernel `
56+ instead use the binary you build above.
57+
58+ ```
59+ $ pushd $CLOUDH
60+ $ sudo setcap cap_net_admin+ep ./cloud-hypervisor/target/release/cloud-hypervisor
61+ $ ./cloud-hypervisor/target/release/cloud-hypervisor \
62+ --kernel ./target/target/release/hypervisor-fw \
63+ --disk ./clear-29160-kvm.img \
64+ --cpus 4 \
65+ --memory 512 \
66+ --net "tap=,mac=,ip=,mask=" \
67+ --rng
68+ $ popd
69+ ```
4470
4571### Firecracker
4672
47- As per [ quick start] ( https://github.com/firecracker-microvm/firecracker/blob/master/docs/getting-started.md )
73+ As per [ quick
74+ start] ( https://github.com/firecracker-microvm/firecracker/blob/master/docs/getting-started.md )
4875
4976Replacing the kernel and rootfs to point at the firmware and the full disk
5077image instead.
0 commit comments