]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: Enable virtio RNG for all platforms
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 1 Sep 2016 21:10:21 +0000 (22:10 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 9 Sep 2016 11:06:54 +0000 (12:06 +0100)
We have problems where systems simply stop booting and hang. This is due
to a lack of entropy which means ssh keys and networking can't be brought
up. Adding in the virtio-rng passthrough support allows host entropy to
pass into the guess and avoids these hangs.

This is particularly problematic after the gnutls upgrade which starts
using /dev/random instead of /dev/urandom but was an issue we'd occasionally
seem before that.

It particualrly affected x86 and ppc machines for some reason.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu

index b9dbe97cba017fa53cfeda76d5f286cf2ee4e2c6..fca8d1d29d19fc3e4c6cd81512c1ee4eb4489f13 100755 (executable)
@@ -806,6 +806,9 @@ class BaseConfig(object):
 
         self.qemu_opt = "%s %s %s %s %s %s" % (qemu_bin, self.get('NETWORK_CMD'), self.qemu_opt_script, self.get('ROOTFS_OPTIONS'), self.get('QB_DTB'), self.get('QB_OPT_APPEND'))
 
+        # Enable virtio RNG else we can run out of entropy in guests
+        self.qemu_opt += " -device virtio-rng-pci"
+
         if self.serialstdio:
             logger.info("Interrupt character is '^]'")
             cmd = "stty intr ^]"