0ac26d8208
Tumbleweed VM virtinst-pvgrub2-bootloader.patch - fate#320353 - Add the ability for virt-convirt to decompress compressed files in an OVA f11eb00b-virt-convert-decompress-gz-files-before-converting.patch - bsc#951726 - Error - 'wrong number of arguments (3 for 1) ...' when attempting to create DomU through the yast virt-manager.spec OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=301
39 lines
1.4 KiB
Diff
39 lines
1.4 KiB
Diff
References: bnc#885308
|
|
Enhancement to add a virtio RNG device to non windows VMs.
|
|
Index: virt-manager-1.3.2/virtinst/guest.py
|
|
===================================================================
|
|
--- virt-manager-1.3.2.orig/virtinst/guest.py
|
|
+++ virt-manager-1.3.2/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):
|
|
@@ -712,6 +713,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()
|
|
@@ -719,6 +729,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:
|