From daab62bb3cb1ed538d41014526186475a22aefef Mon Sep 17 00:00:00 2001 From: Nadav Goldin Date: Tue, 20 Jun 2017 20:31:09 +0300 Subject: [PATCH] libvirt: use /dev/random on libvirt versions <= 2002001 It appears that on older libvirt versions(such as 1.3 on Ubuntu16.04), /dev/urandom backend model is not supported. I could not trace in libvirt's changelog when that was changed, and I hope this is not a different issue specific to Ubuntu16.04. However, we know for sure that /dev/urandom works on libvirt version greater than 2002001. So here we add a simple condition on that. Signed-off-by: Nadav Goldin --- lago/providers/libvirt/templates/dom_template-base.xml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lago/providers/libvirt/templates/dom_template-base.xml.j2 b/lago/providers/libvirt/templates/dom_template-base.xml.j2 index 860d2027..cc896f8d 100644 --- a/lago/providers/libvirt/templates/dom_template-base.xml.j2 +++ b/lago/providers/libvirt/templates/dom_template-base.xml.j2 @@ -27,7 +27,7 @@ - /dev/urandom + {{ '/dev/urandom' if libvirt_ver >= 2002001 else '/dev/random' }}