I was trying to install Esxi 7.0 on virtual box but I'm getting the following error.
I tried with Esxi 6.5 but was getting similar kind of error.
VM Config: 4Cpus, 4GB RAM,40GB HDD
My Machine Specs: i7 8th Gen 8 cores, 32 RAM
The ESXi installer is itself ESXi and you're in a chicken and egg situation where the installer is crashing and you have no core dump file or partition configured. You can tell this from the bottom 3 lines:
If you're really brave press the "Escape" key and you can get to the kernel text logs which can frequently tell you a lot about the cause of the crash. But reading the logs at the PSOD prompt is a pain and something I try to avoid by always having a place to dump the core file (the "data" referred to above).
I'd suggest that you either install ESXi to a USB flash drive on bare hardware (see https://www.nakivo.com/blog/run-esxi-from-usb-flash-drive-guide/) or grab an ESXi dd-image and put that on either a physical or virtual USB flash drive (https://www.virten.net/2014/12/clone-esxi-installations-on-sd-cards-or-usb-flash-drives/). You can then pass the USB image through to your virtual environment. By doing it this way you will already have created a core dump partition so that if ESXi crashes you can get a core dump. The ESXi kernel logs, which are text files, are part of the core dump and https://communities.vmware.com/t5/ESXi-Discussions/Kernel-Dump-Analysis-Tool/td-p/1429887 has some guidance on extracting them from the dump.
Lastly, if you simply must do everything in a virtual environment you could try creating a core dump partition on a second disk (type 0xFC and size 2+GB) and maybe if you're lucky the installer will pick it up. If you can get to a command prompt before the PSOD then you can use esxcli to create, configure and make active a core dump partition but pay ignore size recommendations under 2 GB. Nothing is as frustrating as a truncated core dump. See https://kb.vmware.com/s/article/2004299 for more info.