Pass rng device into qemu instances
* During swarm processing, we may use ssl generation call,
inside docker. Due low entropy, it might fail:
* NOTE: Due issue[0], need to duplicate defaul virtio-net device
..
gpg: Generating a default key
..
Not enough random bytes available. Please do some other work to give
the OS a chance to collect more entropy! (Need 186 more bytes)
[0] https://github.com/hashicorp/packer/issues/6911
Change-Id: If8ac10e2f798f45393909eb74ce5a319292045db
diff --git a/day01-image/template.json b/day01-image/template.json
index e3224cd..25de077 100644
--- a/day01-image/template.json
+++ b/day01-image/template.json
@@ -109,7 +109,10 @@
[
"-smp",
"4"
- ]
+ ],
+ ["-device", "virtio-net,netdev=user.0"],
+ ["-object","rng-random,id=objrng0,filename=/dev/urandom"],
+ ["-device", "virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.0,addr=0x10" ]
],
"vm_name": "{{ user `image_name` }}-{{ isotime \"200601021504\" }}",
"output_directory": "images/{{ user `image_name` }}-qemu-{{ isotime \"200601021504\" }}",