494e2d1303
d8a0a788-xmlbuilder-01.patch 559e813b-xmlbuilder-02.patch a931a1a6-xmlbuilder-03.patch 835ddc5f-xmlbuilder-04.patch b08647c2-xmlbuilder-05.patch b31c0b44-Add-classes-for-defining-SMBios-information.patch a3206f89-Add-the-sysinfo-option.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=329
39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
References: bnc#885308
|
|
Enhancement to add a virtio RNG device to non windows VMs.
|
|
Index: virt-manager-1.4.0/virtinst/guest.py
|
|
===================================================================
|
|
--- virt-manager-1.4.0.orig/virtinst/guest.py
|
|
+++ virt-manager-1.4.0/virtinst/guest.py
|
|
@@ -39,6 +39,7 @@ from .devicedisk import VirtualDisk
|
|
from .devicegraphics import VirtualGraphics
|
|
from .deviceinput import VirtualInputDevice
|
|
from .deviceredirdev import VirtualRedirDevice
|
|
+from .devicerng import VirtualRNGDevice
|
|
from .devicevideo import VirtualVideoDevice
|
|
from .distroinstaller import DistroInstaller
|
|
from .domainblkiotune import DomainBlkiotune
|
|
@@ -655,6 +656,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()
|
|
@@ -662,6 +672,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:
|