You don’t have to hack the middleware vm.py file to test the addition of a virtio-rnd device to a VM created via the WebUI.
FreeNAS CORE is using libvirtd ( when did that happen?) so you can edit the VM’s xml file direct using:
virsh edit <vmname>
Just add an extra bhyve arg line at the end of the xml file, e.g:
<bhyve:commandline>
<bhyve:arg value='-s 29,fbuf,tcp=192.168.0.66:5900,w=1600,h=900'/>
<bhyve:arg value='-s 28,virtio-rnd'/>
</bhyve:commandline>
</domain>
Get the vname CORE has allocated from:
virsh list --all
You must start the VM from the CLI not the WebUI, otherwise the xml edit is lost:
virsh start ...
Virtio device as sen in a Linux VM:
root@bunsenvm:~# lsmod | grep rng
virtio_rng 16384 0
virtio 20480 4 virtio_rng,virtio_pci,virtio_blk,virtio_net
virtio_ring 45056 4 virtio_rng,virtio_pci,virtio_blk,virtio_net
root@bunsenvm:~#