[Nix-dev] vmTools.runInLinuxImage with ubuntu 1204 image blocks on getrandom()
Maarten Hoogendoorn
maarten at moretea.nl
Sat Jul 16 15:39:12 CEST 2016
Hi there,
I'm trying to run some tests on a binary program on ubuntu 1204 using
vmTools.runInLinuxImage. It just blocks on getrandom().
I've created a minimal reproducible example:
with import <nixpkgs> {}; with pkgs;
let
script = ''
# /dev/urandom works fine
dd if=/dev/urandom of=/dev/null bs=1M count=1
# /dev/random does not work!
${pkgs.strace}/bin/strace \
dd if=/dev/random of=/dev/null bs=1M count=1
'';
img = runCommand "nix-binary-tarball-test" {
diskImage = vmTools.diskImages.ubuntu1204x86_64;
# QEMU_OPTS = "-device virtio-rng-pci";
} script;
in
vmTools.runInLinuxImage img
I read somewhere that adding a virtio-rng-pci device could solve this, but
it made no difference.
Could someone confirm this behavior? And maybe one of you has an idea on
how to fix this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160716/da127869/attachment.html>
More information about the nix-dev
mailing list