OK I have already managed to get this working but I was not able to fineld the fix online when I was looking for it so I figured I would post it for the next poor soul.
I tried to migrate a VM for mail in a box from my kvm Ubuntu host to my VMware ESXi host and it seemed like it worked at first, but it kept having these weird crashes that I couldn’t explain and eventually I decided to try just spinning up a new server installing 18.04 and mail in a box and just restoring from backup, but I kept getting freezes and having to force powercycle the VM around when it would install roundcube. I kept trying everything I could think of until finally I tried installing Ubuntu on a VM where I set it to version 10 so like ESXi 5.5 and up compatible (I think that’s the one I settled on). And suddenly it just worked smoothly, with no crashes and everything installed restore from backup went smoothly and now I’m back up and running.
Anywho hope this helped someone else. Feel free to ask me if you have any questions