virt-manager/virtinst-add-default-rng-device.patch
Charles Arnold 2e04f0d659 - bsc#919420 - virt-manager: installation of vm on pp64le: Couldn't
find hvm kernel for SUSE tree.
  virtinst-add-ppc64-arch-support.patch
- Upstream bug fix to console if running on Xen
  601a82cb-fix-console_type-if-xen.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=269
2015-09-22 17:14:49 +00:00

39 lines
1.4 KiB
Diff

References: bnc#885308
Enhancement to add a virtio RNG device to non windows VMs.
Index: virt-manager-1.2.1/virtinst/guest.py
===================================================================
--- virt-manager-1.2.1.orig/virtinst/guest.py
+++ virt-manager-1.2.1/virtinst/guest.py
@@ -54,6 +54,7 @@ from .pm import PM
from .seclabel import Seclabel
from .xmlbuilder import XMLBuilder, XMLProperty, XMLChildProperty
from .devicedisk import VirtualDisk
+from .devicerng import VirtualRNGDevice
class Guest(XMLBuilder):
@@ -671,6 +672,15 @@ class Guest(XMLBuilder):
return
self.add_device(VirtualGraphics(self.conn))
+ def add_default_rng(self):
+ osvar = self._get_os_variant()
+ if not self.conn.is_qemu() or not osvar or osvar.startswith("win"):
+ return
+ rng_dev = VirtualRNGDevice(True)
+ rng_dev.type = VirtualRNGDevice.TYPE_RANDOM
+ setattr(rng_dev, "device", "/dev/random")
+ self.add_device(rng_dev)
+
def add_default_devices(self):
self.add_default_graphics()
self.add_default_video_device()
@@ -678,6 +688,7 @@ class Guest(XMLBuilder):
self.add_default_console_device()
self.add_default_usb_controller()
self.add_default_channels()
+ self.add_default_rng()
def _add_install_cdrom(self):
if self._install_cdrom_device: