image_opts="-drive file=$image,if=$drive_interface"
fi
+ if [ ! -z "$virtio_rng" ]; then
+ rng_opts="-device virtio-rng-pci,$virtio_rng"
+ else
+ rng_opts="-device virtio-rng-pci,max-bytes=128,period=1000"
+ fi
+
# USB redirect support
# See https://people.freedesktop.org/~teuf/spice-doc/html/ch02s06.html
#usb_opts="-device ich9-usb-ehci1,id=usb"
# $cdrom_opts \
# $boot_opts \
# $net_opts \
+ # $rng_opts \
# $qemu_opts &> $LOGFILE < /dev/null &
# Run virtual machine, screen approach
$cdrom_opts \
$boot_opts \
$net_opts \
+ $rng_opts \
-pidfile $PIDFILE \
-D $LOGFILE \
$qemu_opts
# Whether to be managed by kvmx-supervise
#supervise_manage="1"
+
+# VirtIO RNG parameters
+# See https://wiki.qemu.org/Features/VirtIORNG
+#virtio_rng="max-bytes=128,period=1000"