Quantcast
Channel: VMware Communities : All Content - vRealize Automation Tools
Viewing all 9859 articles
Browse latest View live

VRASNImportCMDB - bug in code??? ; marking CI records RETIRED

0
0

**thanks to my ServiceNow developers...

 

var numberOfPages = parsed.metadata["totalPages"];

for(var i=1; i<numberOfPages; i++){

 

If total pages = 3

and our resource is listed on page 3,

This loop will check pages 1 and 2 (missing page 3 because the criteria should be i<=numberOfPages)

 

 

Full function below:

reconcileCMDB : function() {

try{

VRASNLogger.debug('Inside  VRASNImportCMDB.reconcileCMDB: used to Reconcile the CMDB CI records');

var midServer = gs.getProperty('vrasn.midserver.name');

var endPoint = gs.getProperty('vrasn.end.point');

var _endPoint = endPoint+"/catalog-service/api/consumer/resources?withExtendedData=false&page=1&limit=20";

var request = new sn_ws.RESTMessageV2();

request.setEndpoint(_endPoint);

request.setHttpMethod('get');

var auth = new VRASNPropertiesUtil();

var authGen = auth.getSNProperties('AuthToken');

request.setRequestHeader("Accept", "application/json");

request.setRequestHeader("Authorization", "Bearer "+authGen);

request.setRequestHeader("Content-Type", "application/json");

request.setMIDServer(midServer);

var ciList = "";

var gotException = false;

var resourceID="";

var response = request.execute();

if(response.haveError()) {

VRASNLogger.error('REST call error found inside VRASNImportCMDB.reconcileCMDB for pagination: '+ response.getErrorMessage());

this.errorHandler.notify("REST call error found inside VRASNImportCMDB.reconcileCMDB for pagination: "+ response.getErrorMessage());

gotException = true;

}

else {

var responsedata = response.getBody();

var parser = new JSONParser();

var parsed = parser.parse(responsedata);

var numberOfPages = parsed.metadata["totalPages"];

var cmdbItems = parsed.content.length;

for(var j=0;j<cmdbItems;j++){

    resourceID = parsed.content[j]["id"];

ciList = ciList+resourceID+";";

}

 

for(var i=1; i<numberOfPages; i++){

_endPoint = endPoint+"/catalog-service/api/consumer/resources?withExtendedData=false&page="+i+"&limit=20";

request.setEndpoint(_endPoint);

request.setHttpMethod('get');

request.setRequestHeader("Accept", "application/json");

request.setRequestHeader("Authorization", "Bearer "+authGen);

request.setRequestHeader("Content-Type", "application/json");

response = request.execute();

 

if(response.haveError()) {

VRASNLogger.error('REST call error found inside VRASNImportCMDB.reconcileCMDB: '+ response.getErrorMessage());

this.errorHandler.notify("REST call error found inside VRASNImportCMDB.reconcileCMDB: "+ response.getErrorMessage());

gotException = true;

}

else {

responsedata = response.getBody();

parsed = parser.parse(responsedata);

cmdbItems = parsed.content.length;

for(j=0;j<cmdbItems;j++){

   resourceID = parsed.content[j]["id"];

ciList = ciList+resourceID+";";

}

}

 

}

 

if(JSUtil.notNil(ciList)) {

var gr = new GlideRecord("cmdb_ci");

gr.addEncodedQuery("u_vra_uidISNOTEMPTY^install_status!=7^ORinstall_status=NULL");

gr.query();

while(gr.next()) {

var a = ciList.indexOf(gr.u_vra_uid+"");

if(a>-1) {

VRASNLogger.debug('The record exists in the list '+ gr.name);

}

else {

gr.install_status = 7;

gr.update();

}

}

}

}

}

catch(e){

VRASNLogger.error('Exception caught inside VRASNImportCMDB.reconcileCMDB: '+e);

this.errorHandler.notify("Exception caught inside VRASNImportCMDB.reconcileCMDB: "+e);

}

},

 

type: 'VRASNImportCMDB'

};


How to query the list of vRA 7.3 identifiers for AWS subnet

0
0

How do you query vRA to obtain the integer value for amazon_subnet_id given the AWS identifier for a subnet?

 

I have a vRO action to dynamically identify the AWS subnet given several parameters chosen in an XaaS blueprint.  That action returns a value (i.e. subnet-abcd1234).  I can pass the AWS subnet identifier to a blueprint using the API and do not get an error (json[bluePrintId].data.amazonSubnetId = "subnet-abcd1234)";

However the value seems to be completely ignored and the EC2 instance is put in a different subnet.

If I instead use the integer value I found from past provisioning requests (json[bluePrintId].data.amazon_subnet_id = 123;) the EC2 instance is put in the desired AWS subnet.

 

How do I either

1. Query vRA for the integer value that matches the AWS Identifier I want (i.e. lookup subnet-abcd1234 and have it return 123)

or

2. Pass the AWS identifier to the provisioning request so that it isn't ignored.

Automating VM-level Trend Reports by Cluster, Host

0
0

Let's assume I have the need to run a set of basic trend reports for all VMs in a given cluster.  I would love to automate this report and distribution.

 

In my hypothetical example, Cluster ABC has eight (8) Hosts and twenty (20) VMs.  I need to run monthly reports and the "customer" wants the "Virtual Machine CPU Diagnose" format.  I'd like to be able to select the Cluster or an individual Host and have the report generate charts on all VMs.  I can do this with List-style reports; but seemingly not with Trend-style reports.

 

Currently, I can either (1) manually generate this on each VM from the "Details tab", after resetting the date range, or (2) I can create a new report for each VM (which unfortunately only displays the standard 24-hour view).  Each view is only a single VM.

 

Given my relative newness to vRealize report generation, I might well be missing the simple answer.  I hope I can learn from you.

Parse Curl output

0
0

Hello Everyone,

I am using below Curl command (output of VRA programing Guide) to get list of all the request

curl --insecure -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://$vRa/catalog-service/api/consumer/requests/

I want to parse the output so I can get it in a table format and the required fields only. Please let me know how I can parse the output.

Thanks,

Milind MK.

Connector not found

0
0

I'm getting the error Connector with id 98d89669-f911-4410-b4a6-f1b349900c43 not found when I am attempting to join a domain in the default tenant in an existing vRA 7.2 install. This is using the Integrated Windows Authentication method. It was pointed out to me that we need the directory source for products like vROps, vRNI and vRLI since they all query the back end infrastructure as opposed to the Tenant workloads.

 

Lets call the back end domain server.local which includes all the vRealize appliances, vCenter and ESXi nodes as well as NSX, SQL and IaaS servers, and refer to all the VMs being deployed to the various Business groups dev.local. I've setup a connection to dev.local using Active Directory over LDAP, but have no connection to server.local. The instructions I'm following for the overall configuration is based off the VVD 4.0 which has the default tenant (vsphere.local) connect to a domain. The error above is what I get when I attempt to connect to the domain server.local with a domain admin account.

 

My question (since I've already strayed from the VVD) is, must I define the Identity source for server.local in the default tenant before attempting to configure either the LDAP or IWA methodology?

 

Question 2 would be, do I have to use IWA if I am only trying to verify authenticating with specific service accounts in a specific OU in server.local or is LDAP more than adequate? (My AD admin is kinda freaking over joining the domain)...

 

Thanks in advance,

 

Roger

Scroll bar is missing in actions tab in VRO 7.3 version. Is there a fix for it?

[vRA 7.3] - BMC EPIagent Custom Properties to Make Software Jobs Available

0
0

Hi team,

 

we have create "Properties Groups" for BMC EPIagent.

 

In the documentation here, page 55 is said :

 

Specifies a software job or policy to be applied to all machines provisioned from the blueprint. Set the value to job_type=job_path, where job_type  is the numeral that represents the BMC BladeLogic job type and job_path is the location of the job in BMC BladeLogic, for example 4=/Utility/putty. NNNN is a number from 1000 to 1999. The first property must start with 1000 and increment in numerical order for each additional property

 

Ok this is done with the "Properties Group" :

 

"Vrm.Software.Id1000" = "2=/ASSET/DEV/Windows/EMEA_Baseline/ASSET-Win_Finalization_DC4";

"Vrm.Software.Id1001" = "4=/ASSET/DEV/Windows/EMEA_Baseline/Office/2016/Office_2016_64_bits";

Now we want to deploy Vrm.Software.Id1000 in FIRST and after the software Vrm.Software.Id1001, etc.......

 

Actually Vrm.Software.Id1001 is always deployed in FIRST.

Of course we have tried to invert the numbers but the Office Package is always the first to be installed

Do you know how we can force the installation order of BMC Bladelogic Packages with the EPIPowershell agent ?

 

Thx for your help ...Have a Nice Week

How to get to Deployment ID from Request ID with CloudClient?

0
0

I'm trying to do some basic automation by using the CloudClient.  I've pretty much resolved this issue using a Python wrapper around the REST interface, but I'd rather not support that path if I can do the same with the supported tooling.

 

I'm able to login, fetch a request template, and submit the request.  I obviously can retrieve the request ID.  But I get pretty solidly stuck here, not knowing how to get the associated deployment ID.  From what I can tell, the request information never has the deployment info.  Is there a simply query to get the deployed details via the request ID, or other ID in the request details?

 

TIA.


Cloud Client exception with "vra deployment list --requestId" when the total number of requests is above 5000

0
0

Hi,

I'm using vra 7.3 and cloud client 4.4.

 

A couple of days ago I started getting this weird error message all of a sudden in my automation pipe I have using Cloud Client.

 

Flow:
1. I do a successful request of a blueprint/deployment through cloud client.


2. I get the requestId back from the successful request I made. I also verified the requestId in the GUI under Requests.

 

3. I then use

   CloudClient>vra deployment list --requestId <the id I got from above here>

4. But I then got

 

com.vmware.cloudclient.exception.CloudClientException: Failed to convert '<id from above>' to type Request for option 'requestId'
Error: Unable to find a Request by the name or id '<id from above>'.


5. The above message is the same as if I wrote a requestId that does not exist, but it did.

 

---

I started to dig deeper...


1. This Business Group has 5000+ requests (5197 something), I could verify this in the GUI

 

2. I then used the same command but instead of writing the requestId I pressed the Tab key, twice.

 

   CloudClient>vra deployment list --requestId

   Display all 5000 possibilites? (y or n)

 

3. Wait a minute... I have more than 5000 requests.

 

4. I compared and tested the following

   CloudClient>vra request list --pagesize 5000
   CloudClient>vra request list --pagesize 5200

 

But still only saw up to 5000 requests.

 

5. I tested to set default pagesize in cloudclient.config above 5000, to like 5200 but then I had to use --page 2 to see the request entries above 5000.

vra request list --page 1 (showed 5000 entrys)
vra request list --page 2 (showed 197 more)

 


---

So my conclusion is that:

1. Cloud Client "vra request list" can only show 5000 entries even when using --pagesize larger than 5000

 

CloudClient>vra request list --pagesize 5200 <-- only shows 5000 entries

 

2. I can see beyond 5000 if I use --page (even if I use default pagesize of 25 and then use like --page 206 or something)

 

CloudClient>vra request list --page X

 

3. The problem is that

CloudClient>vra deployment list --requestId <requestId here>

 

Can only see 5000 request entries, not more, the only respons is the "com.vmware.cloudclient.exception.CloudClientException..." if I enter entries that is above 5000.

 

If I choose a request entry that is above 5000 I get the error message, same as if the requestId does not exist.


If I choose a request entry that is 5000 or below I get a response as usual and its working as it should.

 


---

Can anyone confirm this?
And how can I fix this?


1. How can I remove/delete old requests for a Business Group? Can I clear it some how? There is a "delete" button in the GUI but that only works for "Unsubmitted" requests.
   Is the only option to rebuild the Business Group or hack the database?
2. Is there some setting in Cloud Client that can be modified so vra deployment list --requestId can see beyond 5000 requests?
3. Any other ideas? or SR next :/

VRA 7.3 VRO 7.3 How to get VirtualMachine.NetworkN.Address in DHCP environment

0
0

I am using VRA 7.3 and built VRO for VM provisioning in DHCP environment. When sending a paylod value of VirtualMachine.NetworkN.Address property is set to null since the DHCP involvement. Kindly help me to get the IP address of the first NIC.

 

Thanks,

Partha

Missing Infrastructure tab when logging using tenant and iaas admin. I only see administration and container tabs.

0
0

Missing Infrastructure tab when logging using tenant and iaas admin. I only see administration and container tabs.

 

Setup:

vRA 7.3

IaaS : Win 2012 R2

DB : SQL EXP 2012

 

 

 

Thanks in advance!

vRA API - Assigning Storage Reservation Policies

0
0

Has anyone managed to use the API to allocate Storage Reservation Policies to a Storage Path via the vRA API? I can't seem to figure out where to set this.

 

The UI version of what I'm trying to do:

 

Infrastructure -> Edit Compute Resource -> Configuration -> Storage Path -> Drop-down to select Storage Reservation Policy.

 

The closest I've got is:


/reservation-service/api/data-service/schema/Infrastructure.Reservation.Virtual.vSphere/default/reservationStorages/values - gets me the datastores

/reservation-service/api/data-service/schema/Infrastructure.Reservation.Virtual.vSphere/default/computeResource/values - gets me the compute resources I need to edit


Any help appreciated.



How to answer mandatory values for each AWS EC2 VM when destroying a deployment via REST API

0
0

We have a Blueprint made up of 5 AWS EC2 VM's.  When destroying a deployment via UI you have to modify the "Delete Volume" option for each VM because it's set to NULL.  I can't find a way to change the default value within the Blueprint but it's not a terrible hassle when using the UI for one or two destroys.

When trying to destroy a deployment via API, though, the destroy action request template for the deployment doesn't have the "provider-DeleteVolumes" option listed so the destroy fails.  I have to destroy all 5 VM's individually, which adds a lot of load to the system as is it processes 5 times the workflows.

Deployment destroy action request template:

{
    "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
    "resourceId": "7b888b98-e4d8-4e23-a382-71c24692b9ea",
    "actionId": "91d8ab6e-46ff-4573-b730-e7948b7af616",
    "description": null,
    "data": {
        "ForceDestroy": false
    }
}

Machine destroy action request template:

{
    "type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
    "resourceId": "5b802189-4498-469e-939d-530043b8514c",
    "actionId": "5f51c11d-395f-4e08-82b5-d7e09f33f246",
    "description": null,
    "data": {
        "provider-DeleteVolumes": null
    }
}

Anyone know how to either change default provider-DeleteVolumes option on the Blueprint OR somehow set this option when destroying the deployment?

Synchronization issue between vRA and vRO

0
0

I developed a plugin in which I am creating few custom objects and couple of workflows. Once the plugin is installed using vRO control center, service is restarted and all checks are found green under validation screen, I go to vRA and under custom resources try to access the custom object. But I am not able to find my newly installed custom object. I waited for few hours but still no success.

 

I am using vRA 7.3 with embedded vRO

 

When I restart vRA appliance then I am able to find my custom object.

 

Can anyone please let me know how to debug this as this is creating lot of problems for me?

plugin for VRA and Service now integration kingston release

0
0

Hi All,

 

We are trying to integrate VRA version 7.3 with Service now. Our service now is on kingston release rightnow. I checked the vmware official sites but didn't find any plugin for kingston release. Can anyone tell me when this plugin will be released and who will provide this plugin VMware or Servicenow?


vRA 7.3, vRB 7.3, VIC 1.3.1 - setting up pricing policy for container consumption

0
0

Hello,

I've recently started piloting a VIC deployment, with the goal of providing users the means of quickly deploying Container Hosts through the vRA items catalog.

 

I have used a slightly modified Version of the guide and Tools published here:

Using vRealize Automation to Deploy VMware Virtual Container Hosts as a Service - Cloud-Native Apps

 

Users are able to deploy Container Hosts this way and those are neatly presented in vRA (as Dynamic Type objects), however there is one design problem I am facing right now and that is to find a way of setting a pricing policy for the Container resource consumption. Since they use some compute resources, I have to find a way now to construct a custom pricing policy or an expansion of the currect policies, that would allow a price calculation each month.

 

Currently, the pricing policies are based on vRA reservations, that allow for a quick cost calculation of the VM resource consumption for each client (business group). Treating Containers as VM's makes no sense, so I thought about a calculation that is based on the usage of the resource pool, that is created with each Container host. However there is the challenge of associating the resource pool with the vRA reservation, so that the connection is apparent in vRealize Business. Pricing Methodology is set to Allocation.

 

Can someone who has experience in this matter maybe give me a tip on how to efficiently create such a policy?

How to Capture Events after deploying multi-machine through single blue print

0
0

Hello Everyone,

 

I have a blueprint to create 2 machines from template, and also i have created a event subscription to capture the properties of both the deployed machines and pass to vRO, since the condtions of the event subscription is as follows:

for which the event is called twice, since there is 2 virtual machines deployed in a single blueprint and in-turn workflow in the vRO is called twice which misleads the entire operation.

 

I need a solution, where i can deploy 2 virtual machines in sinlge Blueprint, further which the event subscription has to pass the properties of both the VM's information at once to vRO, and the workflow is executed once with success results.

 

Kindly, Please do help.

Failure on Customize virtual machine guest OS

0
0

While building a VM I am running into the following error during Customize virtual machine guest OS stage:

"A specified parameter was not correct: spec.nicSettingMap.adapter.ip.ipAddress"

My environment is composed of vRA 7.3, vRO 7.3 and vCenter 6.5. Does anyone know a solution to this issue?

Thanks.

vRAutomation 7.0.1 - The following component requests failed

0
0

Olá, boa tarde.

 

Tenho o vRealize automation 7.0.1 em meu ambiente e recentemente estou tendo problemas com vms provisionadas em um determinado cluster de datastore configurado no vCenter 6.0.0.

 

A mensagem completa do erro: The following component requests failed: vSphere_Machine_1. Request failed: Machine VMXXX: CloneVM : Cannot find the data store named CLUSTER_VMWARE..

 

Preciso resolver este caso provisionado vms para o cluster de datastore deixando que o vCenter gerencie e não o configurando no automation para datastore individuais com mesma prioridade.

 

Obs: Para outros clusters do meu ambiente consigo provisionar vms sem problemas.

 

***************************************************************************************************

Hello good afternoon.

 

 

I have vRealize automation 7.0.1 in my environment and recently I'm having problems with vms provisioned in a given datastore cluster configured in vCenter 6.0.0.

 

The complete error message: The following component requests failed: vSphere_Machine_1. Request failed: Machine VMXXX: CloneVM: Can not find the data store named CLUSTER_VMWARE ..

 

I need to resolve this vms provisioned case to the datastore cluster by letting vCenter manage and not configuring it on automation for individual datastores with the same priority.

 

Note: For other clusters in my environment I can provision vms with no problems.

Possible to use custom properties in property definition dropdown?

0
0

We have migrated from vRA 6 to 7.3 and thus lost our XML file for drop down. The new system with its binding and script actions is great, however, I would really like to know if we can do one thing :

 

When defining the value in the input parameters area of a Dropdown (which I can pass to a script action), can I use a property that I have already defined and attached to the blueprint?

 

Normally I would bind another property definition to it, but then that property has to be defined in a text area, drop down, etc. I want it to be defined in a property group that is attached to a blueprint.

 

For example each property group is associated with their own blueprint:

 

------

Property group - AAA Datacenter Environment Prod"

Hard set "VM.Guest.Datacenter.Network.Pulldown" value to AAA-prod.

 

Property group - BBB Datacenter Environment Prod"

Hard set "VM.Guest.Datacenter.Network.Pulldown" value to BBB-prod.

 

Property group - AAA Datacenter Environment Stage"

Hard set "VM.Guest.Datacenter.Network.Pulldown" value to AAA-stage.

 

Property group - BBB Datacenter Environment Stage"

Hard set "VM.Guest.Datacenter.Network.Pulldown" value to BBB-stage

------

 

Property Definition - "VirtualMachine.Network0.NetworkProfileName"

Uses script action with input name "datacenter" and value as X where "X" should be the value of "VM.Guest.Datacenter.Network.Pulldown" . The script action will use JS to create a dropdown with the exact network profile names as "Value" and a friendly name as "Name". For example, if the value provided is "AAA-prod", it will show a dropdown of:

 

Name                    Value

"DMZ"               -> "AAA Prod DMZ"

"Protected"       ->  "AAA Prod Protected"

 

Hope that made sense.

 

-Alex

Viewing all 9859 articles
Browse latest View live




Latest Images