From 26f205bff526b81080d4c7369d77b0baec90c0a0 Mon Sep 17 00:00:00 2001 From: Ian McLeod Date: Mon, 30 Apr 2018 17:04:16 -0500 Subject: [PATCH] Initial attempt to add virtio-rng to install VM --- oz/Guest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oz/Guest.py b/oz/Guest.py index dff0608..f1869ba 100644 --- a/oz/Guest.py +++ b/oz/Guest.py @@ -514,6 +514,10 @@ def _generate_xml(self, bootdev, installdev, kernel=None, initrd=None, self.has_consolelog = True else: self.has_consolelog = False + # virtio-rng + virtioRNG = oz.ozutil.lxml_subelement(devices, "rng", None, {'model':'virtio'}) + virtioRNGRate = oz.ozutil.lxml_subelement(virtioRNG, "rate", None, {'bytes':'1024', 'period':'1000'}) + virtioRNCBackend = oz.ozutil.lxml_subelement(virtioRNG, "backend", "/dev/random", {'model':'random'}) # boot disk bootDisk = oz.ozutil.lxml_subelement(devices, "disk", None, {'device':'disk', 'type':'file'}) oz.ozutil.lxml_subelement(bootDisk, "target", None, {'dev':self.disk_dev, 'bus':self.disk_bus})