If I create a VMware virtual image on my Mac (with VMware Fusion 2) it creates a file line
Ubuntu.vmwarevm. Will this file be compatible with a ESXi 4.0 server? In general, are virtual machines for VMware all the same format?
In theory, yes, they do. That being said, not everything is as simple as the marketing would have you believe. A more obvious example is that on OS X you can create an OS X vm, but you will have a hard time getting that to run on another platform because there are certain requirements that are specific to the Fusion product.
There are aslo different vmWare "hardware" versions to consider and the documentation of the chosen source/destination will outline differences and compatibility issues.
So there is not a strait forward answer for this question. Anyone who tells you simply yes or no has not tried to do this himself, or is a marketing guy for vmWare... :-D
Virtual machines created with Fusion 2 should be compatible with the latest version of ESX/ESXi server.
From the new virtual machine wizard:
All you will need to do is copy the root folder that contains the .vmx (configuration file) and the .vmdk (virtual hard drive) folders to another machine and import and it should be able to run just fine.
(In addition, you may however lose snapshot/paused state going from one product to another... I have not tested this and cannot be certain.)