[libvirt] [PATCH] Add hw random number generator (/dev/hwrng) to default qemu cgroup ACL

Pradipta Kr. Banerjee pradipta.banerjee at gmail.com
Mon Nov 18 13:28:06 UTC 2013


Creating a qemu VM with /dev/hwrng as backed RNG device throws the
following error - "Could not open '/dev/hwrng': Operation not permitted"
This patch fixes the issue

Signed-off-by: Pradipta Kr. Banerjee <bpradip at in.ibm.com>
---
 src/qemu/qemu_cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index ace7e35..d9ebb30 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -39,7 +39,7 @@
 
 static const char *const defaultDeviceACL[] = {
     "/dev/null", "/dev/full", "/dev/zero",
-    "/dev/random", "/dev/urandom",
+    "/dev/random", "/dev/urandom", "/dev/hwrng",
     "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
     "/dev/rtc", "/dev/hpet", "/dev/vfio/vfio",
     NULL,
-- 
1.8.3.1




More information about the libvir-list mailing list