vmTools.runInLinuxImage: add virtio_rng device
This allows the QEMU VM's to use the /dev/random device, by getting entropy from the host.
This commit is contained in:
parent
5088f24ded
commit
e809667b17
|
@ -2,7 +2,7 @@
|
|||
, kernel ? pkgs.linux
|
||||
, img ? "bzImage"
|
||||
, rootModules ?
|
||||
[ "virtio_pci" "virtio_blk" "virtio_balloon" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ]
|
||||
[ "virtio_pci" "virtio_blk" "virtio_balloon" "virtio_rng" "ext4" "unix" "9p" "9pnet_virtio" "rtc_cmos" ]
|
||||
}:
|
||||
|
||||
with pkgs;
|
||||
|
@ -218,6 +218,7 @@ rec {
|
|||
${qemuProg} \
|
||||
${lib.optionalString (pkgs.stdenv.system == "x86_64-linux") "-cpu kvm64"} \
|
||||
-nographic -no-reboot \
|
||||
-device virtio-rng-pci \
|
||||
-virtfs local,path=/nix/store,security_model=none,mount_tag=store \
|
||||
-virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \
|
||||
-drive file=$diskImage,if=virtio,cache=unsafe,werror=report \
|
||||
|
|
Loading…
Reference in a new issue