Is there any way to use vCloud's action or workflow in vCenter ????
I'm not sure I fully understand your question. Could you provide more details?
Strictly speaking, actions/workflows do not belong to vCloud or vCenter. You can call them from any other action/workflow.
Okay let me explain you . . I am working on building a workflow where i want to increase the no of Cpu, Memory and Storage and for that requirement ,I had noticed that some of the Action are Present in vCloud Director Package in vCO, I want to use them for vms to increase above mentioned compute resources for VMs in vCenter but not vCloud Director.
I am finding difficulties to use them as they are giving follwoing error
TypeError: Cannot find function attachDisk in object DynamicWrapper (Instance) : [VcVirtualMachine]-[class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine] -- VALUE : VirtualMachine<vm-2901>'Testing'. (Dynamic Script Module name : attachDiskVM_SN#4)
I hope you could getmy pain point and be able to help me out
Thanks !!
Thanks for the explanation.
The problem is that we have two types of virtual machine scripting objects:
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
okay thanks... but how to convert VC vm object to vCloud vm object ???
Or don't we have any other option to achieve the same ???
There is no simple conversion from VC vm to vCloud vm, I'm afraid
It should be possible to get vm's ID (and maybe other info if needed) from VC vm object and then search for vm with such ID in vCloud using vCloud API. But I'm not familiar enough with vCloud plug-in and don't know what search API/functionality it provides. I'll ask around how such mapping can be done.
Do you have vCloud Director setup ?
If so configure the vCloud Director plug-in for it and use the workflow directly.
Thanks ... But the main problem is I don't want to convert my vCenter VM into vCloud .. Because that will be more time consuming and not good for my flow ..
Basically what I want is to use some of the workflow of vCloud (like "Attach a hard disk") for vCenter VM and for that purpose I was asking the above mention questions ... Is there any other way to achieve the same ??? Or if any other method to create the same workflow for vCenter vm ???
Please help me with that ...
To create the same workflow for vCenter vm, when there is no 1:1 mapping at the API level, you have to:
In short, I doubt there is a quick way or drop-in replacement for existing vCloud workflow/action to make it work with vCenter vm objects.