I was wondering after installation of Mountain Lion on VMWare or other virtualization softwares (on a mac) will it show the same "serial number" in "About This Mac"? And is it possible to customize that serial number, for development and test? And if it's possible, is it legal? (I know changing "Hardware UUID" is possible)
The serial number isn't related to the OS at all. It's part of the hardware of your Mac, and actually it should be printed in/on the machine somewhere (depends on the model of course.)
If you install OS X in a virtual machine, the serial number will have to be faked. For example, a non-official x86 version of OS X uses "W1234567980". Others may use different numbers, none of which are real, of course.
Installing OS X in a virtual machine is against the EULA, except for old versions of OS X Server and OS X Mountain Lion, the latter of which may only be virtualized on Apple computers running OS X 10.8 themselves: