How do I get the path of the VM. Is there a way to get all the VMs in that vCenterServer

Hi @ovidiuponoran,

We are experimenting with this beta version. How do I get the path of the VM. Is there a way to get all the VMs in that vCenterServer.

Thanks,
Ashok

Hi Ashok,

To get all VMs in a Datacenter, you should use Get VM List activity with the following parameters:
Folder = “YourDatacenterRootFolder”
IncludeSubfolders = Checked
PowerState = All

Then, for each item in VMList you have the FullPath.

Take care running this activity on the entire Datacenter can take some time, because for each VM the metadata is prepared (i.e. ID, Name, Host, PowerState, VMwareToolsState, etc.).

2 Likes

Hi @ovidiuponoran , i’m trying to use Deploy OVF template activity, and when i pass the input for Datastore i get the below error
Cannot implicitly convert type ‘string’ to ‘UIpath.vmware.contracts.Datastore’

What ami i doing wrong here?

Hi @selwin.s Host parameter of Deploy OVF Template expects a Host object. First you need to call Get Host or Get Host List to get a Host object / list of Host objects then pass such Host object to Host parameter.

I already have Get Host activity like below, and what should be given in the Output field(Host) of GetHost activity?

And when i tried to call the Host from Get Host activity in the input field of Deploy OVF Template it gives the error as Argument ‘Host’: Cannot implicitly convert type ‘string’ to ‘UIpath.vmware.contracts.Host’

You are using Get Host activity but you are not assigning its ‘Host’ output parameter to a variable to later use it in Deploy OVF Template.

Yes but i have no clue what should be entered in the ‘Host’ output parameter. atleast the input format stuff

Click in Output → Host field & press CTRL + K and enter a variable name.

As you suggested i have created a variable in Host output field. And the default expression is blank

Called the Host variable in Deploy Ovf Template activity Host input field

Of course it is blank. It is a variable and its value will be set at runtime.

Thank you @ovidiuponoran after sequencing all the activities and I Ran the file, got the below error,

Deploy OVF Template: Value cannot be null

What should be the appropriate input for Datastore field in Deploy OVF Template activity?

Use Get Datastore activity and pass its output to the Datastore field in Deploy OVF Template activity.

1 Like

Thank you @ovidiuponoran by following all the flow and ran the file which prompted me the below error.

image

How to let the datacenter to be identified?

This error occurs because you’ve provided an incorrect value in Folder field. The Datacenter name should be part of the folder path. For example, if your datacenter is called “Test Env”, then a correct value for Folder parameter is something like “Test Env/My Test VMs/Win10”.

I gave the input exactly in the same format still the error persists,

Below is my vCenter server,

Hi @ovidiuponoran, i have given the vcenter credentials in vmware scope activity, there are 2 esxi hosts within the datacenter in my vcenter. How does get host activity accesses the host without the username/password?

Please look carefully how I provided the folder path, which is different than how you’ve specified.

All VMware activities must be placed on a VMware scope activity which requires user & password.

Got it @ovidiuponoran and everything is working now. I have a clarification that is it possible to use vmware activities without the usage of vCenter server?

@selwin.s I haven’t tried that scenario, but it should be possible to connect to ESXi Server when no vCenter is available.

1 Like