KVM test failure but see guest kernel output
Bug #1777765 reported by
Ike Panhc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Expired
|
Undecided
|
Unassigned |
Bug Description
Running `sudo certify-18.04` on arm64 platform and KVM test fails.
But in the log we can see guest kernel output
Changed in checkbox-ng: | |
status: | New → Invalid |
To post a comment you must log in.
I looked into this a bit and found it to be reproducible on this platform. I disabled the cloud-init service so that the guest OS would complete booting. I then manually ran "cloud-init init" to reproduce the hang, then attached strace to see where it might be hung.
root@ubuntu: /var/log# strace -p 1255
strace: Process 1255 attached
getrandom(^Cstrace: Process 1255 detached
<detached ...>
Ah.. maybe this system just lacks entropy. Indeed, there is no rng device in the guest:
root@(none):/# cat /sys/devices/ virtual/ misc/hw_ random/ rng_available
root@(none):/# cat /sys/devices/ virtual/ misc/hw_ random/ rng_current
none
So, I attached the virtio-rng device to the guest by adding "-device virtio-rng-pci" to the qemu command line. Unfortunately, the driver for this device isn't in the initramfs, so I manually added it:
echo "virtio-rng" >> /etc/initramfs- tools/modules img-4.15. 0-24-generic 4.15.0-24-generic
mkinitramfs -o /boot/initrd.
I also installed haveged on the host to try and generate more entropy - but I don't know if that made any real difference. I wouldn't recommend doing that as part of cert unless we know it is necessary.
Perhaps its possible to simply avoid the need for entropy w/ a cloud-init config - that might be a simpler way to go about this.