Hi.
I am trying to create a template from a fresh Ubuntu installation. I am using VMware VI Toolkit for Windows 1.0 build 113525. My server is VMware ESX Server 3i, 3.5.0, 123629.
First I tried different variations of New-Template, but failed. Got errors like
PS C:\Program Files (x86)\VMware\Infrastructure\VIToolkitForWindows> new-template -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template
New-Template : Value cannot be found for the mandatory parameter Location
At line:1 char:14
++ new-template <<<< -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template+
and
PS C:\Program Files (x86)\VMware\Infrastructure\VIToolkitForWindows> new-template -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template -locati
on (get-folder -name "vm")
New-Template : 2009-01-24 21:16:28 New-Template 5268e87a-951c-f95a-166b-c5cde7c72260 The operation is not supported on the object.
At line:1 char:14
++ new-template <<<< -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template -location (get-folder -name "vm")+
and
PS C:\Program Files (x86)\VMware\Infrastructure\VIToolkitForWindows> new-template -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template -Locati
on (get-datastore)
New-Template : Cannot bind parameter 'Location'. Cannot convert "storage" to "VMware.VimAutomation.Types.VIContainer".
At line:1 char:84
++ new-template -VM (get-vm -name Ubuntu64-template) -Name Ubuntu64template -Location <<<< (get-datastore)+
http://communities.vmware.com/message/879931#879931 mentions that there was a bug in the beta version, but has it been fixed in 113525?
I found the discussion at http://communities.vmware.com/message/1114905#1114905 and tried the following:
PS C:\> $vm=get-vm "Ubuntu64-template" | get-view
PS C:\> $vm.MarkAsTemplate()
Exception calling "MarkAsTemplate" with "0" argument(s): "The operation is not supported on the object."
At line:1 char:19
+ $vm.MarkAsTemplate( <<<< )
By reading http://pubs.vmware.com/vi-sdk/visdk250/ReferenceGuide/vmodl.fault.NotSupported.html it looks like this exception is thrown because ESXi does not support templates. Is this correct?
Best regards
Mikael Johansson, Sweden
Template creation is a function of Virtual Center.
See and .
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Template creation is a function of Virtual Center.
See and .
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
ok, thanks. I guess my problem is that I don't understand how the different VMware products work together. Will try to read up on the product presentations.