mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-09 14:06:58 +02:00
build_library: attach virtio-rng-pci device to QEMU VMs
Pass /dev/urandom through to QEMU VMs. (Not /dev/random, to avoid draining the host's entropy.) This speeds initialization of VM entropy.
This commit is contained in:
parent
72780d8347
commit
72bd0b175b
@ -220,6 +220,7 @@ case "${VM_BOARD}" in
|
|||||||
-m ${VM_MEMORY} \
|
-m ${VM_MEMORY} \
|
||||||
-net nic,vlan=0,model=virtio \
|
-net nic,vlan=0,model=virtio \
|
||||||
-net user,vlan=0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
-net user,vlan=0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
||||||
|
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
|
||||||
"$@"
|
"$@"
|
||||||
;;
|
;;
|
||||||
arm64-usr)
|
arm64-usr)
|
||||||
@ -228,6 +229,7 @@ case "${VM_BOARD}" in
|
|||||||
-m ${VM_MEMORY} \
|
-m ${VM_MEMORY} \
|
||||||
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
||||||
-device virtio-net-device,netdev=eth0 \
|
-device virtio-net-device,netdev=eth0 \
|
||||||
|
-object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0 \
|
||||||
"$@"
|
"$@"
|
||||||
;;
|
;;
|
||||||
*) die "Unsupported arch" ;;
|
*) die "Unsupported arch" ;;
|
||||||
|
Loading…
Reference in New Issue
Block a user