How to setup a virtual machine
Installation of VirtualBox
you need the version 7.X+
Since that version there is an option during the creation of a Virtual-Machine to create it based directly of an ISO-Image
Setup of Ubuntu and Kali VM’s
There is a pretty good ubuntu tutorial on how to do it
ISO-Image should be the one you downloaded from ubuntu.com and kali.org
(note ubuntu: it doesn’t matter if you are using the LTS version or not)
skip unattended installation
recommended base-memory: 2048MB (better 4096MB)
recommended processors: 2 (better 4)
minimum size for the virtual hard is around 10GB-15GB