vSphere: Deploy Template grayed out
August 6, 2009 3 Comments
I wanted to deploy a template via the vSphere client but I was unable to achieve this task because the option was grayed out. After restarting the vCenter services and the vCenter server I was still unable to deploy a template.
Non of the options where available. So PowerCLI to the rescue:
$templates = Get-Template * foreach($item in $templates){ $template = $item.Name #Convert Template back to VM Set-Template $template -ToVM -RunAsync #Convert Template back to template :S $vmview = Get-VM $template | Get-View $vmview.MarkAsTemplate() }
After running the script above. I was able to deploy my templates again






Why would you ever want to do this?
$templates = Get-Template -Name* |Export-Csv -NoTypeInformation $tmpfile
$csv = Import-CSV $tmpfile
And not this?
$csv = Get-Template -Name *
I had to use this as a workaround in the past. But your solution works also. So I will update the post.
Pingback: VM Template Deploy/Clone options greyed out « vBlog