mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
Merge pull request #2686 from rn/random
qemu: Use /dev/urandom on Linux for virtio-rng-pci
This commit is contained in:
commit
7485f2b6bf
@ -521,6 +521,12 @@ func buildQemuCmdline(config QemuConfig) (QemuConfig, []string) {
|
||||
}
|
||||
}
|
||||
|
||||
rng := "rng-random,id=rng0"
|
||||
if runtime.GOOS == "linux" {
|
||||
rng = rng + ",filename=/dev/urandom"
|
||||
}
|
||||
qemuArgs = append(qemuArgs, "-object", rng, "-device", "virtio-rng-pci,rng=rng0")
|
||||
|
||||
var lastDisk int
|
||||
for i, d := range config.Disks {
|
||||
index := i
|
||||
|
Loading…
Reference in New Issue
Block a user