Hafnium expects to find the following files in the root directory of its RAM disk:
vmlinuz-- the kernel of the primary VM.
initrd.img-- the initial ramdisk of the primary VM.
vms.txt-- optionally describes the secondary VMs.
Follow the preparing Linux instructions to produce
initrd.img for a basic Linux primary VM.
The format is currently one line per secondary VM, with the following format:
<memory-size-in-bytes> <number-of-cpus> <kernel-filename>
For example, the following defines two secondary VMs, the first one with 1MB of memory, 2 CPUs and kernel image called
kernel0, while the second one has 2MB of memory, 4 CPUs and a kernel image called
1048576 2 kernel0 2097152 4 kernel1
Assuming that a subdirectory called
initrd contains the files listed in the previous section, we can build
initrd.img with the following command:
cd initrd; find . | cpio -o > ../initrd.img; cd -