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

max number of items in an array attribute

$
0
0

hello I am using this code to read all the lines of a postgresSQL table (100 000 lines )

 

var columns = {
};
var result  = vmsTable.readRecords(columns, false);

 

this works and in 5 seconds my result variable is filled with the 100 000 lines

but if the result variable is replaced by an array attribute of type any the script gives me the error

 

[2018-03-14 12:37:21.219] [E] Workflow execution stack:

***

', state: 'failed', business state: 'null', exception: 'null'

*** End of execution stack.

 

and if I reduce the number of lines to about 3000 it works but the workflow is very long (for exemple to log each value )

 

is there a maximum number of lines to use in array attributes to avoid performance issues?


programmatically changing workflow task name & description? __taskName & other __ special parameters?

$
0
0

I've been poking around the development documentation, working on a workflow that schedules another workflow to be executed at specified time/dates.  I've got things somewhat functional, but have some ideas for improvements that I'm trying to implement.

 

I came across an example in the Developers Guide that shows how to specify the name of a scheduled workflow at creation by using the special '__taskName' parameter which works as expected.  I'm curious, are there other special underscore parameters that I can use for more control over the scheduled workflows I create via javascript?  I attempted to use '__taskDescription', hoping to be able to write a descriptive description but that didn't appear to work.

 

Are there other underscore parameters similar to __taskName?  I don't see anything in the developer guide other than this one lone example.

how can we dynamically use the value entered in one property in blueprint to decide whether to show another property or not? I want to do it without using the xaas blueprint.

$
0
0

Hi,

I have a requirement to ask the user if they want to go with previously configured things or want to create a new one. I want to show one boolean property to user to choose the option and if the value is no, I want to show another propery to enter the inputs for new configuration.

I saw this is done in the initial vsphere configuration xaas blueprint. Can this be done in the blueprints other than xaas blueprints?

Thanks,

Isha

Add Network from VDS

$
0
0

Hi,

 

I try to add a network adapter to a new VM from Virtual Distributed Switch with the orchestrator.

However, in the end the network adapter is added but the status is disconnected.

When I add it manually, it works fine.

 

I use this code:

 

var vmConfigSpec = new VcVirtualMachineConfigSpec();   

var deviceConfigSpec = new VcVirtualDeviceConfigSpec();   

 

deviceConfigSpec.operation = VcVirtualDeviceConfigSpecOperation.add; 

deviceConfigSpec.device = new VcVirtualVmxnet3(); 

deviceConfigSpec.device.key = -100; 

deviceConfigSpec.device.backing = new VcVirtualEthernetCardNetworkBackingInfo();  

deviceConfigSpec.device.backing.deviceName = adapterNetwork.name; 

deviceConfigSpec.device.connectable = new VcVirtualDeviceConnectInfo(); 

deviceConfigSpec.device.connectable.startConnected = true; 

deviceConfigSpec.device.connectable.allowGuestControl = true; 

deviceConfigSpec.device.connectable.connected = true; 

deviceConfigSpec.device.controllerKey = 100; 

deviceConfigSpec.device.addressType = "generated"; 

deviceConfigSpec.device.wakeOnLanEnabled = true; 

 

vmConfigSpec.deviceChange = [deviceConfigSpec];   

 

try {   

  task = newVM.reconfigVM_Task(vmConfigSpec);

} catch (ex) {   

  System.warn("Error while reconfiguring VM: " + ex);   

 

when I use the same code with a network not from VDS is works fine.

How to create parallel workflow/action in vRealize Orchestrator

$
0
0

Hi,

 

I have a requirement to create a workflow or an action which can be run in parallel way.

Please help me out on this requirement.

 

Thanks in Advance!!

Laxminarsaiah Ragi

vRA7 - How to update a "linked" (getLink) property of a vcac:entity?

$
0
0

Hi,

 

How do I update a "linked value" of a vcac:entity?

I am trying to update the HostStorageReservationPolicy "linked property" of a HostToStorage entity. I keep getting error: java.lang.NullPointerException

 

I can update the properties of the HostToStorage entity. e.gIsStorageCluster (I know this is not advisable but I tried it for testing)

This is the properties of the entity:

computeResourceToStorage.getProperties().keys : ExternalReferenceId,Flags,IsSDRSEnabled,HostToStorageID,StoragePath,IsStorageCluster

 

But I can't update the "linked properties" (e.g. HostStorageReservationPolicy)

computeResourceToStorage.getLinks(vcacHost).keys : Parent,Host,Children,HostStorageReservationPolicy,HostReservationToStorages,StorageCostProfile,Storage,VMDiskHardware

 

Script snippet:

 

I hope you can help me, thanks.

 

Brian

modify payload properties

$
0
0

Hi,

I am trying to deploy EC2 instances to multiple availability zones using vRA.

As part of the deployment I want to deploy EC2 instances in round robin to multiple availability zone.

 

example

instance1 goes  to availability zone 1

instance2 goes to availability zone 2

is there any way to achieve this using vRA or by updating property  /machine/properties/__amazon.subnetId : using vRO?

 

Thanks

Arun

How can I retrieve ResourcePool in vRealize Orchestrator without using vCenter Server plugin installed in vRealize Orchestrator

$
0
0

Hello,

 

 

I'm trying to get ResourcePool from the vCenter into vRealize Orchestrator but there is no vCenter Server instance in the vCenter Server. Can anyone suggest how we can do this using JavaScript or any other way.

 

 

Thank You.


HTTP-REST download zip file

$
0
0

Hello,

 

Trying to automate Nessus with VRO so that when we build machines once everything is done, we can run a first scan and retrieve the report. Nessus seems to be able to generate a .csv that is stored in a zip file. I'm trying to download that ZIP file into a Ressource Element. But from what I see, the RESTOperation object seems to store the reply in a string in the variable response.contentAsString.

 

I've used the Generate workflow for the REST Operation, and added a few lines if I remember.

 

It looks like this:

 

//prepare request
//Do not edit 
System.log("==== Execution du WF POST ======");


restOperation.urlTemplate = restOperation.urlTemplate + uri;


var inParamtersValues = [];
var request = restOperation.createRequest(inParamtersValues, content);
var noToken = new Number(token);
//set the request content type


request.contentType = "application/zip";
request.setHeader("X-SecurityCenter", noToken);


System.log("Request: " + request);
System.error("Request URL: " + request.fullUrl);


//Customize the request here
//request.setHeader("headerName", "headerValue");


//execute request
//Do not edit 
var response = request.execute();
System.log("request:"+request.contentType);
System.log("response:"+response.contentType);
//prepare output parameters
System.log("Response: " + response);
statusCode = response.statusCode;
statusCodeAttribute = statusCode;
System.log("Status code: " + statusCode);
contentLength = response.contentLength;
headers = response.getAllHeaders();
contentAsString = response.contentAsString;


System.log("Content a
s string: " + contentAsString);












 

But I don't want to retrieve the content as a String, is there another way to receive a binary file via VRO. ? My next step would be to run this on another machine with curl maybe.

 

Thanks,

In vRO lambda expression are possible?(fat arrow ->)

$
0
0

Hi,

1. Can we write scripts in lambda style(->)?

2. Which specification will follow (for example ecmascript) ?

 

Just curiosity to know about vRO.

 

Thank you

vRo snapshot management

$
0
0
Is it possible to make workflow to check old snapshots and send email to requestor to approve snapshot deletion or to extend deletion time.

Update VM Network during provisioning

$
0
0

We purchased a new IPAM solution that doesn't have a plugin for vRA but did have a sample on how to get the next available IP in the specified range.

 

I am running the workflow when the request hits the VMPSMasterWorkflow32.Requested - POST state as I had read somewhere that the new IP should be procured early in the build.

 

My workflow reads in information from the VM being built.  Since the user can specify any network that they have access to, I use the VirtualMachine.Network0.Name property as well as getApplicableNetworks to pull in a dropdown of the subnets.

 

I created a function to pull in the next available IP based on the VirtualMachine.Network0.Name (which works without issue). I However, when I attempt to run this module:

 

System.getModule("com.vmware.library.vcac").addUpdatePropertyFromVirtualMachineEntity(vCACHost,virtualMachineEntity,"VirtualMachine.Network0.Address",vmIP,isFalse,isFalse,isFalse,isFalse);

 

I get this error:

 

2017-09-08 11:17:32.486] [E] (com.vmware.library.vcac/addUpdatePropertyFromVirtualMachineEntity) Error in (Dynamic Script Module name : addUpdatePropertyFromVirtualMachineEntity#7) TypeError: Cannot find function getLink in object .

[2017-09-08 11:17:32.499] [E] Workflow execution stack:

***

item: 'MM Next Free IP/item1', state: 'failed', business state: 'null', exception: 'TypeError: Cannot find function getLink in object . (Dynamic Script Module name : addUpdatePropertyFromVirtualMachineEntity#7)'

workflow: 'MM Next Free IP' (b257e143-2291-4931-b5d4-8d469297f3a8)

|  'attribute': name=vCACHost type=vCAC:VCACHost value=dunes://service.dunes.ch/CustomSDKObject?id='5eb2dab1-fad8-4ae3-b949-1e7279b7cb0a'&dunesName='vCAC:VCACHost'

|  'input': name=payload type=Properties value=#[#lifecycleState#=#Properties##[#phase#=#string#POST#+#state#=#string#VMPSMasterWorkflow32.Requested#]##+#componentId#=#string#w2k12prod#+#blueprintName#=#string#ExtensibilityWF#+#componentTypeId#=#string#Infrastructure.CatalogItem.Machine.Virtual.vSphere#+#IaaSTimeoutId#=#number#23155.0#+#endpointId#=#string#af7a34a4-cdfa-43f3-893d-3490bab38d67#+#machine#=#Properties##[#owner#=#string#streebil@AMWINS.LOCAL#+#name#=#string#iteng0425#+#id#=#string#7b067f84-735b-4486-aac7-f749518b89eb#+#type#=#number#0.0#+#properties#=#Properties##[#VirtualMachine.Cafe.Blueprint.Id#=#string#ExtensibilityWF#+#__clonefromid#=#string#a84938bd-9b3b-459b-bb20-cff033d688f9#+#__Cafe.Request.BlueprintType#=#string#1#+#__InterfaceType#=#string#vSphere#+#VirtualMachine.Network0.PrimaryDns#=#string#10.10.116.8#+#__Notes#=#string#Stock production server.#+#VirtualMachine.Memory.Size#=#string#5120#+#VirtualMachine.Network0.DnsSuffix#=#string#amwins.local#+#VirtualMachine.Cafe.Blueprint.Component.Cluster.Index#=#string#0#+#VirtualMachine.CPU.Count#=#string#2#+#__VirtualMachine.Allocation.InitialMachineState#=#string#SubmittingRequest#+#__Clone_Type#=#string#CloneWorkflow#+#VirtualMachine.Cafe.Blueprint.Component.TypeId#=#string#Infrastructure.CatalogItem.Machine.Virtual.vSphere#+#__api.request.id#=#string#40f6e431-4a2f-4673-b49f-d2033f15f18d#+#__clonespec#=#string#vra#+#VirtualMachine.Disk0.Size#=#string#60#+#VirtualMachine.Admin.TotalDiskUsage#=#string#61440#+#VirtualMachine.Disk0.Label#=#string#Hard disk 1#+#__api.request.callback.service.id#=#string#1b0b4846-3f70-4526-b45b-51fd21912622#+#__DailyCost#=#string#{"type":"moneyTimeRate","cost":{"type":"money","currencyCode":"USD","amount":0.0},"basis":{"type":"timeSpan","unit":4,"amount":1}}#+#__trace_id#=#string#h35U3OR6#+#VirtualMachine.Cafe.Blueprint.Name#=#string#ExtensibilityWF#+#__iaas_request_binding_id#=#string#0352ddb3-4faa-4486-baa6-6bee35c71868#+#__Legacy.Workflow.ImpersonatingUser#=#string##+#__Legacy.Workflow.User#=#string#streebil@AMWINS.LOCAL#+#__VirtualMachine.ProvisioningWorkflowName#=#string#CloneWorkflow#+#VirtualMachine.Cafe.Blueprint.Component.Id#=#string#w2k12prod#+#VirtualMachine.Network0.DnsSearchSuffixes#=#string#amwins.local#+#VirtualMachine.Network0.Address#=#string#10.10.120.9#+#VirtualMachine.Network0.SubnetMask#=#string#255.255.255.0#+#VirtualMachine.Network0.SecondaryDns#=#string#10.11.116.8#+#VirtualMachine.Disk0.Storage#=#string#P10-SF-Platinum-VVOL#+#__reservationPolicyID#=#string#0a906444-1373-4d4d-ad89-af1e9ad8eb27#+#__clonefrom#=#string#2012R2_std_template_p10_vm65#+#VirtualMachine.Storage.Name#=#string#P10-SF-Platinum-VVOL#+#__Cafe.Request.VM.LeaseDays#=#string#1#+#__request_reason#=#string##+#__Cafe.Root.Request.Id#=#string#94bd5926-d78a-4b4b-9ff4-2841ff35d146#+#VirtualMachine.Network0.Gateway#=#string#10.10.120.3#+#VirtualMachine.Network0.Name#=#string#P10-10.10.119.0%2f24#+#VirtualMachine.Disk0.IsClone#=#string#true#]##]##+#requestId#=#string#40f6e431-4a2f-4673-b49f-d2033f15f18d#]#

|  'attribute': name=__asd_requestedBy type=string value=streebil@AMWINS.LOCAL

|  'attribute': name=__asd_tenantRef type=string value=vsphere.local

|  'attribute': name=__asd_targetResourceProviderTypeId type=string value=com.vmware.csp.iaas.blueprint.service

|  'attribute': name=__asd_requestInstanceId type=string value=d1c90c00-94a8-11e7-8196-b07524073a69

|  'attribute': name=__asd_requestInstanceTypeId type=string value=com.vmware.csp.iaas.blueprint.service.machine.lifecycle.provision

|  'attribute': name=__asd_catalogRequestId type=string value=4156aee9-3d04-451f-a461-717cecea6044

|  'attribute': name=__asd_requestedFor type=string value=streebil@AMWINS.LOCAL

|  'attribute': name=__asd_targetResourceId type=string value=7b067f84-735b-4486-aac7-f749518b89eb

|  'attribute': name=__asd_requestInstanceTimestamp type=string value="2017-09-08T11:17:25.000-04:00"

|  'attribute': name=__asd_targetResourceTypeId type=string value=machine

|  'attribute': name=__asd_correlationId type=string value=94bd5926-d78a-4b4b-9ff4-2841ff35d146

|  'attribute': name=__asd_requestTraceId type=string value=h35U3OR6

|  'attribute': name=__asd_targetResourceProviderId type=string value=103480de-6fab-456c-ad1b-15ff03450f69

|  'no outputs'

*** End of execution stack.

vRO 7.3: Object cannot be passed to sub-workflow

$
0
0

Hi guys,

 

recently we upgraded from vRO 7.2. to 7.3 and we noticed a strange behavior in one of our workflows.

During cloning of a VM we are using the VMware Workflow "Get a VirtualEthernetCard to change the network" as a sub-workflow which takes a source virtual Ethernet card and a network as input parameter.

Since we are cloning it from a template VM we are passing the first NIC of the clone as source virtual Ethernet card to this workflow.

With 7.2 this worked without any problems, but with 7.3. the sub-workflow is not executing any code at all. It immediately stops with following error:

 

[2018-03-20 13:42:14.639] [E] Workflow:Get a VirtualEthernetCard to change the network / Get key (item3) : java.util.NoSuchElementException: No value present
[2018-03-20 13:42:14.651] [E] Workflow execution stack:
***
item: 'Get a VirtualEthernetCard to changthe network/item3', state: 'failed', business state: 'null', exception: 'No value present'
workflow: 'Virtual Ethernet Card Test' (5e6ba5b9-a8c9-4261-bbda-ef57386b4626)
|  'attribute': name=sourceVirtualEthernetCard type=Any value=pojo#+AAJMAApleHRlcm5hbElkcQB+AAJMAAptYWNBZGRyZXNzcQB=
|  'input': name=cloneVm type=VC:VirtualMachine value=dunes://service.dunes.ch/CustomSDKObject?id='myvcenter.domain.com%2Cid:vm-12345'&dunesName='VC:VirtualMachine'
|  'output': name=virtuaEthernetCard type=Any value=null
--workflow: 'Get a VirtualEthernetCard to change the network' (BD8080808080808080808080808080808AC280800122528313869552e41805bb1)
  |  'attribute': name=key type=number value=0.0
  |  'attribute': name=backing type=Any value=__NULL__
  |  'attribute': name=deviceName type=string value=
  |  'attribute': name=notSupportedDeviceType type=string value=The device type is not supported
  |  'input': name=sourceVirtualEthernetCard type=Any value=pojo#+AAJMAApleHRlcm5hbElkcQB+AAJMAAptYWNBZGRyZXNzcQB[...]=
  |  'input': name=network type=Any value=null
  |  'output': name=virtualEthernetCard type=Any value=null
*** End of execution stack.

 

 

I noticed in general following difference between 7.2. and 7.3.:

  • Objects are always referenced via an Wrapper object e.g.
    • [VcVirtualMachine]-[class com.vmware.o11n.plugin.vsphere_gen.VirtualMachine_Wrapper]
    • instead of previously [VcVirtualMachine]-[class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine]

 

I am not sure if this is related to the error above but I guess so because I've never seen before that an object is referenced in the error details as a POJO. The object is in reality a VcVirtualVmxnet3 - maybe this is not passable/serializable anymore... For other objects, e.g. VcDistributedVirtualPortgroup, VcClusterComputeResource it is working so it think for objects which cannot be used as a type in parameters this happens.

 

I attached a simplified workflow which throws this error (at least on my vRO ).

 

Does anybody noticed a same behavior?

 

 

Regards,

Lukas

Create new VMkernels for vMotion

$
0
0

Hello,

 

I would like to create new VMkernels for vMotion, they have to be configured with a specific DVPortGroup

 

Thanks in advance,

 

Fred

Update Properties on a vSphere Machine Type (in a vRA Blueprint) using vRO

$
0
0

Is there any way to update the Properties (Property Groups and Custom) on a vSphere (vCenter) Machine Type in a vRA Blueprint using vRO?

 

Since I'm unable to locate any Inventory Element associated with a vSphere Machine Type in vRO, I'm not sure if this can be done.

 

I believe the vRA Property Name that I'm trying to target using vRO is VirtualMachine.Cafe.Blueprint.Component.Id

 

Thx. Ron


vRO Api to import host profile from shared path - Javascript

$
0
0

Hello All,

 

Do we have an option to import host-profile to vCenter by using vRO API's that manages host-profile manipulation?

vRO Version - 7.0.1.3533702

 

Thanks

Sandeep

Create custom types in vRO

$
0
0

Hello everyone,

I am trying to figure out how to create custom types in vRO? For example,I was looking through AWS vRO plugin that I downloaded and I can see custom types such as AWS:EC2InstanceType. When the workflow runs this pulls in instance types from AWS. I am trying to figure out where this is defined and how it does that so that I can customize it.

 

thanks

Nuz

AWS Plugin Missing Instance Types

$
0
0

I am attempting to build out an instance to our AWS environment using the AWS plugin in vRO. I can get all the objects requred for the 'Launch Instance' workflow, except the instance type. When I run the following line:

Server.findAllForType("AWS:EC2InstanceType")

I retrieve a very short list of instance types. Not at all reflecting the instance types available, not even the t2 instance family. I assume that this is because the SDK for the plugin is behind the current plugin distributed by Amazon. I also cannot create EC2InstanceType objects using the withValue() method. I get a enum error.

If the SDK truly is restricting which instance types I can use, will updating the SDK on the appliance resolve my problems? Or am I wasting my time trying to use this plugin? It seems crazy to me that the plugin is out of date by almost a year. I don't want to buiild something new on an unsupported platform.

Thanks!

vRO 7.3.1 always show service unavailable

$
0
0

I deployed the latest release 7.3.1, but it always show service unavailable when I access the web page via IP.

 

I typed http://10.240.198.176 and it redirected to http://10.240.198.176/vco/

 

I also tried https://10.240.198.176:8281/vco, also the same:

 

https://10.240.198.176:5480(Appliance configuration apge) and control-center is ok to access.  So I tried rebooted the appliance via Appliance configuration page, but did not solve the issue.

I also waited about one day, but the server was still not initialized.

 

I re-deployed a new one, the phenomenon was the same.

 

vRO 7.3.0 did not has the issue. Something I missed? Need help!!!  Thank you.

Cant change type of parameters

$
0
0

I´m adding new composite types and there is a time when i can't change type of parameters (so i can't add composite types too).  When this happend I remove a composite type, restart orchestrator client and i can change types again. I create a new composite type and again orchestrator do nothing when I try to change types

 

What is going on?

 

Thanks!

Viewing all 10285 articles
Browse latest View live


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