3
3
** This project is an experiment and should not be used production workloads.**
4
4
5
5
This 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.
8
8
9
9
The ultimate goal is to be able to use this "firmware" to be able to load a
10
10
bootloader from within a disk image.
11
11
12
12
Currently it will directly load a kernel from a disk image that follows the
13
13
[ Boot Loader Specification] ( https://systemd.io/BOOT_LOADER_SPECIFICATION )
14
14
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.
19
22
20
23
## Building
21
24
@@ -27,8 +30,6 @@ The result will be in:
27
30
28
31
target/target/release/hypervisor-fw
29
32
30
- Debug builds do not currently function.
31
-
32
33
## Features
33
34
34
35
* virtio (MMIO & PCI) block support
@@ -39,12 +40,38 @@ Debug builds do not currently function.
39
40
40
41
## Running
41
42
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
+ ```
44
70
45
71
### Firecracker
46
72
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 )
48
75
49
76
Replacing the kernel and rootfs to point at the firmware and the full disk
50
77
image instead.
0 commit comments