cargo build --no-default-features --release && sudo setcap cap_net_admin+ep ./target/release/cloud-hypervisor
This will create a VMM that only emulates the serial and I/O APIC devices
git clone https://github.com/sameo/cloud-hypervisor-rootfs
Then follow the README
instructions.
Use the default 5.0 cloud-hypervisor kernel config and change CONFIG_INITRAMFS_SOURCE
to point to the initramfs directory mentioned in the previous section.
sudo ./target/release/cloud-hypervisor \
--kernel /path/to/your/vmlinux \
--api-socket /tmp/ch.sock \
--console off \
--serial tty \
--cmdline "console=ttyS0 reboot=k panic=1 nomodules i8042.noaux i8042.nomux i8042.nopnp i8042.dumbkbd" \
--cpus boot=1 \
--memory size=512M,file=/dev/shm \