@ovidiuponoran can this activities assign an ip adress of new vm created like ansible did?
You can assign an ip address by applying a customization specification (used for customizing the Guest OS) to the VM, either at creation time or later by using Customize VM activity.
I’m trying to implement something similar to what you described here, but with some differences.
In particular I’m trying to power on a VM in VCenter by its name that is taken from an excel file.
What I’m trying to do is to get a VM List from vcenter name and only then compare execute the activity only on the one extracted by the excel.
Now everything is just fine, but I have to gather the datacenter or folder name directly from the vcenter, since if I set the folder variable to the datacenter name I always get the error “Object reference not set to an instance of an object”. is there a particular format in the way I have to write it (in my case the datacenter is named “LAB-35”)?
Is there an easy way to gather the datacenter name by vcenter?
I checked with get host list activity and it correctly works, so the issue should not be the vmware scope.
please let me know.
thanks in advance
Which activity do you call when you get “Object reference not set to an instance of an object” error?
I’ve just run a test in my vCenter environment where I have a datacenter called “Demo Env”. I set the values for the Get VM List parameters as in the screenshot from below and it correctly returned all VMs from that datacenter.
If the datacenter’s name would have been incorrect, the error message should have been “Unable to find datacenter…”
- you may not have the appropriate access rights for the entire datacenter, but only for some particular folders of that datacenter;
- make sure you read through https://docs.uipath.com/activities/lang-en/docs/vmware-scope (about using FQDN for the ServerAddress & installing the trusted root CA certificates from your vSphere).
the activity is just the “Get VM List”.
I have administrative rights and the vmware scope works fine, since I tried with a “Get Host List” and it works perfectly.
So, as you say, it’s a little bit strange…
The only thing I can suppose is that “-” inside the Datacenter name to be incorrectly read by UiPath.
how can I gather the datacenter name automatically?
Have you installed the certificates? Get Host List can work without the certificates but getting info about a VM not.
hi @ovidiuponoran, you got it!
I forgot to install certificates. Now I installed them and the error did not present.
Now I have to gather the root folder or the datacenter name. Is there a ready made activity for this query?
Since I have a big number of Vcenter to manage with this robot, is there a fast way to get the certificates and install in my uipath server?
I’m glad it worked!
Hmm…there is no activity to obtain the datacenters names / root folders, but we can consider adding it in a next version of the package. For the time being you probably need to keep the list of all your datacenters names in a file.
About the certificates: I will ask somebody tomorrow, I don’t know if there is a faster way to do it.
ok then, about datacenter name I will workarount the issue using a get-datacenter by powercli.
About certificates I will wait for your feedback. thanks!!!
A colleague gave me the hints from below. I hope they are helpful.
1. for installing the certificates: https://docs.microsoft.com/en-us/powershell/module/pkiclient/import-certificate?view=win10-ps
2. for downloading, something like this:
md -Force ‘C:\Temp’ | out-null
[Net.ServicePointManager]::SecurityProtocol = ‘tls12, tls11, tls’
Set-Location -Path ‘C:\Temp’
3. For unzip:
thanks for your support. it’s working fine!
Wow ! this is great,I do not need to do click just to login or power off VM in the VM Sphere. Awesome! I will try this Activity.