From e04799f371254df5391b590e74c0ce9eaa81f839 Mon Sep 17 00:00:00 2001 From: Aurelien Jarno Date: Fri, 11 Mar 2016 16:48:14 +0100 Subject: [PATCH] Ganeti howto: add a section about how to add a virtio-rng device Signed-off-by: Aurelien Jarno --- input/howto/install-ganeti.creole | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/input/howto/install-ganeti.creole b/input/howto/install-ganeti.creole index d18ef4b..3f40a11 100644 --- a/input/howto/install-ganeti.creole +++ b/input/howto/install-ganeti.creole @@ -549,3 +549,14 @@ With the SandyBridge CPU type: aes-256-cbc 309840.39k 328612.18k 330784.68k 324245.16k 328116.91k aes-256-gcm 160820.14k 424322.20k 557212.50k 599435.61k 610459.65k }}} + +=== Add a virtio-rng device === + +VirtIO RNG (random number generator) is a paravirtualized device that is exposed as a hardware RNG device to the guest. Virtio RNG just appears as a regular hardware RNG to the guest, which the kernel reads from to fill its entropy pool. Unfortunately Ganeti does not support it natively, therefore the kvm_extra option should be used. Ganeti forces the allocation of the PCI devices to specific slots, which means it is not possible to use the QEMU autoallocation and that an explicit PCI slot has to be provided. There 32 possible slots on the default QEMU machine, so we can use one of the last ones for example 0x1e. + +The final command to add a virtio-rng device cluster-wise is therefore: +{{{ + gnt-cluster modify -H kvm:kvm_extra="-device virtio-rng-pci\,bus=pci.0\,addr=0x1e\,max-bytes=1024\,period=1000" +}}} + +The max-bytes and period options limit the entropy rate a guest can get to 1kB/s. -- 2.20.1