Ganeti howto: add a section about how to add a virtio-rng device
authorAurelien Jarno <aurelien@aurel32.net>
Fri, 11 Mar 2016 15:48:14 +0000 (16:48 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 11 Mar 2016 15:48:14 +0000 (16:48 +0100)
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
input/howto/install-ganeti.creole

index d18ef4b..3f40a11 100644 (file)
@@ -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.