On VMware, both serial numbers and system UUID returns equivalent values. Exemple:
Serial Number: VMware-56 4d 36 0a d3 df f6 ad-8c 21 07 c2 4d 58 d6 42 UUID: 564D360A-D3DF-F6AD-8C21-07C24D58D642
Basically the serial number is the UUID (with some extra spaces) prefixed with VMware.
There is a standard and easy way to get the system UUID which works on VMware and VirtualBox (and maybe other hypervisors):
# dmidecode -s system-uuid 564D360A-D3DF-F6AD-8C21-07C24D58D642
Hope this helps.