Fix performance bug by only looping through list of VirtualMachines to get UUIDs once instead of once per VM