Last week I wrote an article on how to ensure unique serial numbers are generated when cloning Mac OS X VMs in vCloud Director and as part of that research, I also came across another neat trick that I learned from one of our Engineers, Regis Duchesne. It turns outs that in recent releases of ESXi and Fusion, you can now set a specific serial number for a Mac OS X VM for customers who may require this for testing purposes.
To set a particular serial number, you simply just need to add the following setting to your VMX file (which can also be automated when working with ESXi via the vSphere API):
serialNumber = "SERIAL-NUMBER"
Although, I was not able to find the particular release of ESXi and Fusion that introduced this capability, this trick could come in handy for those of you who have this specific requirement.
Andy Scott says
I've run into an issue where serials being generated are including non alphanumeric characters. This is causing regex issues in the development environment. Do you know a fix for this?
Cloud Guy says
William, do you know if there is a limit to number of VMware VM installed on Windows, Mac and Linux? If yes, than how many and it advisable to stretch the physical server and the VM Manager to its peak without putting it down?
Bruce says
Is this applicable to VMware Fusion 11.x on macOS and VMs running 10.14.x? If so, can you point to any documentation on the usage of the serialNumber command line switch/argument? To be specific, where is that entered? Is the .vmx file launched via come method while inserting that switch?
William Lam says
Yes, this is applicable to both Fusion/vSphere. Simply power off the VM and open the .VMX file which you need to open .vmwarevm bundle
Phil says
Hey William, you can also use:
hw.model.reflectHost = "TRUE"
serialNumber.reflectHost = "TRUE"