Looking at the title it may seem a long and complicated story. Actually is a very simple one. While working in lab which is hosted by a vCloud Director (vCD) instance, I was testing a SQL Always ON Cluster and the Veeam Agent for Windows. I've created my 3 node cluster, installed the database, configured availability groups. All went well until I tried to install the Veeam agent. This stopped with the error that the same UUID was being utilized by all 3 nodes.
Well, all 3 VMs were deployed from the same vCD catalog VM. According to this VMware KB article, by default vCD keeps the same UUID value for cloned VM's. Since I did not have access to vCD to change the settings, the only choice was to actually modify the UUID of the VMs.
And the code to do it below. Do not forget to change the $newUuid (I used to modify the last digits from the current one).
Write-Host -foreground yellow "... waiting for" $vmName "to power off"