From cb3c19ff852a6bdbf2e9f560f5cec5f6edbe97ec Mon Sep 17 00:00:00 2001 From: Yang Hu Date: Wed, 21 Aug 2024 14:23:00 -0400 Subject: [PATCH] docs/guides: add tips about enabling KVM support for random number generation Signed-off-by: Yang Hu --- content/guides/internals.mdx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/guides/internals.mdx b/content/guides/internals.mdx index 50573785..5dd7222c 100644 --- a/content/guides/internals.mdx +++ b/content/guides/internals.mdx @@ -164,11 +164,20 @@ Notice that each line in `make`'s output consists of an operation in the build p Now that the unikernel image has been sucessfully generated, we can finally run it using the QEMU Virtual Machine Monitor: ```console -$ qemu-system-x86_64 -kernel build/helloworld_qemu-x86_64 -nographic +$ qemu-system-x86_64 -kernel workdir/build/helloworld_qemu-x86_64 -nographic -enable-kvm -cpu host ``` The `-kernel` option is used for indicating the image to be booted by the machine, while the `-nographic` option is simply for using QEMU as a command-line program by redirecting all output to the terminal. +Since [Unikraft v0.17.0 Calypso](https://github.com/unikraft/unikraft/releases/tag/RELEASE-0.17.0), random number generation is reliant on CPU support. +This means that, when using QEMU, one of two options must be enabled: + +- You are using QEMU >= 8.0 +- You are using hardware acceleration, with KVM + +This is why we use `-enable-kvm` and `-cpu host` flags to explictly enable them. +If you are running on other platforms, please remove them. + ```console SeaBIOS (version Arch Linux 1.16.2-1-1)