There are two ways to fix this -
Using PowerCLI
Download and install PowerCLI from PowerShell.
Run the commands below on one or all vCenters in linked mode to find the (vm-xxxx) MoRef ID you see in the error. The process of finding the VM MoRef ID thru PowerCLI or RVTools may have to be repeated multiple times depending on the number of times you see the error with different VM MoRef IDs while exporting the configuration data.
Here's an example :
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:\Users\User> Connect-VIServer 192.168.0.4
Name Port User
---- -- -- - ---
192.168.0.4 443 VSPHERE.LOCAL\Administrator
PS C:\Users\User> Get-VM | Sort-Object ID | ft -Property Name,ID -AutoSize
Name Id
---- --
App1 VirtualMachine-vm-123
Windows Template (35GB) VirtualMachine-vm-124
WebApp VirtualMachine-vm-1879
FileServ VirtualMachine-vm-1456
Using RVTools
https://www.robware.net/rvtools/
You can also use RVTools to generate an excel file of the infrastructure and get the VM MoRef ID thru it and remove the VM template from the inventory.
NOTE: VMware documentation states that you have to delete the VM template from vCenter inventory but I have verified that just removing from vCenter inventory also works. Do what suits you best.