I just installed a new VMWare ESXi 5.5 server and checked the partitions on old 5.0 ESXi and on the new 5.5 ESXi and the new one has two VMWare Diagnostics partitions but the old one has only one.
New one 5.5:
VMWare Diagnostics 2.5GB
VMWare Diagnostics 110MB
Old 5.0:
VMWare Diagnostics 110MB
Does it have to be this way? If not how can I disable the 2.5GB diagnostics partitions because my HDD space is limited and because of it the swap file of one VM wont be created thanks to lack of space.
It's the new ESXi 5.5 coredump partition.
VMware found that it was often getting truncated logs because coredumps were running out of space. This makes troubleshooting very difficult so they created this partition for that.
I haven't tested deleting it myself for a critically low space system but worth finding out if you have a testbed.
The documentation does intimate that it can run without it.
Your other option is to move your diagnostic partition to shared storage (an option which you may not have according to your question - but worth mentioning)
VMware Docs
If reinstalling is an option and you don't mind booting from a USB pen or other small Flash device then you could detach the local drives and install to the USB, then after installation re-attach your local disks.
You'll have a warning that logs are not persistent but you may be able to live without it, and live with booting from some small flash device, depending on your circumstances. An 8GB USB stick does the job.