I moved a couple of templates over to another ESX host. Can I import/register or somehow get them to work?
Yes, if the storage on which the Template is located is visible on the target ESXi node, you can use the New-Template cmdlet with the TemplateFilePath parameter to register the template.
But if that storage is only attached for a short while, you will have to clone the Template.
That can be done with the Template parameter on that same cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You have to give a few more details.
Are these ESXi nodes under the same vCenter?
Is there shared storage between those ESXi nodes?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
There are 2 vcenter clusters. I can have a LUN/datastore presented back and forth between them.
I created a couple of templates on one vcenter, placed them on the transferrable datastore and had it presented to the other vcenter cluster.
I see a cmdlet new-template, it kind of looks like this is possibility.
Yes, if the storage on which the Template is located is visible on the target ESXi node, you can use the New-Template cmdlet with the TemplateFilePath parameter to register the template.
But if that storage is only attached for a short while, you will have to clone the Template.
That can be done with the Template parameter on that same cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
struggling.... lets call the vcenter 'vcenter2' and the transferrable lun/datastore 'transfer1' in it is a container named contatinerDB1 and in that are the template files including templateDB.vmtx
I connect to the vcenter2 with powercli and run this command
new-template -templatefilepath "transfer1 containerdb1\templatedb.vmtx" -location "transfer1 containerdb1"
I get an error could not find vi container transfer1 containerdb1
I would like to get this template registered where it is, I'd rather not copy it anywhere, as that would just be more time..... I'll create a VM from it and I'll be done with it then!
You didn't mention that the Template was stored in a Container.
That changes the story.
You would have to replicate the Container to the other vCenter.
But cloning a Template from a Container is not possible at the moment afaik.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Container is probably the wrong word, it's a folder not in a kuernetes container
You mean a Folder in the vCenter hierarchy?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
What worked was:
new-template -TemplateFilePath "[DatastoreName] foldername\template.vmtx" -vmhost hostname -location "folder-in-vcenter"