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

VRO WF creation of email account on Microsoft Exchange Server

$
0
0

Hello there,

 

 

Just to kindly ask about if there is such a way to create a Exchange Server email account from vRO WF to re-use, this because I haven't seen the vRO plugin for Microsoft exchange server or something similar to hit my problem.

 

This will be used from vRA to publish a service called "new email creation" so I have read that this is possible using power shell script but I want to know more in detail since I'm not a programmer, but i can tackle Powershell scripting.

 

 

 

thanks in advance!


Looking for a different approach for all infinity rules...

$
0
0

Greetings and Salutations,

 

I have been tasked to contemplate a different method of working with and referencing infinity and anti-infinity rules.  Let me explain the use case and see if that helps explain what I am looking to do.  In the environment I work with I have multiple vCenter servers in multiple datacenters.  In these datacenters are thousands of virtual machines in multiple clusters.  There may be multiple virtual machines are would be originally deployed in separate clusters and therefor the infinity rules would not be defined but in the case that a virtual machine was moved to another cluster, as an example, where a rule would need to be defined and applied because of that move that is the issue that I am looking to resolve so an automated check and process can be applied during the move or migration.

 

One method that I am looking at for this is to have entries added to the CMBD that would indicate if rules should be in place and who the partners are and as part of the migration process to query the CMDB and find out if there is a rule and who the partners would be and then query the destination cluster for any of those virtual machines and if found create or add to a rule.

 

Has anyone looked at doing anything like this and if so how did you go about addressing this?

 

Thanks

 

 

Steve 

Size of VMDK not attached to VM?

$
0
0

I'm trying to get a list of VMDKs on a datastore along with their associated file sizes so I can attach them to a VM in a workflow.  I slightly modified the getAllVmdkFile action to return a Properties hash with filename = size.  However the size in the VcFileInfo object is null.  How do I get the size of a VMDK given the filename or how do I make it so that the VcFileInfo object has the size property populated?

 

Code:

meh = new Properties();
var fileQuery = new Array(new VcVmDiskFileQuery());
var querySpec = new VcHostDatastoreBrowserSearchSpec();
querySpec.query = fileQuery;


System.log("searching: " + u_datastore.name);
var task = u_datastore.browser.searchDatastoreSubFolders_Task("[" + u_datastore.name + "]", querySpec);
var searchResults = System.getModule("com.vmware.library.vc.basic").vim3WaitTaskEnd(task,false,5);


for (var i in searchResults) {
  for (var j in searchResults[i].file) {  System.log("found " + searchResults[i].folderPath + searchResults[i].file[j].path);  System.log("size: " + searchResults[i].file[j].fileSize);
// meh.put(searchResults[i].folderPath + searchResults[i].file[j].path, searchResults[i].file[j].fileSize);  meh.put(searchResults[i].folderPath + searchResults[i].file[j].path, 0);  }
}

get backing scsi LUN for datastore?

$
0
0

I've been digging through the various classes available from HostSystem.queryHostConnectionInfo() and none of the properties seem to contain the naa id that I see when I look at LUNs on an HBA.  How does one get at the backing LUN for a datastore?

username problem with run program in guest workflow

$
0
0

Doing some testing with vCO 6.0.2 appliance before my cutover from 5.5.1 (windows) and I discovered a problem with the run program in guest workflow which I think is related to the version of VMware tools.

 

When the vmware tools on a VM are from 5.5, I can run the Run Program in Guest workflow with a username like .\mylocaluser. If the tools that come with vmware 6 are installed, it fails with: A specified parameter was not correct

 

When I remove the .\ and just use mylocaluser, it works.

 

It's been a long time but I think I had to use .\ because some versions of windows weren't recognizing mylocaluser as local account when the VM was on the domain.

 

Anyone else have this problem? Do I need to open a bug for ESXi?

 

Edit: Looks like the domain and/or machine name has to match the machine on which the process is being run, eg. I can use mydomain\myuser and machinename\mylocaluser successfully but .\localuser or localhost\localuser always seems to fail.

adding iaas host in orchestrator error 401 unauthorized

$
0
0

I keep getting an error when adding my iaas host in orchestrator. I am not sure why. My authentication is correct and its domain admin to the iaas host

 

Screen Shot 2015-07-05 at 5.49.41 PM.png

workflow to deploy an app from vra

$
0
0

I got an app created from application services and published it out to vra.

 

how do I start to create a workflow to deploy this app?

VCO Workflow fails - "Task 'CloneVM_Task' error: Customization of the guest operating system 'windows8Server64Guest' is not supported"

$
0
0

Hi,

i have a workflow that exists in all of our datacenters but is failing to complete in one of the datacenters. The workflow works fine when deploing a 2008 server but fails when deploying our 2012 template. I receive the error:

 

"Task 'CloneVM_Task' error: Customization of the guest operating system 'windows8Server64Guest' is not supported in this configuration. Microsoft Vista (TM) and Linux guests with Logical Volume Manager are supported only for recent ESX host and VMWare Tools verrsions. Refer to vCenter documentation for supported configurations. (Dynamic Script Module name: vim3WaitTaskEnd#20)"

 

All templates are on the most recent versions of VMWare tools and I am not quite sure what could be the issue. Is there something else I could be overlooking? Any and all help is greatly appreciated, thanks!


Presentation vCenter Web Client

$
0
0

I have a workflow presentation that works perfectly in the Orchestrator client but I am struggling to get it to work in the Web Client

 

 

I am using the Predefined list of elements to run an action that uses a input parameter defined in a previous step.   (If the user selects Prod in step 1, then the action returns a list of portgroups of a pre-determined DVSwitch)

 

The action runs correctly and returns with the correct array of items to choose from in the Orchestrator Java client.

 

However, when running from the vSphere Web Client I just get the inventory view of my entire vCenter.
b Client

 


How can I make the vSphere Web Client work in the way that the Java client works?

Rest Call authentication Error

$
0
0

Good Afternoon,

 

I have been running some rest call based functions to preform tasks on a third party system. Things have been working fine in previous weeks but when I was testing this functionality today things fell apart around a 401 error from the rest host.

 

Possible reason for error: 401 - Unauthorized

 

Nothing has changed in the environment as for testing this is what I have checked.

 

I can hit the URL in my browser and receive the proper and expected XML with the creds currently being used in VCO.

I have checked the managed cert for the server and verified it is correct and not expired.

I have tried multiple credentials in the rest host plugin config.

 

When looking at the rest hosts logs it appears that there is a LDAP rejection which is taking place which doesn't make sense being that those same LDAP creds are used when hitting the URL directly.

 

My major updates to the rest hosts as well as the "Invoke a rest call" seem to executing and functioning as intended.

 

Thanks,

how to delete a port mirror session from VCO workflow by executing script automatically

$
0
0

These days I wrote a VCO workflow to create port mirror session automatically and then execute powershell script to drive wireshark capture network packages.

After capturing action, I want to delete the port mirror session created before. However, it can not work.

 

My workflow script can be seen as following:

 

 

// ------- CreateSession -------

var spec = new VcVMwareDVSConfigSpec();

spec.configVersion = DVS.config.configVersion;

spec.vspanConfigSpec=[new VcVMwareDVSVspanConfigSpec()];

spec.vspanConfigSpec[0].vspanSession=new VcVMwareVspanSession();

spec.vspanConfigSpec[0].vspanSession.name=sessionName;

//Span settings

spec.vspanConfigSpec[0].vspanSession.stripOriginalVlan=false;

spec.vspanConfigSpec[0].vspanSession.enabled=true;

spec.vspanConfigSpec[0].vspanSession.normalTrafficAllowed=true;

//Configure destination Port

spec.vspanConfigSpec[0].vspanSession.destinationPort= new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.destinationPort.portKey=DPort;

//Configure source Port

spec.vspanConfigSpec[0].vspanSession.sourcePortTransmitted =new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.sourcePortTransmitted.portKey=SPort;

spec.vspanConfigSpec[0].vspanSession.sourcePortReceived =new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.sourcePortReceived.portKey=SPort;

 

spec.vspanConfigSpec[0].operation="add";   

DVS.reconfigureDvs_Task(spec); //without the operation, it can not add span session

CapPackage = true; //ready to capture package

 

 

//--------Execute script to drive Wireshark to capture packages on Powershell host--------

var output;

var session;

pathtoPowershell = "C:\\SPAN.ps1" //Note:use"\\" to escape

if(CapPackage){

  try {

  session = powershellhost.openSession();

  var script =  '& "' + pathtoPowershell + '" ' + time;

  //output = System.getModule("com.vmware.library.powershell").invokeScript(powershellhost,script,session.getSessionId()) ;

  output = powershellhost.invokeScript(script);

  } finally {

  if (session){

  powershellhost.closeSession(session.getSessionId());

  }

  }

  DelSpan = true; //ready to delete Spansession

}

If(DelSpan)

spec.vspanConfigSpec[0].operation="remove"; //remove the session

DVS.reconfigureDvs_Task(spec);

 

 

 

The "remove" operation can not work. The session created by "add" operation can not be deleted.

By the way, if I execute script like this:

    spec.vspanConfigSpec[0].operation="add";

    spec.vspanConfigSpec[0].operation="remove";

    DVS.reconfigureDvs_Task(spec);

it can delete the session, actually it have not added the session. So, it indicate that we must excute

DVS.reconfigureDvs_Task(spec);

to make the "add" operation effective.

 

 

Attachments:

1: the session cereted seen from vSphere client.

2:error seen from vSphere web client task log.

how to auto change portgroup of NIC in vSphere by API script

$
0
0

hi experts,

These days I want to write a workflow in VCO to auto change port group of NIC.(AS attachment pic shows)

For two given VM: SampleVM and DestVM. If they are in different port groups, I want to allocate DestVM to the port group of SampleVM automatically through workflow.

 

Scripts can be seen as follows:

 

var SampleDevs = SampleVM.config.Hardware.Device;

var DestDevs = DestVM.config.Hardware.Device;

var SampleNic = null;

var DestNic = null;

for (var i in  SampleDevs)

{

if( SampleDevs[i].deviceInfo.Label == "Network adapter 1" )

SampleNic =  SampleDevs[i]; //return sampleVM's network adapter

}

 

for (var i in  DestDevs)

{

if( DestDevs[i].deviceInfo.Label == "Network adapter 1" )

DestNic =  DestDevs[i];  //return DestVM's network adapter

}

var spec = new VcVirtualMachineConfigSpec();

//spec.changeVersion = DestVM.config.changeVersion;

spec.Version = DestVM.config.Version;

var nicDev = new VcVirtualDeviceConfigSpec();

nicDev.operation = "edit";

nicDev.device = DestNic;

nicDev.device.backing = SampleNic.backing;

nicDev.device.deviceInfo.summary = SampleNic.deviceInfo.sumarry;

spec.deviceChange += nivDev;

 

But it can not work. Who can tell me how to modify the script? Thanks sincerely.

 

Martin Ding from EMC

var SampleDevs = SampleVM.config.Hardware.Device;
var DestDevs = DestVM.config.Hardware.Device;
var SampleNic = null;
var DestNic = null;
for (var i in  SampleDevs)
{
if( SampleDevs[i].deviceInfo.Label == "Network adapter 1" )
SampleNic =  SampleDevs[i];
}
 
for (var i in  DestDevs)
{
if( DestDevs[i].deviceInfo.Label == "Network adapter 1" )
DestNic =  DestDevs[i];
}
 
var spec = new VcVirtualMachineConfigSpec();
//spec.changeVersion = DestVM.config.changeVersion;
spec.Version = DestVM.config.Version;
 
 
//spec.deviceChange = [new VcVirtualDeviceConfigSpec()];
////spec.deviceChange[0].operation = [new VcVirtualDeviceConfigSpecOperation()];
////spec.deviceChange[0].operation.fromString("edit");
//spec.deviceChange.operarion = "edit";
////System.log(spec.deviceChange[0].operation);
////spec.deviceChange.device = DestNic;
//System.log(SampleNic.deviceInfo.label);
//System.log(SampleNic.deviceInfo.summary);
//System.log(SampleNic);
//spec.deviceChange.device.backing = SampleNic.backing;
//spec.deviceChange.device.deviceInfo.summary = SampleNic.deviceInfo.sumarry;
//DestVM.reconfigVM_Task(spec);
 
var nicDev = new VcVirtualDeviceConfigSpec();
//System.log(nicDev);
nicDev.operation = "edit";
nicDev.device = DestNic;
nicDev.device.backing = SampleNic.backing;
nicDev.device.deviceInfo.summary = SampleNic.deviceInfo.sumarry;
spec.deviceChange += nivDev;
 

get process list from guest

$
0
0

I'm trying to build a synchronous run program in guest (linux) since for some ridicules reason vRO doesn't provide this out of the box.  All I need to do is figure out how to check if the exitCode or endTime of a process is null/undefined and I can't seem to figure out what it wants.

 

The process list task returns an array of:

{pid:number, name:string, owner:string, cmdLine:string, startTime:Date, endTime:Date, exitCode:number}

 

If I iterate over the return value,  I can System.log(pid.exitCode) or pid[exitCode] and it says "__NULL__".  If I try and do something like: if (pid.exitCode === null) ... or undefined ... it tosses out this error code:

Invalid JavaScript value of type ch.dunes.model.type.TypeConverter$NullObject

 

How can I check to see if endTime or exitCode are populated?  once they have actual values I'll be able to assume the process has ended.

Delete port mirror( port SPAN) failed

$
0
0

Hi Expert,

I am working on a port mirror (port SPAN) workfow on VDS.

The port mirror creation workflow work fine.

But when delete the port mirror. It shows "can not complete operation due to concurrent modification by another operation". Pls refer to attached file.

environment :

vsphere 5.5 update 2, vco 5.5.2 

The workflow script can be seen as following:

// ------- CreateSession -------

var spec = new VcVMwareDVSConfigSpec();

spec.configVersion = DVS.config.configVersion;

spec.vspanConfigSpec=[new VcVMwareDVSVspanConfigSpec()];

spec.vspanConfigSpec[0].vspanSession=new VcVMwareVspanSession();

spec.vspanConfigSpec[0].vspanSession.name=sessionName;

//Span settings

spec.vspanConfigSpec[0].vspanSession.stripOriginalVlan=false;

spec.vspanConfigSpec[0].vspanSession.enabled=true;

spec.vspanConfigSpec[0].vspanSession.normalTrafficAllowed=true;

//Configure destination Port

spec.vspanConfigSpec[0].vspanSession.destinationPort= new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.destinationPort.portKey=DPort;

//Configure source Port

spec.vspanConfigSpec[0].vspanSession.sourcePortTransmitted =new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.sourcePortTransmitted.portKey=SPort;

spec.vspanConfigSpec[0].vspanSession.sourcePortReceived =new VcVMwareVspanPort();

spec.vspanConfigSpec[0].vspanSession.sourcePortReceived.portKey=SPort;

 

spec.vspanConfigSpec[0].operation="add";   

DVS.reconfigureDvs_Task(spec); 

// ------- CreateSession -------

 

// ------- Delete Session -------

spec.vspanConfigSpec[0].operation="remove"; //remove the session

DVS.reconfigureDvs_Task(spec);

// ------- Delete Session ------- after run the delete script, we get error message as attached error.pgn.

thanks,

David

CHEF Server Workflows

$
0
0

Have you ever wanted orchestrate nodes, roles, data bags, attributes, etc. on a Chef Server?  Give this plugin and package a try!

 

See the attached pdf for a workflow listing and documentation of the workflows in this package:

chef1.pngchef2.pngchef3.png

 

This solution interfaces directly with the Chef Server REST API.  Works with all three variations of Chef (Open Source, Private, Hosted).

 

Workflows that interact with the guest OS for Chef-Client first run use either SSH or VMtools with workflows from: Guest script manager package

 

The plugin helps with signing the authentication headers as required by the Chef API.  The rest of this solution is pure vCO JavaScript.

 

Dependencies: HTTP-REST Plugin.


To install:  The attached zip contains 2 files:

  • o11nplugin-chef.dar - Install as a plugin through the vCO configuration interface.  This plugin only has a single method to aid in signing requests
  • com.vmware.pso.chef.<date>.package - The package of vCO workflows and actions to import.


To get running, simply run the Library/Chef/Add Chef Server workflow.  This workflow will create the REST Host and store your private key per chefHostname and userid.  Use the same chefHostname and userid in any other workflow.  The orgName input is optional but required if you are using private or hosted chef.


The chefHostname input is the name of the REST host the workflows will use.


UPDATES:

  • 07/07/2015
    • Improved vRO 6 compatibility
      • Incorporated Cody Hill's "Add Chef Server" workflow with some minor tweaks.
      • REST Host is no longer automatically created on workflow execution.  If a REST host is not found by the name supplied to chefHostname input, an exception will ask you to run "Add Chef Server" workflow.
    • Added client private key input (pem) to all API related workflows.
    • Added Global workflows for managing Private Chef orgs and users.  Requires the pem of the pivotal user of the Chef server.
    • Fixed workflows that update a runlist for a node or a role.
    • Fixed required inputs of most workflows. chefHostname, userid are required when present.
    • Improved open source Chef compatibility with workflows in the Linux/SSH, Linux/VMtools and Windows/VMtools folders.
      • The name of the validator key for open source chef is defined in the configuration element: Library/Chef/Chef Globals
    • Knife bootstrap hostname and credentials is now defined in the configuration element: Library/Chef/Chef Globals
  • 1/11/2015:
    • Reduced verbosity of logging by default.  Debug logging can be enabled per Chef Server using Toggle Debug Logging workflow.
    • Removed RESTHostManager.reloadConfiguration() call from every Chef Server API Execution improving performance.
    • The orgName input is automatically hidden from the presentation if target Chef Server is an open source variant.
    • The client private key can be provided as an input to any Chef Server workflow.  This is useful if you are storing your private keys elsewhere (besides the Chef Private Keys Configuration Element) or reading it from a guest OS as in: Linux VMTools Delete Instance with own key workflow which deletes a Node and Client with it's own key.
    • Tag Node and Untag Node workflows add or remove Knife tags on nodes.
    • Chef-Client first run workflows for Linux via SSH and VMtools.
    • Chef-Client first run workflows for Windows via VMtools.
  • 11/16/2013:
    • Refactored hashing and encryption actions to reuse actions from CryptoJS Hashers and Ciphers
    • Much more granular data bag support.  Workflows to retrieve, add/update, delete individual data bag item attributes.
    • More complete encrypted data bag support.  Workflows to add encrypted data bag item attributes, convert data bag items from cleartext to/from encrypted.

How to check if vm is managed by vCloud Director

$
0
0

Hello,

I need to find a way to check in Orchestrator if virtual machine is managed by vCloud Director.

 

I can check this in PowerCLI by bellow command:

(get-vm Vm_name*).ExtensionData.Config.ManagedBy.ExtensionKey

Untitled.png

...but my goal is to check it in orchestrator workflow.

 

Please help.

vRO and vROps install and enable SNMP

$
0
0

Hi,

 

I'm not looking for the SNMP Trap server but to be able to monitor vRO and vROps via another monitoring software that uses SNMP and is a trap server, I know both appliances are SUSE Linux so do I just need to install net-snmp and would that interfere with vRO or vROps anyone know of a guide or blog on setting it up?

 

Thanks in advance.

Return the vCD product version of a vclHost

$
0
0

I feel like this should be pretty easy to retrieve but for some reason I can't seem to find the information.  I'd like to get the product version of our vCD deployment.  I can easily get the version of the vCD plugin but I can't seem to locate where the product version and build number are.  I see a couple of query types that look promising so I will poke around there.  If anyone has this info I'd be much obliged it they'd share!

 

Paul

vRO admin group not seeing AD group in vRO config

$
0
0

I vrated a vRO admin group in AD but on the drop down box on vRO config, I do not see the group. any idea? I have logged out and refreshedCapture.JPG

CryptoJS Hashers and Ciphers

Viewing all 10285 articles
Browse latest View live