LMC: Make the QEMU RNG device optional
Added a new QEMU argument '--with-rng' to specify a RNG device other than /dev/random or "none". Signed-off-by: Yuval Turgeman <yturgema@redhat.com>
This commit is contained in:
parent
f1467ca99f
commit
68d1f4208d
@ -243,6 +243,8 @@ def lmc_parser(dracut_default=""):
|
|||||||
help="Use OVMF firmware to boot the VM in UEFI mode")
|
help="Use OVMF firmware to boot the VM in UEFI mode")
|
||||||
virt_group.add_argument("--no-kvm", action="store_true", default=False,
|
virt_group.add_argument("--no-kvm", action="store_true", default=False,
|
||||||
help="Skip using kvm with qemu even if it is available.")
|
help="Skip using kvm with qemu even if it is available.")
|
||||||
|
virt_group.add_argument("--with-rng", default="/dev/random",
|
||||||
|
help="RNG device for QEMU (none for no RNG)")
|
||||||
|
|
||||||
# dracut arguments
|
# dracut arguments
|
||||||
dracut_group = parser.add_argument_group("dracut arguments")
|
dracut_group = parser.add_argument_group("dracut arguments")
|
||||||
|
@ -242,7 +242,8 @@ class QEMUInstall(object):
|
|||||||
qemu_cmd += ["-chardev", "socket,id=charchannel0,host=%s,port=%s" % (virtio_host, virtio_port)]
|
qemu_cmd += ["-chardev", "socket,id=charchannel0,host=%s,port=%s" % (virtio_host, virtio_port)]
|
||||||
|
|
||||||
# PAss through rng from host
|
# PAss through rng from host
|
||||||
qemu_cmd += ["-object", "rng-random,id=virtio-rng0,filename=/dev/random"]
|
if opts.with_rng != "none":
|
||||||
|
qemu_cmd += ["-object", "rng-random,id=virtio-rng0,filename=%s" % opts.with_rng]
|
||||||
qemu_cmd += ["-device", "virtio-rng-pci,rng=virtio-rng0,id=rng0,bus=pci.0,addr=0x9"]
|
qemu_cmd += ["-device", "virtio-rng-pci,rng=virtio-rng0,id=rng0,bus=pci.0,addr=0x9"]
|
||||||
|
|
||||||
if boot_uefi and ovmf_path:
|
if boot_uefi and ovmf_path:
|
||||||
|
Loading…
Reference in New Issue
Block a user