VMware or VirtualBox freezes and then exits while installing guest OS

Seems that this problem occurs whether using VirtualBox or VMware player.
I tried installing CentOS and Ubuntu Server through VirtualBox and VMware.
Each time, both installations would freeze at the same point regardless of the virtualisation software being used. It seems this has something to do with the amount of memory allocated to the virtual machine.

Don't assign more than half the amount of host memory to a virtual machine.
In my case I assigned 256 Mb to a guest and the host had 512 Mb.

Having set the guest memory to 160 Mb, the installation continued no problem.