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)
I have an OS X client VM within VMware Fusion. It does have a serial number (starting with VMW...). This is different to the host Mac.
VMware Fusion seems to generate the serial automatically, but it is not obviously stored in the vm's configuration files. Also not mentioned in the vm logs. My guess is that it is 'burnt' into the .nvram file when the vm is created or copied.
As you know the UUID can be changed, but the only references I can find to changing the serial number relate to downloadable OS X vm images. For example: Change serial hack This supports my guess in the previous paragraph.
Legal? Using downloaded images breaches Apple licenses - but you are not doing this. Serial number: Not so clear as it does need to be globally unique - it would be bad to change it to a value used by another vm or physical mac.
But, I don't understand your need to change the serial. VMware will make sure it is unique if you copy vms to create development and test environments.
Most likely it will not generate a hardware serial number as there is no underlying hardware. And Macs don't require a hardware to even be programmed into the logic board (sometimes the Apple Geniuses forget to program them in when replacing your logic board, for instance).
I'm at work, away from my Macs, but as a test I checked the hardware serial number of my Windows 7 VM in VirtualBox. It was "0".
Apple states in TN1103 "Once the serial number has been lost there is no means to restore it to the machine."