Quantcast
Viewing all 10285 articles
Browse latest View live

Finding a VC:VirtualMachine Object by Name after Upgrade to 7.3 now takes 5x longer

So, i have some custom workflows that are part of our provisioning process where i find the VC:VirtualMachine object from the vm name passed in by the payload so we can perform some custom actions directly on the vm with the guest agent tools.

 

Here is the snip it of code i use to do this:

 

vm = VcPlugin.getAllVirtualMachines(null, "xpath:name[translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')='VMNAME']")[0];

 

Prior to the upgrade, this action would take anywhere from 5-50 seconds.  Now, this exact same action take upwards of 5+ minutes to complete.

 

Any ideas why this might be?  Or maybe another method that might be more efficient and less time consuming?

 

Thanks in advance for any help on this!


Odd PowerShell issue

I have a powershell server configured in vRO and have been using it with no issue for several weeks. Today any new workflow calling a PS script hangs. I can see it spawn a PS instance on my PS server but nothing happens however existing PS workflows are still working fine.  When I run the PS script myself it runs fine as well. Has anyone seen anything like this before?

Technical Preview version of vRealize Orchestrator Dynamic Types plug-in

Version 1.3.0-7052852

  • Fixed a possible dynamic type configuration corruption during server startup in clustered environments
  • Compatible with vRealize Orchestrator version 7.1 and later

Workaround for hiding Start/Schedule page in VRO Plugin Action in VC WebClient?

Is there any non obvious way to disable the display of the Start/Schedule page when invoking a VRO workflow via the vCenter Web Client?  This is not displayed when executing the workflow via the java client, but seems to be displayed by default when called from the web client. 

 

I don't see any obvious way to disable, but was curious if there are any known workarounds  to disable this.

vRO + PowerShell plugin --> Get-Tag failure

vCenter 6.5d and e (tested with single VCSA/PSCA and three linked VCSA and external PSCA)

vRO 7.2.0.4629841 (built-in service in vRA 7.2.0.4659752, PS plugin @ 1.0.11)

PS script host tested with Windows 2008R2 and 2016 (connected with HTTPS, WinRM, shared session, Kerboros, and a domain cert)

 

Test script as follows:

Import-Module vmware.VimAutomation.core

Connect-VIServer -Server 'vcenter.company.loc' -User 'domain\account' -Password 'password'

$TagList = Get-Tag

 

Which results in:

PowerShellInvocationError: Errors found while executing script

Get-Tag : 8/8/2017 9:37:46 PM Get-Tag vSphere single sign-on failed for connection

'/VIServer=domain\account@vcenter.company.loc:443/'. Future operations which require single sign-on on this

connection will fail. The underlying cause was: The requested operation cannot be completed. The computer must be

trusted for delegation and the current user account must be configured to allow delegation.

 

That all being said... this worked prior to our upgrade to 6.5 from 6.0.  (and still does work to a 6.0 vCenter)  If I change the server name to a 6.0 vCenter in the connection string it works as expected.  6.5 vCenter.... errors.  What changed in the upgrade?

 

Does anyone think an vRO update to 7.3 would help?

What is missing -> vRO creates EC2Client, and returns EC2DescribeTagsRequest, but cannot filter

I've pasted the little code snippet I have been working on below.  It runs with no errors, but if I include the EC2Filter (i.e. filter out all the tags that are not [in this case] security-groups) I get nothing.  If I remark out the line that sets the filters I get dozens of key value pairs for multiple resource types.

============================================================

var ec2client = client.getAmazonEC2Client();

 

var setResourceType = new EC2Filter();

setResourceType.setName('tag: ResourceType');

setResourceType.setValues(['security-group']);

 

var tagRequest = new EC2DescribeTagsRequest();

 

// If I remark out the withFilter line below, the script runs without error

//      and returns tag data for a couple of dozen objects including those with

//      ResourceType = security-group

// If I run it with the line below included I get no errors, but an empty set [] as the output

 

tagRequest.withFilters([setResourceType]);

 

var instances = ec2client.describeTags(tagRequest);

System.log(instances);

============================================================

 

Here is the first part of the output if I don't filter the data:

 

DynamicWrapper (Instance) : [EC2DescribeTagsResult]-[class com.vmware.o11n.plugin.aws.ec2.model.DescribeTagsResult] -- VALUE :

{Tags: [

{ResourceId: sg-abcd1234,ResourceType: security-group,Key: Name,Value: sg1},

{ResourceId: sg-abcd1234,ResourceType: security-group,Key: aws:cloudformation:logical-id,Value: sg1},

...]}

 

Here is the entire output if I do try to filter the data:

 

DynamicWrapper (Instance) : [EC2DescribeTagsResult]-[class com.vmware.o11n.plugin.aws.ec2.model.DescribeTagsResult] -- VALUE : {Tags: [],}

workflow presentation - slow loading

Hi,

I’m creating Workflow related to VM deployment, allowing end user to choose elements like VMware cluster, Resource Pool, datastore, network and few others…

Most of that components are presented as array of object based on custom action.

Problem is that when I moved WF from small POC platform into larger production - workflow presentation is loading slow. I have to wait sometimes above 2 minutes to see first screen.

Do you have any ideas how that can be improved ?

 

Second question: Some of above actions are taking VMware cluster to filter objects. Cluster should be selected by user as first element. In logs I can see that when WF presentation is loading is trying to run all actions and those which required Cluster as input are failing. Is there any way to stop running actions during presentation load and do it only when user will open particular step ?

 

thanks in advance

Maciej

View Variables from completed workflows runs is super slow

Hello,

 

in vRO 7.3 the Variables from completed workflows runs is are loading super slow in UI. The same Workflows in vRO 7.0.1 have no problem...

 

Does anyone have similar experiences?

 

Best Regards,

Markus

 


Advanced "force data collection" workflow

Hi guys,

 

when working with IaaS entities in vCO / vCAC data-collection can be a pain in the a**. By default the vCAC plugin comes with a "force data collection" workflow that will start a data-collection of all data-sources of the given vCAC IaaS host. However: the workflow is implemented as an fire-and-forget task. It triggers the data-collection and finishes, giving the user no information about the collection status.

 

When building workflows that work with vCAC endpoints (e.g. vSphere) and vCAC-CAFE, this makes it hard to know when or if a endpoint ressource will be available in the vCAC IaaS entity model. Trying to solve this problem by adding long "sleep" tasks often fails because the time needed for data-collection varies alot.

So today I decided to put an end to failed workflows due to not-yet available entities in the IaaS model and created a "Advanced force data collection" workflow. It will start a data-collection and start polling in order to check the collection status. Once all triggered data-sources have been updated, it'll finish. Optionally you can set a flag so the workflow fails if a data-source could not be updated.

 

It'll probably be of no use to most of you guys, but if you ever have to work with IaaS entities, you'll love it. Enjoy!

 

About

  • This workflow will start vRealize Automation data-collection for the selected sources from vRO and return execution context  after the data-collection finished

 

Changelog

  • Changed licensing to LGPLv3, should make everyones life easier now.
  • Now allows you to select the source(s) for data-collection
  • Now handles orphaned and non-configured data-sources

 

Requirements

  • vRealize Orchestrator 6.x


Licensing

Copyright (C) 2014-2015  Robert Szymczak

This program is free software: you can redistribute it and/or modify

it under the terms of the GNU Lesser General Public License as published

by the Free Software Foundation, either version 3 of the License, or

(at your option) any later version.

This program is distributed in the hope that it will be useful,

but WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License

along with this program. If not, see <http://www.gnu.org/licenses/>.

Reading a CSV file into an array

Trying to read a CSV file that is stored on a local file W2K12 server.  The share and file has read access for everyone but I still get a read permission error.  Below is the code I started to use and the error.  Has anyone had success with this in the past?

 

[2017-11-09 12:56:20.085] [E] Permission denied on file '/xxxxx/scripts$/vminfo.csv' , read not allowed

[2017-11-09 12:56:20.090] [E] Workflow execution stack:

***

item: 'Read in a CSV and convert to objects/item1', state: 'failed', business state: 'null', exception: 'Permission denied on file '/xxxxxx/scripts$/vminfo.csv' , read not allowed'

workflow: 'Read in a CSV and convert to objects' (13735c32-bdad-42bf-b577-09e2cfd104e9)

|  'no inputs'

|  'no outputs'

|  'no attributes'

*** End of execution stack.

 

 

Code

var fileReader = new FileReader("//xxxxxx/scripts$/vminfo.csv") ;

fileReader.open() ;

var fileContentAsString = fileReader.readAll();

fileReader.close() ;

vRO plugin for vRA compatibility

I have hunted and hunted but can't seem to find out:

For the vRealize Automation plugin for vRO, what versions of vRA is it compatible with?  Specifically, plugin version 7.3.  I am wondering if I can use the reservation workflows with vRA 6.2.

 

Thanks,

Carl L.

Image may be NSFW.
Clik here to view.

Deleting orphaned vRO Context Action?

I have run into an issue where I have a Context Action still showing up in the vCenter Web Client, that no longer exists in vRO.  Because the workflow has been deleted, I'm unable to unconfigure it as a context action. 

 

Is it possible to manually delete this from the web client, possibly through the MOB explorer? 

TypeError: Cannot call method "getAttribute" of null

We have an odd issue where we have a workflow that runs and creates and AD group with the $, but it fails to rename the group with the message below.  If I start the group name with A-L it works, but anything above that failes.  We are at vrealize orchestrator 7.3 and AD plugin is 3.0.5.  I have tested on a different domain and it works fine.  So not sure if it is a AD issue. 

 

Error in (Workflow:Create AD Group and add user / Set Group Name Consistently (item12)#55024) TypeError: Cannot call method "getAttribute" of null

VcKeyAnyValue still not working?

Prior to a recent update to the vCenter plugin, it was not possible to set any value of the value property of VcKeyAnyValue objects. Since the fix, I can now set values, however if the value is an array, it is always rejected by vCenter as being an invalid type, when it definitely *should* be valid. I have tried a dozen different ways of instantiating both the array and its members used to populate the value, but the result is always the same.

 

I suspect the issue is similar to what is documented at https://kb.vmware.com/s/article/1029155 and vCO is not explicitly specifying "ArrayOfString" when it is interacting with vCenter at the SOAP layer. Similar behavior is evident in PowerShell for an array of strings if the array's type is "String." However if the array's type is "String[]," it works. I have been unable to figure out any way to create a similar "strong typed" array in vCO's JavaScript which is accepted by vCenter.

 

Has anyone successfully modified any managed object property of type VcKeyAnyValue when the value is an array?

Image may be NSFW.
Clik here to view.

Escape character for a reserved word

I am using a scriptable task to create some XML and running into an issue where an element is a reserved word (interface).  

 

For example

var interfaceXml = new XML('<interfaces><interface><name></name><addressGroups><addressGroup><primaryAddress></primaryAddress><subnetMask></subnetMask></addressGroup></addressGroups><mtu></mtu><type></type><isConnected></isConnected><connectedToId></connectedToId></interface></interfaces>');

 

interfaceXml.interfaces[0].interface[0].name="GW-172.16.120.1";

 

How do I escape the interface word? 

Image may be NSFW.
Clik here to view.

upgrade to 7.3 and can't see completed workflows anymore

We recently upgraded to 7.3 and we can no longer see completed workflows.  has anyone else  ran into this issue?

Managing code in VRO

Hello,

 

I was wondering how's everyone else is doing about managing the code in VRO when there is multiple developpers on the same node ?

Some of my team sometimes forget to increase the version of a workflow, sometime we are testing stuff on the same workflows and we overwrite each other.

 

So do you normally share VRO nodes ? Do you use a plugin ? Have you found a way to integrate it with Git ?

 

I'm working about integrating my workflows into Gitlab using CodeGuardian plugin, but still we will share the vro node and might overwrite each other.

 

So how do you work in VRO when in a team of devs ? And multiple environnement dev/preprod/prod ?

 

Thanks!

Error when trying to use System.getModule("com.jm-test").secureStringToString(password1); (vRA/vRO 7.3

I was doing some coding with passwords and came across some information on using a JavaScript method to convert a SecureString to a plain String. Unfortunately, I get the following error when validating a workflow (one scriptable task with only the code below, nothing else) with this code snippet:

 

System.getModule("com.jm-test").secureStringToString(password1);

 

The error is:

 

Script item 'Scriptable task' use an undefined Action or Module.

Info: Unable to find Action 'System.getModule("com.jm-test").secureStringToString()' in the system

 

Any idea as to why this is happening or how to fix it?

 

 

Presenting a Password Confirmation Form in vCO / vRO

http://www.jonathanmedd.net/2015/01/presenting-a-password-confirmation-form-in-vco-vro.html

 

How to use the Credential object?

How to use the Credential object?

vRO AWS Plugin

Hi,

I have successfully installed "VMware vRealize Orchestrator Plug-In for Amazon Web Services 1.0.0.2" on our vRA environment and was able to add an amazon account as well.

 

Problem is that when executing the "Add Amazon Account" workflow, not all regions are picked up and added by the plugin.  i.e. us-east-2 is missing.

 

Looking at the Add Amazon account workflow in more detail, inside Get Endpoint URLs, the following script does not seem to get all regions and load to the endpoints array.

 

var regions = AWSRegionManager.findAllRegions();

endpoints = new Array();

for (var i = 0; i < regions.length; i ++) {

endpoints.push(regions[i].getEndpoint());

}

 

It smells like a bug for this aws vro plugin within "Add Amazon Account" workflow...

 

Anyone encountered this issue as well?

Major problems with parseInt in vRO

parseInt seems to have massive problems with 8 and 9 when you add leading ZEROS to it.

 

exampel script:

for (i=0;i<10;i++){

    strNumber=i.toString();

    System.log(strNumber);

    System.log(parseInt("0"+strNumber));

    System.log(parseInt("00"+strNumber));

    System.log(parseInt("000"+strNumber));

    System.log(parseInt("0000"+strNumber));

}

 

output:

[2017-06-01 10:01:10.222] [I] 0

[2017-06-01 10:01:10.223] [I] 0

[2017-06-01 10:01:10.224] [I] 0

[2017-06-01 10:01:10.225] [I] 0

[2017-06-01 10:01:10.226] [I] 0

[2017-06-01 10:01:10.227] [I] 1

[2017-06-01 10:01:10.228] [I] 1

[2017-06-01 10:01:10.229] [I] 1

[2017-06-01 10:01:10.230] [I] 1

[2017-06-01 10:01:10.231] [I] 1

...

[2017-06-01 10:01:10.257] [I] 7

[2017-06-01 10:01:10.258] [I] 7

[2017-06-01 10:01:10.259] [I] 7

[2017-06-01 10:01:10.260] [I] 7

[2017-06-01 10:01:10.261] [I] 7

[2017-06-01 10:01:10.262] [I] 8

[2017-06-01 10:01:10.263] [I] NaN

[2017-06-01 10:01:10.264] [I] 0

[2017-06-01 10:01:10.265] [I] 0

[2017-06-01 10:01:10.266] [I] 0

[2017-06-01 10:01:10.267] [I] 9

[2017-06-01 10:01:10.268] [I] NaN

[2017-06-01 10:01:10.269] [I] 0

[2017-06-01 10:01:10.270] [I] 0

[2017-06-01 10:01:10.271] [I] 0

 

What one has to do is:

parseInt(nun,10);

 

The ,10 is an old depricated feature of parseInt that lets you choose your BASE...and we want the 10 base not ocatal (8 = default when leading 0)....thats why it fails at 8 and 9.

 

wonderFOOL

 

for (i=0;i<10;i++){

    strNumber=i.toString();

    System.log(strNumber);

    System.log(parseInt("0"+strNumber,10));

    System.log(parseInt("00"+strNumber,10));

    System.log(parseInt("000"+strNumber,10));

    System.log(parseInt("0000"+strNumber,10));

}

Viewing all 10285 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>