UFW and VirtualBox

ufw has nothing to do with virtualbox. Your error message is most likely related to the method you used to install version 5. Installing Different Versions of VirtualBox

whonix firewall does not protect host. recommended to have a host firewall as well. ymmv.