VMWare‎ > ‎

Find the file and folder location of a VMWare template

posted 5 Jan 2016, 08:15 by Tristan Self   [ updated 5 Jan 2016, 08:16 ]
Seems on the face of it to be something that you can find in the GUI, but its not quite that easy!


You can find it out by running the following, this will provide you with the name of the template, the host it is currently on and where the vmtx file (i.e. the template) is located.

From a VMWare PowerCLI prompt run the following to find all the templates in the cluster called "Cluster1":

# Connect-VIServer <FQDN of vCenter>

# foreach($vmhost in get-cluster 'Cluster1' | get-vmhost){get-template -Location $vmhost | select name,@{n='VMHOST';e={$vmhost.name}},@{n='VMTX';e={$_.extensiondata.config.files.VmPathName}} | Format-Table -wrap }

If you need to migrate the template to a new host (but don't want to do the deploy, then recreate template approach, or put a host into maintenance mode) then you can find the location, remove it from the inventory and then re-add the template from its file location on a new host.


Comments