Thanks for the explanation.
The problem is that we have two types of virtual machine scripting objects:
- VC virtual machine (defined in class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine in VC plug-in)
- vCloud virtual machine (defined in class com.vmware.vmo.plugin.vcloud.model.VM in vCloud plug-in)
Method attachDisk() is present only for vCloud virtual machine scripting objects, but it seems you are calling it on object of type VC virtual machine, and as it does not have such method, an error is thrown.
So if you need to call method attachDisk() you should somehow obtain a valid scripting object of type vCloud virtual machine, or convert VC virtual machine object to vCloud virtual machine object.
Hope this helps,
-Ilian