LuckyT
Contributor
Contributor

Find Virtual Machine is Template

Hi All,

When i try to check whether VirtualMachine is Template, vco throws error "Property or method 'isTemplate' not found on object VcVirtualMachine". How do i find whether VM is template or not using script?

0 Kudos
2 Replies
iiliev
VMware Employee
VMware Employee

'isTemplate' is a finder property, not scripting property.

In scripting, you should use 'summary.config.template' property. Something like that (assuming 'vm' is your VcVirtualMachine scripting object);

System.log( "is template -> " + vm.summary.config.template );

0 Kudos
LuckyT
Contributor
Contributor

Thanks.

0 Kudos