Windspirit's Posts

oh well... Sometimes it helps just to step away... here the answer: profile=hostProfileManager.findAssociatedProfile(host)[0]; exec=profile.executeHostProfile(host); taskID=hostProfileMan... See more...
oh well... Sometimes it helps just to step away... here the answer: profile=hostProfileManager.findAssociatedProfile(host)[0]; exec=profile.executeHostProfile(host); taskID=hostProfileManager.applyHostConfig_Task(host,exec.configSpec); stuff=System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(taskID,false,2); The problem was that I didn't realize that the type vc:Profile is the same as the type vc:HostProfile​ --------------------------------------------------------------------------------------------------------- Was it helpful? Let us know by completing this short survey here.
Hi all, I been hammering away at this but I'm having trouble. System: vCenter 6.7, vRO  7.6 Objective: remediate (apply host profile) to esxi after changing some content of the Answer file. ... See more...
Hi all, I been hammering away at this but I'm having trouble. System: vCenter 6.7, vRO  7.6 Objective: remediate (apply host profile) to esxi after changing some content of the Answer file. What I have: I have added a host profile to the Cluster, added a new ESXi, changed the answer file content What I cant figure out: How to apply the host profile. API tells me to use: VcHostProfileManager.applyHostConfig_Task() however it requires VcHostConfigSpec and I cant find to get them. Anyone?
I would assign the hostProfile to the cluster. This way any new Host joining the cluster will inherit the host profile and you just need to execute it on the host.
Hi, late but...here is a function that recursively searches (if there are more folders in between the Cluster and the Datacenter) function getChildren(folder){     for each (child in fold... See more...
Hi, late but...here is a function that recursively searches (if there are more folders in between the Cluster and the Datacenter) function getChildren(folder){     for each (child in folder.childEntity){         if (child instanceof VcClusterComputeResource){             output.push(child);                         System.debug("Cluster added: "+child.name);         }         if (child instanceof VcFolder){             System.debug("found folder "+child.name);             getChildren(child);         }     }     return output; }   if (datacenter){     var output = new Array;     return getChildren(datacenter.hostFolder); } else {     throw ("no Datacenter provided"); }  
HI, did you had any success in integrating Converter with vRO? Would be very intrested to hear about that D
Hi all, background: vRA 7.5 HF5 Custom Forms with Image (component Profile - Image)...look not very attractive to he honest (see below) As this reacts to a property I thought of using ... See more...
Hi all, background: vRA 7.5 HF5 Custom Forms with Image (component Profile - Image)...look not very attractive to he honest (see below) As this reacts to a property I thought of using my trick from vRA Custom Forms Enter Memory in GB rather then MB to create a much nicer selection, HOWEVER I cant find the Component Profiles via vRO. The most I got was the permissable Values for a given blueprint: blueprint.components.get("deploy_macos_vm").getComponentProfiles().getPermissibleValueNames(). Anyone any idea what the ScriptingClass is called? ATM Im waorking around the issue by manually editing the Image field ValueOptions in custom forms....
I finaly found a solution: vRA Custom Forms Enter Memory in GB rather then MB
I finaly found a solution: vRA Custom Forms Enter Memory in GB rather then MB
SOLVED: https://code.vmware.com/forums/5098/vrealize-automation#544476 thanks to Brian_Markussen
HI, Im trying to assign a Storage Reservation Policy to an datastore using vRO. Not finding it. I looked thought teh resevervation enity and the Host enity...but I cant find it. Anyone?
The reservationID problem is now fixed with KB 59378 Custom forms are stuck at "Loading" and the form does not populate in the UI. (59378)
HI, Not sure I understand your Question.... There is no direct correlation between vRA custom Forms and vSphere Anatoation...well except the _Notes ...but I havent tested that.
Hi, as mentioned above...you need to input the user as a parameter. But it works again in 7.5....the context at least.
Cause I have been asked, here is the code to get a VCACVM from the rootRequestID using Post Approval Properties Inputs: payload (properties) Output: vcacvm (vcac:vm) var notFound=true;... See more...
Cause I have been asked, here is the code to get a VCACVM from the rootRequestID using Post Approval Properties Inputs: payload (properties) Output: vcacvm (vcac:vm) var notFound=true; rootRequestID=payload.sourceInfo.externalInstanceId; vcacvms=Server.findAllForType("vCAC:VirtualMachine", "IsManaged eq true"); for each (vcacvm in vcacvms){     vmProps=System.getModule("de.vleet.vra.tools").getPropertiesFromVCACVM(vcacvm);     if (rootRequestID==vmProps.get("__Cafe.Root.Request.Id")){         notFound=false;         break;     } } if (notFound){     vcacvm=null; }
Hi all, Im trying to get the VM Name (or vCAC:VM or VC:VM) from a Post Approval Event. However I'm not getting there. What I did: vRA 7.5 Created Approval (tried both) Catalog Item Reques... See more...
Hi all, Im trying to get the VM Name (or vCAC:VM or VC:VM) from a Post Approval Event. However I'm not getting there. What I did: vRA 7.5 Created Approval (tried both) Catalog Item Request Catalog Item Request - VM Created Subscription for post Approval Whats Happening: When you run the following code after the deployment you get the VCAC:VM as well as the Deployment, however during the PostApproval Phase the Deployment doesn't have a Child (e.g. the VM) and the code doesn't show the vCAC:VM at all as a Resource. Additionally there is no difference in between the properties and context the different approvals provide. So even with the VM approval no name or reference to the VM. The only way I have found so far is to loop all vCAC:VMs pull there Properties and search for the _rootRequestID. However that is a bit hard with some 1000+ VMs...so there must be a better way. My approval workflow (attached) LogAllProp packed here : logAllProps Code: requestID=payload.sourceInfo.externalInstanceId; tenant=System.getContext().getParameter("__asd_tenantRef"); var vcacCafeHost = vCACCAFEHostManager.getDefaultHostForTenant(tenant , "true") var client = vcacCafeHost.createCatalogClient(); var requestService = client.getCatalogConsumerRequestService(); var resources = requestService.getResourcesProvisionedByRequest(requestID, null).getContent(); for each (resource in resources){     System.log(resource.name) } All props and context the Approval provides: (sourceInfo.externalInstanceId is the root Request ID) [2018-11-15 11:28:07.562] [I] ## Context ##################################### [2018-11-15 11:28:07.564] [I] __asd_catalogRequestId (string): 3dddb191-c851-4b8e-ad76-cd8b1afd4af1 [2018-11-15 11:28:07.567] [I] __asd_correlationId (string): 15a11bd9-4986-4f30-890a-8ed19f004dfd [2018-11-15 11:28:07.569] [I] __asd_requestInstanceId (string): 223e23b0-e8c1-11e8-4ab2-b56832208a21 [2018-11-15 11:28:07.571] [I] __asd_requestInstanceTimestamp (string): "2018-11-15T10:28:03.563Z" [2018-11-15 11:28:07.574] [I] __asd_requestInstanceTypeId (string): approval-com.vmware.cafe.catalog.request.post [2018-11-15 11:28:07.576] [I] __asd_requestTraceId (string): zBPpqOka [2018-11-15 11:28:07.578] [I] __asd_requestedBy (string): approval-service [2018-11-15 11:28:07.580] [I] __asd_requestedFor (string): approval-service [2018-11-15 11:28:07.582] [I] __asd_targetResourceId (string): 2589ccfb-eecf-4ef9-86dc-16a5e651b47f [2018-11-15 11:28:07.585] [I] __asd_targetResourceProviderId (string): 5f68559d-276b-4163-9844-cf8d0a27a1e6 [2018-11-15 11:28:07.587] [I] __asd_targetResourceProviderTypeId (string): com.vmware.csp.core.cafe.approvals [2018-11-15 11:28:07.589] [I] __asd_targetResourceTypeId (string): ApprovalRequest [2018-11-15 11:28:07.592] [I] __asd_tenantRef (string): acme [2018-11-15 11:28:07.594] [I] ## Payload ##################################### [2018-11-15 11:28:07.597] [I]  (properties) [3] [2018-11-15 11:28:07.599] [I] /businessJustification (string): string [2018-11-15 11:28:07.600] [I] /createDate (date): Thu Nov 15 2018 10:28:03 GMT-0000 (UTC) [2018-11-15 11:28:07.602] [I] /fieldNames (properties) [1] [2018-11-15 11:28:07.604] [I] /fieldNames/businessJustification (string): string [2018-11-15 11:28:07.606] [I] /requestInfo (properties) [10] [2018-11-15 11:28:07.608] [I] /requestInfo/approvalLevel (properties) [4] [2018-11-15 11:28:07.610] [I] /requestInfo/approvalLevel/classId (string): ApprovalLevel [2018-11-15 11:28:07.612] [I] /requestInfo/approvalLevel/id (string): 4a0a372e-ddfc-4cfc-9c07-10ccc86bfe81 [2018-11-15 11:28:07.614] [I] /requestInfo/approvalLevel/label (string): vraPostApproval [2018-11-15 11:28:07.615] [I] /requestInfo/approvalLevel/type (string): entityReference [2018-11-15 11:28:07.617] [I] /requestInfo/approvalLevelName (string): vraPostApproval [2018-11-15 11:28:07.619] [I] /requestInfo/approvalRequestId (string): 2589ccfb-eecf-4ef9-86dc-16a5e651b47f [2018-11-15 11:28:07.621] [I] /requestInfo/createDate (date): Thu Nov 15 2018 10:28:03 GMT-0000 (UTC) [2018-11-15 11:28:07.623] [I] /requestInfo/itemDescription (string): [2018-11-15 11:28:07.625] [I] /requestInfo/itemName (string): smallRHEL [2018-11-15 11:28:07.626] [I] /requestInfo/requestRef (string): 47 [2018-11-15 11:28:07.628] [I] /requestInfo/requestedBy (string): acme_admin@vsphere.local [2018-11-15 11:28:07.630] [I] /requestInfo/requestedFor (string): acme_admin@vsphere.local [2018-11-15 11:28:07.632] [I] /requestInfo/subtenantId (string): 06890147-51f7-4857-98c7-e5b6ca2d9dcd [2018-11-15 11:28:07.634] [I] /requestInfo/type (string): entityReference [2018-11-15 11:28:07.636] [I] /serviceId (string): ea08b8e8-196f-4cd7-bff4-92c5f504aac8 [2018-11-15 11:28:07.637] [I] /sourceInfo (properties) [3] [2018-11-15 11:28:07.639] [I] /sourceInfo/externalClassId (string): request [2018-11-15 11:28:07.641] [I] /sourceInfo/externalInstanceId (string): 15a11bd9-4986-4f30-890a-8ed19f004dfd [2018-11-15 11:28:07.643] [I] /sourceInfo/serviceId (string): ea08b8e8-196f-4cd7-bff4-92c5f504aac8 [2018-11-15 11:28:07.645] [I] #############################################
ReservationPolicyID (1st take): create as in standard Document as customProp with external value add to Blueprint works fine with nonCustomForm (creates VM) make customForm Request is worki... See more...
ReservationPolicyID (1st take): create as in standard Document as customProp with external value add to Blueprint works fine with nonCustomForm (creates VM) make customForm Request is working and you can select values, however after sumitting the depoyment stalls with: "The following component requests failed: vSphere__vCenter__Machine_1. Allocation request [Composition RequestId: [8a55591f-362a-41bf-bddd-fbeea44e8a17], CompTypeId: [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [test], CompId: [vSphere__vCenter__Machine_1], BlueprintRequestId: [c245f027-587c-4bc2-94d4-e14e2af5b8d9], RootCafeRequestId: [6548f844-339c-4008-be9c-6ea93bbee584], SubtenantId: [06890147-51f7-4857-98c7-e5b6ca2d9dcd]] with binding id [bef1c79c-1188-4cf6-9f04-41040d76816d] failed with [Infrastructure service provider error: A server error was encountered. Error requesting machine. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).]." ReservationPolicyID (2nd take): go to customForms and take external value from getApplicableReservationPolies (using CustomForms) request ...you are able to select the correct values (Forms pass on Context variables) However on Submitt the request stalls with : "The deployment request failed when it was sent to the server. The data specified within the request is invalid. The value for the 'ReservationPolicyID' field should be among the permitted values." ReservationPolicyID (3rd take): go to customForms and take external value from getApplicableReservationPolies_custom (see community post) Can select values however same error as above: "The deployment request failed when it was sent to the server. The data specified within the request is invalid. The value for the 'ReservationPolicyID' field should be among the permitted values." So basically ReservationPolicyID isnt working at the moment at all.....or Im doing something very wrong...either way...let me know
IN addition to that: CustomForms pass on Context...however incorrectly. I can't get Reserveation ID working with external Value (via customForms not customProp) as it seem not to pass on the ... See more...
IN addition to that: CustomForms pass on Context...however incorrectly. I can't get Reserveation ID working with external Value (via customForms not customProp) as it seem not to pass on the context on submitting.
So....7.5 out and tested. Results: What works Custom Forms are now copied when a Blueprint is copied Custom Props Variable type comes across ID comes across Label can be Changed An Drop... See more...
So....7.5 out and tested. Results: What works Custom Forms are now copied when a Blueprint is copied Custom Props Variable type comes across ID comes across Label can be Changed An Drop-down defined in the Custom Properties comes across and one can select a value value external (vRO Actions) with output  Array/String or Properties Constrains work now in the as expected What dosn't Work: Still cant define you own ID in custom forms...just the label... Using External Workflows as input for custom Properties sometimes causes the Custom form not to load, needs a browser refresh. I can't get ReservationPolicyID to work. I get an error: The following component requests failed: vSphere__vCenter__Machine_1. Allocation request [Composition RequestId: [8a55591f-362a-41bf-bddd-fbeea44e8a17], CompTypeId:  [Infrastructure.CatalogItem.Machine.Virtual.vSphere], BlueprintId: [test], CompId: [vSphere__vCenter__Machine_1], BlueprintRequestId: [c245f027-587c-4bc2-94d4-e14e2af5b8d9], RootCafeRequestId: [6548f844-339c-4008-be9c-6ea93bbee584], SubtenantId: [06890147-51f7-4857-98c7-e5b6ca2d9dcd]] with binding id [bef1c79c-1188-4cf6-9f04-41040d76816d] failed with [Infrastructure service provider error: A server error was encountered. Error requesting machine. Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).]. Which looks like some Web problem ...lots of entries...but I must pass on that. EDIT 29.11.18 The loading and the reservationPolicyID problems are now fixed with this KB VMware Knowledge Base EDIT 11.02.19 Well...the above wasnt true but a fluke that comes with the update. HERE Custom Forms ReservationPolicyID fixed is how to fix that problem once and for all.
The correct answere is...add vCenter instance to your vRO that is connected to vRA. -> run the Workflow Add a vCenter Server instance.
BRILLIANT WORK anba89 I had the same problem...however it wasn't a plugin in my case but an Config element that had the same name but was in differnt folders. Removing the config elemnet and c... See more...
BRILLIANT WORK anba89 I had the same problem...however it wasn't a plugin in my case but an Config element that had the same name but was in differnt folders. Removing the config elemnet and cleaning up its dependencies (all workflows that used that conifg element) solved the problem.