VMware Cloud Community
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?

Reply
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 );

Reply
0 Kudos
LuckyT
Contributor
Contributor

Thanks.

Reply
0 Kudos