Quantcast
Channel: VMware Communities : All Content - vRealize Orchestrator
Viewing all 10285 articles
Browse latest View live

How to get workflows linked to a specific configuration attribute

$
0
0

Hi all

 

I would like to build a workflow to find all workflows linked to a specific configuration attribute, I know that I can use the "Find elements that use this element" but it list all workflows using the configuration element (not a specific attribute).

 

I though that vRO show this information in the properties of the "workflow.attributes", but it's not the case, by REST API, I didn't see anything on the workflow attributes (only on input/output).

 

Does exists another trick to do get this information ?

 

Thanks


Best way to convert a bunch of VMs (string values) to vRAVM objects

$
0
0

I have seen several examples to convert the VM names (string values) to vRAVM/VCACVM objects, but not sure which is the best one to use in the event of searching thousands in the range of more than 10,000 objects.  Could anyone suggests with an example?

Task 'addHost' error: The operation is not supported on the object.

$
0
0

I have created a workflow that successfully deploys a new datacenter, then a cluster. Next it should add a host that is currently unmanaged by vCenter and is in maintenance mode. However, the workflow 'Add Host To Cluster' always fails with the following error (both directly and when used in my workflow):

 

[2017-09-27 17:46:24.407] [E] (com.vmware.library.vc.basic/vim3WaitTaskEnd) Error in (Dynamic Script Module name : vim3WaitTaskEnd#20) Task 'addHost' error: The operation is not supported on the object.

[2017-09-27 17:46:24.426] [E] Workflow execution stack:

***

item: 'Add host to cluster/item0', state: 'failed', business state: 'null', exception: 'Task 'addHost' error: The operation is not supported on the object. (Dynamic Script Module name : vim3WaitTaskEnd#20)'

workflow: 'Add host to cluster' (BD8080808080808080808080808080804EC180800122528313869552e41805bb1)

|  'attribute': name=task type=VC:Task value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:task-9563'&dunesName='VC:Task'

|  'attribute': name=progress type=boolean value=false

|  'attribute': name=pollRate type=number value=1.0

|  'input': name=cluster type=VC:ClusterComputeResource value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:domain-c766'&dunesName='VC:ClusterComputeResource'

|  'input': name=asConnected type=boolean value=true

|  'input': name=resourcePool type=VC:ResourcePool value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:resgroup-767'&dunesName='VC:ResourcePool'

|  'input': name=force type=boolean value=true

|  'input': name=hostName type=string value=host01.mylab.lan

|  'input': name=port type=number value=443

|  'input': name=userName type=string value=root

|  'input': name=password type=SecureString value=__NULL__

|  'input': name=vmFolder type=VC:VmFolder value=dunes://service.dunes.ch/CustomSDKObject?id='snrvc01.sonar.lan%2Cid:group-v768'&dunesName='VC:VmFolder'

|  'input': name=license type=string value=

|  'output': name=newHost type=VC:HostSystem value=null

*** End of execution stack.

 

If I use the same details, I can successfully add the the host in the vSphere webclient using the same details as I use in the workflow.

 

Anyone have any ideas?

Email Results of Invoked Powershell

$
0
0

HI, I have spent a few days looking for away to export the output of the "invoke a powershell" module but can't seem to find anything recent. Most post point me to writning Javascript to get the results into an email. My thougth is you can have "invoke a powershell" and the map the output of that to the content of the "Send notfication" module. Can I map this in visual binding or do I need to write Javascript? 

Thanks. 

Correctly sending custom headers to Invoke a Rest Operation

$
0
0

So I'm very new to vRO (less than 48 hours), but I'm getting the hang of it.

 

I'm porting a powershell script over to vRO for reasons that I don't want to get into (long political story). I'm having a problem specifying custom headers to the "Invoke a REST operation" workflow within my custom workflow. The specific headers should look like this:

"x-isi-ifs-target-type" = "container"

"x-isi-ifs-access-control" = 770

(the target-type container is mandatory, the other one isn't)

 

When I look at the Invoke a REST operation workflow, I see that it has some inputs called headerParamX (where X = [0..9]). I've figured that was going to be my key to victory, however no victory has been obtained.

I've created an attribute named fheader1, set the type to string, and put the value at "x-isi-ifs-target-type" = "container". I then bound fheader1 to headerParam0. However when I run the workflow, here is the relevant output:

[2019-04-24 08:02:04.335] [I] ****Headers****

[2019-04-24 08:02:04.337] [I] container

[2019-04-24 08:02:04.338] [I] Wed, 24 Apr 2019 13:50:17 GMT

[2019-04-24 08:02:04.340] [I] 1.0

[2019-04-24 08:02:04.341] [I] timeout=15, max=500

[2019-04-24 08:02:04.342] [I] Apache/2.4.29 (FreeBSD) OpenSSL/1.0.2o-fips mod_fastcgi/mod_fastcgi-SNAP-0910052141

[2019-04-24 08:02:04.344] [I] Wed, 24 Apr 2019 15:02:04 GMT

[2019-04-24 08:02:04.345] [I] GET, PUT, POST, DELETE, HEAD

[2019-04-24 08:02:04.347] [I] application/json

[2019-04-24 08:02:04.348] [I] 0777

[2019-04-24 08:02:04.349] [I] chunked

[2019-04-24 08:02:04.351] [I] Keep-Alive

[2019-04-24 08:02:04.352] [I] "4294967298-18446744073709551615-266"

[2019-04-24 08:02:04.388] [I] Setting defaut content type to: 

[2019-04-24 08:02:04.389] [I]  acceptHeaders null

[2019-04-24 08:02:04.404] [I] Content as string:

{"errors" : [

{

"code" : "AEC_ARG_REQUIRED",

"message" : "'x-isi-ifs-target-type' must be set."

}

]

}

 

It looks like it sent the parameter container but may not have given it the right name? I'm not sure. I've tried a few different formatting options as well, removing quotes, etc. I've also seen that most people tend to just write their own REST calls in javascript and use "Scriptable task", but that sort of defeats my purpose of trying to put this into a format that "non-scripters" can read (again, long political story).

 

Please random people from the internet, tell me what I'm doing wrong. My poor hairline can't take it anymore...

vRO 7.3 API problem

$
0
0

In the vro 6.0, we can get vm resource via API like that:

 

# /usr/bin/curl -s -k --user vcouser:vcouser -H Accept:application/xml -X GET https://172.20.223.20:8281/vco/api/catalog/VC/ClusterComputeResource/10.5.33.121%252Fdomain-c112/getDatastore\(\)

 

or

# /usr/bin/curl -s -k --user vcouser:vcouser -H Accept:application/xml -X GET https://172.20.223.20:8281/vco/api/catalog/VC/ClusterComputeResource/10.5.33.121%252Fdomain-c112/getNetwork\(\)

 

by following the document: https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/ClusterComputeResource.html.

 

 

But how can we use this same method in vRO 7.3?

 

 

I try it like this in vRO 7.3, but can not get anything:

 

# /usr/bin/curl -s -k --user vcouser:vcouser -H Accept:application/xml -X GET https://172.20.223.20:8281/vco/api/catalog/VC/ClusterComputeResource/10.5.33.121%252Cid%253Adomain-c112/getDatastore\(\)

 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><error status="404" message="findByRelation()"/>

 

 

Do anybody know it? Many thanks.

Workflow Editor Customization

$
0
0

The vRO Java client has a customization option called "Use direct lines as workflow diagram links". According to the documentation:

"The connector tool uses direct lines to link the workflow schema elements."

 

I unchecked this option but did not notice any effect on connecting elements on the schema. What should change?

Is it possible to use a Single Reservation which dynamically enables the Compute, Network and Storage resources?

$
0
0

My customer's requirement is to use single reservation which should dynamically enable the Compute, Network and Storage resources whenever there is an addition of resources in vCenter endpoint. The customer submits the build sheet in excel, which will be converted to JSON format in ITSM tool and given as an input to vRO endpoint which invokes the VM build selecting a catalog item(we have used REST services and workflows in place for this). The build sheet will be pre validated before raising a request in ITSM tool. Customer requires the automation to centralize from ITSM tool.

 

The sheet basically consists of Static IP with VLAN info, Disk details with Datastore name, cluster and location. We have created multiple catalog items based on location and OS type. So selecting catalog item will be based on location and OS type.

 

My idea is to create a single fabric and enable all the clusters from different locations, single Business group and Single Reservation.

 

Please let me know the options. daphnissovjasnyderGrantOrchardVMware


get catalog resource using the catalogitemrequest.id

$
0
0

I am trying to do a test if my request created a catalogresource by comparing `CatalogItemRequest.id` and `catalogResource.requestId`. please see the code

 

 

var catalogResources = vCACCAFEEntitiesFinder.getCatalogResources(cafeHost);

for each (var resource in catalogResources) {
    System.log("resource name: " + resource.name + "resource request id: " + resource.requestId + "request id: " + request.id)    if (resource.requestId == request.id) {        provisionedDeployment = resource.name;        System.log(provisionedDeployment)    } else {throw "Error: the deployment not found"};
}

 

I get the output of

System.log("resource name: " + resource.name + "resource request id: " + resource.requestId + "request id: " + request.id) 

like below

resource name: win2012r2-OUtestresource request id: 34ddfaab-f133-4985-aa32-eb7eacb90ff0 request id: 34ddfaab-f133-4985-aa32-eb7eacb90ff0

 

and it shows that the CatalogItemRequest.id is equal to catalogResource.requestId` but the check in the `if` statement fails and else statement is executed. any help is much appreciated

vRA / vRO with vCloud Director

$
0
0

Hi All

 

We use vCD 5.5 (upgrading soon) and i was wondering if its possible to use vRA / vRO to create automation workflows for mundane tasks

 

For example, would it be possible to automate the expansion of a disk in vCD for a VM and then extend the disk in the OS also ?

 

Thanks for any help

Defference between vCenter Migration vs Backup and Restore

$
0
0

Folks,

 

I really would like to understand what is the Difference between vCenter Migration vs Backup and Restore.

 

I have a vcenter server 6.5 windows based, CISCO Hyperflex is installed on top of that.

We had migrated this server to VCSA 6.7 and everything looks fine. I deployed a new hyperflex cluster as well. all looks stable.

 

The problem came up when we remove and try to reregister the Hyperflex cluster it is throwing an error "VI SDK Exception: com.vmware.vim25.InvalidLogin"

I tried all troubleshooting in hyperflex side finally came to know some issue from the vcenter side(for testing we deployed new vcenter and deployment, reregister everything works smoothly on this )

 

Now am going to try to take the backup from vCenter management appliance and restore the inventory and configuration to new vcenter. Is this make any changes? Is it make sense?

 

Am invite experts advise of this, please!!!!

How to import and export configuration elements by script.

$
0
0

Hi There,

 

We cannot have permissions to go to VRA / vRO and import and export Configuration element in prod.

So, I am trying to write a script to export and import the configuration elements but I am unable to do that.

 

Can anyone help me out to achieve this?

 

Thanks,

Laxmi.

getAllVirtualMachines problems

$
0
0

In troubleshooting another workflow that takes hours to complete, I created a simple workflow that takes an sdkConnection as an input, and does a getAllVirtualMachines().

 

VMs is an Array/VC:VirtualMachine here, output to an attribute:

VMs = sdk.getAllVirtualMachines();
System.debug(VMs.length + " VMs found.");

 

This logs the length of the array in a second or two, but then the VMs attribute remains undefined, with the vco server load average ramping up, and server.log spamming this for seemingly every VM:

 

2018-06-15 11:36:05.434-0500 [taskExecutor-8] ERROR {} [ObjectUpdateParser] assign disabledMethod -> VirtualMachine::vm-54649
2018-06-15 11:36:05.434-0500 [taskExecutor-8] ERROR {} [ObjectUpdateParser] Ignore error and continue with others updates
java.lang.RuntimeException: java.lang.IllegalStateException: Cannot find managedMethod with name: MountToolsInstallerImage        at com.vmware.o11n.plugin.vsphere.pc.ObjectUpdateParser.applyProperyChange(ObjectUpdateParser.java:65)        at com.vmware.o11n.plugin.vsphere.pc.ObjectUpdateParser.processObjectUpdate(ObjectUpdateParser.java:112)        at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate.processUpdateSet(CacheUpdate.java:110)        at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate$UpdateSetHandler.nextUpdateSet(CacheUpdate.java:171)        at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate.run(CacheUpdate.java:66)        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)        at java.lang.Thread.run(Thread.java:748)

 

It eventually threw this in the vco client:

 

[2018-06-15 10:56:06.041] [D] 2541 VMs found.

[2018-06-15 11:00:28.113] [E] Workflow:Get all virtual machines / Scriptable task (item1) : ch.dunes.model.type.ConvertorException: Unable to convert object, 'Stub: moRef = (ManagedObjectReference: type = VirtualMachine, value = vm-704346, serverGuid = null), binding =https://fqdn.com/sdk' plugin exception reason : convertToResult() --> Finder 'VC:VirtualMachine' : unexpected error 'ch.dunes.model.sdk.SDKFinderException: convertToResult() --> Finder 'VC:VirtualMachine' : unable to invoke read method : 'name''

 

Is this supposed to work? I think the error in the client is because a VM was deleted mid-way through the run?

 

vCO 7.3.0.5481809

vSphere Version 6.5.0.10000 Build 7119157

VC Plugin 6.5.0.7720419

 

Thank

Setting vRA service icons from vRO

$
0
0

Hi All,

 

I'm working on creating vRA services from a vRO workflow.

 

The service creation is working fine, but I need to set the service's icon. I found this:

 

https://michaelpoore.com/2017/03/how-to-change-the-vra-7-2-all-services-icon-using-vro/

 

This changes the "All services" icon. I just want to change the icon of the service that I'm creating, basically I think I need a different Id for this line in the example above:

 

iconObj.setId("cafe_default_icon_genericAllServices");

 

Any ideas?

 

Thanks,

 

Tim.

 

Configuration Element - Element Not Set

$
0
0

Hi, this one should not be that complicated...

 

I have a workflow that send an email at the end using the Library / Mail action.

I have the binnding done .. i.e for toAddress, smtpHost, smtpPort, etc...

However there are by default the username and password, etc.. that are also correctly bind.

 

The problem is that I created a configuration element with all the value that I need there... and it is linked on the workflow.

 

When I validate the workflow... sometimes I get an "Attribute <attribute_name> configuration not set" error.

 

Now,.. most of the time is the password one.. so these are optional and we do not use them, so they are not set to any value in the configuration element.

 

To have the validation to succeed, I go in the configuration element, edit it, double click in the value field, and I do not change anything, just save and closed.

Rerun the validation on the workflow and it passes.

 

However the same happen again shortly after when I try to rerun the workflow.

 

Is there a way to avoid having these validation to fail because of empty configuration elements?

 

Thanks for any inputs that could help.


mySSHSession - Account Lockout

$
0
0

Was wondering if there is a way to limit the number of attemps mySSHSession tries when establishing a connection.  With the basic code below it will try multiple times and ends up locking the specified user account if an incorrect password is used.  SSH keys are an option but was just wondering about this specifically. 

var mySSHSession = new SSHSession(host,user); 

 

 

//sample command  var cmd = "uptime";

 

 

mySSHSession.connectWithPassword(myPassword);  

mySSHSession.executeCommand(cmd, true);

 

 

// add logging/debugging as needed   

var output = mySSHSession.getOutput(); 

var error = mySSHSession.getError(); 

var exitCode = mySSHSession.exitCode; 

 

     System.log(host + " - " + "Output: '" + output + "'"); 

     //System.log("Error: '" + error + "'");  

     //System.log("Exit code: '" + exitCode + "'"); 

     // close out the session:  

 

 

mySSHSession.disconnect();

Delete finished workflows

$
0
0

Hi guys,

 

Is there a way of deleting finished workflows without using the Orchestrator client?

 

Preferably a workflow which would delete all finished workflows globally would be the optimal fit..

 

Within the weboperator view you can only view/delete your own finished workflows so this is not a possible solution.

 

Thanks in advance,

 

Dave

Guest operations Get processes Permission denied

$
0
0

Hi,

 

I'm trying to execute some commands on a VM using Guest operations.

When using "Run program in guest", it seems to works: I can create a folder on C: with cmd /c md C:\folder.

But when I try to get the processes (in order to get the result of the command I ran), the workflow fails with the message: Permission to perform this operation was denied.

It's the same wether I use the local Administrator account or a domain account with administrator rights.

I have the same message when using the "Create temporary directory in guest" workflow.

Any idea or pointer?

 

Thank you,

 

Jonathan

Find a specific folder

$
0
0
Hello I am doing the vro but I have a problem creating the workflow. I am importing the Vmfolder from vCenter and putting it into the database. Importing information from vCenter's VMfolder succeeded. There is a problem here. The parent folder subfolder is not divided. Can I get the data of VMfolder with the parent folder subfolder divided? Attach the below image ex) KD-TEST (parentfolder) sub folder HK-TEST, JH-TEST In this way ...

Error importing package

$
0
0

Hi all

 

I have a customer running vRO (embedded in vRA) version 7.3.x, whom are trying to import a very simple package containing only one workflow.

But they are seeing the below error:

 

cannot assign instance of java.util.LinkedHashSet to field ch.dunes.model.pkg.impexp.PackageImport.certificates of type java.util.Vector in instance of ch.dunes.model.pkg.impexp.PackageImport

Also see the below screenshot:

 

2019-05-01_22-16-01.png

Anyone have an idea what is happening here?

 

I have tested the package can be imported in a vRO (version 7.3.0.5481809) instance that we our self have running, so it does not seem to be something version specific.

Viewing all 10285 articles
Browse latest View live


Latest Images