vSphere: Deploy Template grayed out


image

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.

image

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 🙂

image

Advertisements

5 thoughts on “vSphere: Deploy Template grayed out

  1. Yaz

    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 *

    Reply
  2. Pingback: VM Template Deploy/Clone options greyed out « vBlog

  3. Darren DeHaven

    The easiest way to do this is to scan the template with Update Manager. (It will automatically convert it to a VM, scan for VMware tools updates, and then convert it back to a template). It fixed this issue for me when the “convert to VM” was greyed out.

    Reply
  4. Pingback: The world of Marc O'Polo – Blog Template options grayed out » The world of Marc O'Polo - Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s