I was trying to rename a VM from an ESXi host and when i enter the VM name in the Virtual machine field under Input for renameVM activity i’m getting the below error. The vm name was given in quotes eg: “VM name”
Argument ‘VirtualMachine’: cannot implicitly convert type ‘string’ to ‘UIpath.vmware.virtualmachineinfo’
Then there are other activities that allow you to grab this data.
The minimum would look like this (you grab your resources, output them to a variable and then use those variables in the Deploy OVF Template activity):
i will try this but why there are few inputs which always throws type conversion error. where can i find the appropriate input format for vmware activities
The best way for those is to create the variable directly from the property input:
First click into the property to focus on it
Then do CTRL + K (or right click → Create Variable) to create a variable
Give it a name and press Enter
You will now have the variable for specific field of the right type.
You can also hover your mouse over the name of the property which will then tell you if the required property is a string (you can input it directly) or a specific type that needs to be taken from somewhere else (typically another activity).
The activities in general are based on the APIs of each service and follow those APIs’ structure, so the variable types are required to store all elements of specific entity, such as a VM or a Host.
Hosts.Id and .Name worked like a charm except Hosts.PowerState
I have a datacenter named myDatacenter in vCenter and it has 2 esxi hosts. How can i pass the values for folder input of Deploy OVF template activity which gives me an error Unable to find folder “TestFolder”
To print a non-string value in a write line you should use host.PowerState.ToString
Alternatively, enter a debug session with the Step Into option, then continue stepping into until you reach your Get Host activity (you can also just set a breakpoint for that).
After you Step Into one more time and the Get Host activity executes, check out the Locals panel for the output of this activity. You will be able to drill down into all it’s properties.
Got it @loginerror and everything is working now. I have a clarification that is, it is possible to use vmware activities without the usage of vCenter server?