The VM data source object is looking for the name of the template as it shows through either the UI or the API as well as the datacenter ID it resides in. That means that the template must be registered to the vSphere environment and that it cannot search datastores for the desired OVA/OVF files.
More info on what the vsphere-virtual-machine data source can be found: here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…