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

vro architecture

$
0
0

Hello,

I will upgrade soon my infrastucture from vsphere 5.5 to vsphere 6.5 I have a question according to vro

 

I have now one sso for both vcenters and vro 5.3 is in sso authentication mode it manage both vcenters

 

the new vcenters will be isolated one from the other each having his own sso

 

will I be allow to make the new VRO v7  managing both vcenters? will I have to use an other authentication mode?


Wrong StorageCluster recommendation

$
0
0

Hi,

we are using the following script to create new VMs into a StorageCluster. This works quite good, as long as there are enough datastores with enough space for the new VM left. If only one datastore with enough space is left inside the storagecluster, the recommendation is often wrong and chooses a datastore too small for provisioning. Using the vCenter GUI the correct datastore is selected. Does anyone has an idea why VCO get the wrong recommendation?

 

Thanks

Stephan

 

 

var config = new VcVirtualMachineConfigSpec();
config.name = vmName;
config.version = "vmx-08";
config.guestId = "windows8Server64Guest";
config.numCPUs = 2;
config.memoryMB = 2 * 1024;
config.memoryHotAddEnabled = true;
config.cpuHotAddEnabled = true;
config.files = new VcVirtualMachineFileInfo();
config.files.vmPathName = "";
var devices = new Array();
devices.push( System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualScsiControllerConfigSpec( "sas" ) );
devices.push( System.getModule("com.xxx.eu.ServerAutomation").createVirtualDiskFlatVer2ConfigSpecForStoragePod(100,0,0,VcVirtualDiskMode.persistent, false) )
devices.push( System.getModule("com.vmware.library.vc.vm.spec.config.device").createVirtualEthernetCardNetworkConfigSpecE1000(network));


var storageSpec = new VcStoragePlacementSpec();
config.deviceChange = devices;
storageSpec.configSpec = config;
storageSpec.type = "create";
storageSpec.podSelectionSpec = new VcStorageDrsPodSelectionSpec();
storageSpec.podSelectionSpec.initialVmConfig = new Array(new VcVmPodConfigForPlacement());
storageSpec.podSelectionSpec.initialVmConfig[0].storagePod = storagePodObj;
storageSpec.podSelectionSpec.initialVmConfig[0].vmConfig = new VcStorageDrsVmConfigInfo() ;
storageSpec.podSelectionSpec.initialVmConfig[0].vmConfig.intraVmAffinity = false;
storageSpec.podSelectionSpec.storagePod = storagePodObj;
storageSpec.resourcePool = resPool;
storageSpec.folder = folder;


vCenter = clusterObj.sdkConnection;
var managedObject = vCenter.storageResourceManager;
var placementResult = managedObject.recommendDatastores(storageSpec);
key = new Array();
key[0] = placementResult.recommendations[0].key;
task = managedObject.applyStorageDrsRecommendation_Task(key);

How to get datastore cluster using datastore

$
0
0

Hi,

 

Is there any way in orchestrator to get datastore cluster by giving vc:datastore as a input

 

Many thanks for your help

 

Thanks.

CryptoJS Hashers and Ciphers

vRO Workflow: Create VM from a template

$
0
0

Hi,

I have a template which has few vAPP parameters. When I manually create a VM from this template, the creation step asks for the vAPP parameters values and the VM is launched with those parameters.

When I create the same with a vRO workflow (Clone, Linux with single NIC inbuilt vRO workflow), the vAPP parameters are not populated and powering ON of the VM fails. My vRO version is 7.2.

 

Let me know if there is something obvious that I am missing out .....

 

Thanks,

Mani.

CloneVm to SDRS Cluster / Storage Pod

$
0
0

Hi there,

 

we try to change our deployment scripts from old cloneVm to new recommendDatastores. We need this to provision VMs to SDRS Clusters. As documented within API reference, old CloneVm was now replaced by VcStorageResourceManager.recommendDatastores:

http://www.vmware.com/support/orchestrator/doc/vco_vsphere51_api/html/VcStorageResourceManager.html#recommendDatastores

 

Now we build the following scriptable task:

var myVcVirtualMachineConfigSpec            = new VcVirtualMachineConfigSpec();
var myVcResourceAllocationInfo                = new VcResourceAllocationInfo();
var myVcStoragePlacementSpec                = new VcStoragePlacementSpec();
var myVcStorageDrsPodSelectionSpec            = new VcStorageDrsPodSelectionSpec();
var myVcStorageResourceManager                = input_Datacenter.sdkConnection.storageResourceManager();
var myVcRessourcePool                        = input_RessourcePool;
var myVcVirtualMachineCustomSpec            = input_VirtualMachineCustomSpec;


myVcStorageDrsPodSelectionSpec.storagePod    = input_StoragePod;


myVcVirtualMachineRelocateSpec                = System.getModule("com.vmware.library.vc.vm.spec").getRelocateSpec(null,null,null,myVcRessourcePool,null) ;
myVcVirtualMachineCloneSpec                    = System.getModule("com.vmware.library.vc.vm.spec").getCloneSpec(null,myVcVirtualMachineCustomSpec,myVcRessourcePool,false,false) ;



myVcStoragePlacementSpec.cloneName            = input_VirtualMachineName;
myVcStoragePlacementSpec.cloneSpec            = myVcVirtualMachineCloneSpec;
myVcStoragePlacementSpec.folder                = input_Folder;
myVcStoragePlacementSpec.podSelectionSpec    = myVcStorageDrsPodSelectionSpec;
myVcStoragePlacementSpec.resourcePool        = myVcRessourcePool;
myVcStoragePlacementSpec.type                = VcStoragePlacementSpecPlacementType.clone;
myVcStoragePlacementSpec.vm                    = input_Template;

x = input_Datacenter.sdkConnection.storageResourceManager.recommendDatastores(myVcStoragePlacementSpec);

System.warn("Recommend Result: " + x);
System.warn("recommendations.key: " + x.recommendations.key);
System.warn("recommendations.reason: " + x.recommendations.reason);
System.warn("recommendations.reasontext: " + x.recommendations.reasonText);
System.warn("recommendations.action: " + x.recommendations.action);
System.warn("recommendations.target: " + x.recommendations.target);
System.warn("recommendations.type: " + x.recommendations.type);
System.warn("recommendations.dynamicProperty: " + x.dynamicProperty);

 

 

We get no error message and no task is starting. But on displaying all our warnings, they are all undefined without the x which is the correct object:

[2012-10-08 15:04:27.854] [W] Recommend Result: DynamicWrapper (Instance) : [VcStoragePlacementResult]-[class com.vmware.vim.vi4.StoragePlacementResult] -- VALUE : com.vmware.vim.vi4.StoragePlacementResult@6465a5b0
[2012-10-08 15:04:27.854] [W] recommendations.key: undefined
[2012-10-08 15:04:27.854] [W] recommendations.reason: undefined
[2012-10-08 15:04:27.870] [W] recommendations.reasontext: undefined
[2012-10-08 15:04:27.870] [W] recommendations.action: undefined
[2012-10-08 15:04:27.870] [W] recommendations.target: undefined
[2012-10-08 15:04:27.870] [W] recommendations.type: undefined
[2012-10-08 15:04:27.870] [W] recommendations.dynamicProperty: null

 

Someone ever tried this or has any idea about get this done?

 

Regards,

Chris

invoke RelocateVM_Task to move vm from current vcenter to another vcenter

$
0
0

in my application I have to invoke vmware sdk to do this: invoke RelocateVM_Task to move mv from current vc to another vc.

 

this is my code:

--------------------------

vc.png

but   i  got an error from the vc console  like this:

vc22.png

 

 

anyone knows how to solve it?  thanks a lot!!

Hiding newAdminPassword

$
0
0

I am still working on a workflow to deploy a VM. I have moved most of the inputs to the workflow attributes so users do not have to select so many items. One of the last items is the newAdminPassword. In the description it says The password string. It is encrypted if the associated plaintext flag is false. It is type string. How do I move this to a WorkFlow attribute and not have it in plaintext? I want the password to be of course encrypted or hidden. There is type credentials but that asks for username and password where here I am just setting what the administrator default password will be.


How to apply an attribute to a VM

$
0
0

I've created a few workflows that allow a user to backup a VM with a backup product.

 

As part of the workflow, I want to be able to setup some kind of attribute that might maybe allow me to note that it's being backed up by a specific server.

 

I thought about using the description but that's not really useful for key/val information.

 

Is there a way for me to set an attribute on a VM like

 

backupserver

policyname

 

thanks.

vRealize Orchestrator Actions Adapter for vCops

$
0
0

I wanted to reach out and see if any of you all are utilizing the vRealize Orchestrator Actions Adapter in vCops for vRO and vCops intergration.  vRO 6.0.3 is working out of the box with this solution but I am struggling to get vRO7 to work and get passed the "cant find getvcuuid workflow, full authentication required.

 

Anyone using this solution with vRO7 and if so how did you get it to work?

 

 

Thanks

 

 

Steve

do I use the right methode of using configuration elements as this way doing a search does not tell me which workflow uses them

$
0
0

I am using configurations elements to help me to facilitate searches during VM Deployment

but in the way I use it. If I do a search of elements using thoses configuration elements "find elements that use this element" I have no answer

I am affraid that after a while it will be complicated to update thoses elements as I will not be able to find the workflows using them

here is the way I use those elements perhaps the wrong way

the workflow works this way but I want to be sure I use the right methode to use the configuration elements

 

under the configuration elements category  "createVM/vcenter" I have 2 elements with attributes as showed bellow

 

 

vcenter1    name              type                          value    env               string                          prod    disktype          string                         thin    elementref        vc:sdkconnection               https://xxxxxxxxx    reseau            array/string                   standard,dmz    typeinfra         array/string                   preprod,prod,integration, ...

 

in my workflow I use an attribute and 2 inputs

 

 

attribute name           type                          value listevcenters  configurationelementcategory  createVM/vcenter inputs name        type     value reseau      string   dmz typeinfra   string   prod

 

 

here is the code in the workflow

 

function Contient(valeur, contenant)
{  if (contenant instanceof Array) {  //System.log('value is Array!');  return (contenant.indexOf(valeur) > -1);  } else {  //System.log('Not an array');  return (contenant === valeur);  }
}


var returnReseau = new Array;
var returntypeInfra = new Array;
var elements = listevCenters.configurationElements;
for each (element in elements){
  //System.log(element.name);  if (Contient(reseau,element.getAttributeWithKey("reseau").value)){  returnReseau.push(element.getAttributeWithKey("elementRef").value);  }  if (Contient(typeInfra,element.getAttributeWithKey("typeInfra").value)){  returntypeInfra.push(element.getAttributeWithKey("elementRef").value);  }
}


if(returnReseau.length == 1){
  vcenter = returnReseau[0];  }
else if (returntypeInfra.length == 1) {  vcenter = returntypeInfra[0];  }
else {throw "Trop de choix dans le vCenter"}
System.log(typeInfra +" " + reseau +" " +vcenter.name.split("/")[2])

Extracting CPU utilization and Ram utilization Report from Vcenter6

$
0
0

Hi All,

 

Looking for some guidance here. We are doing capacity planning based on reports gathered from the Vcenter GUI. As of now we do this manually once every week and then play around on the spread sheet. Are there any specific VCO or VRA workflows which we can use to automate this process and have a weekly email?

getting sdk_object parameters

$
0
0

I'm creating REST calls to execute workflows in VRO.  Let's say I want to input the network which is a VC:DistributedVirtualPortgroup object in vro.  I need to pass in the sdk_object.  The sdk_object has an href.  My question is this. 

 

Is there a reference or place I can browse to get all the hrefs I'll need for the different possible values that can be input?  I have multiple object types that we'll input.

 

Better yet, is there a way to convert a string into the internal object so that I don't have to manage this mapping from the tool I'm writing to make the REST call to start the workflow?

 

Tx Dom

Problem adding vCenter Orchestrator Plugin

$
0
0

Hia

 

I've been having problems adding the Orchestrator extension to my vCenter Server. I've run the workflows as mentioned on VMware pubs. The workflow "Register vCenter Orchestrator as a vCenter Server extension" ran fine. I updated my vSphere Web Client and the plugin / extension was added successfully. Problem is its showing no content as you can see in image1.

 

I'm running the following: VCSA 6.5.0 Build 5318154 / vROA 7.2.0.19944 Build 4629837

 

I've checked the Web Client logs and can't find anything wrong towards the vco-plugin. I've also checked the urls in the mob section (image4 and image5) and I have access to the .zip url and can download it. Restarted Web Client service after successfully adding the extensions. Nothing has helped so far.

 

Another intersting thing: While the extension is installed I can't access Administration > Deployment > System Configuration without getting Error #1009 "An internal error has occurred". I remove the extension and all is fine.

 

Any suggestions? Did I forget anything? Kinda running out of things to test.

Thanks, Dave

how to understand network usage in orchestrator

$
0
0

hello,

I have difficutlies to figure out  standard networks usage on orchestrator if it is host network or vcenter networks

 

I  have created an attribute with a "network" type and I have selected the value on the orchestrator vc: inventory under a specific cluster and not under the datacenter

 

when I list all the hosts of this network

networkVar.host

 

I see in result all the hosts which have a network with this name not only the hosts of the cluster

 

so how can I find host from a certain cluster which uses this network?

 

thanks


edit or delete a composite type?

$
0
0

Is there a way to edit or delete a composite type i've created already?

 

I've created several of them accidentally and just for good house keeping, i wanted to delete some of them.

 

conversely, if i could edit some of them, that would be useful too.

Orchestrator 7.2 to 7.3 upgrade breaks some scripting

$
0
0

Hi Everyone,

 

The 7.2 upgrade to 7.3 'broke' some scripting I inherited designed to take input parameters of Datacenter and VM and return the best host on which to clone a VM.  Here is the script (which continues to run fine in 7.2):

 

System.log( "The value of dataCenter is " + dataCenter);

System.log( "The value of vm is " + vm);

 

function getHostFromFolder( folder , vmachine ){

  return folder.clusterComputeResource[0].recommendHostsForVm( vm );

}

 

if (!dataCenter)

{

  return null;

}

 

if (!vm)

{

  return null;

}

 

var searchFolder = dataCenter.hostFolder;

 

foundItems = getHostFromFolder( searchFolder , vm);

 

var max = Math.max.apply(Math,foundItems.map(function(o){return o.rating;}))

 

var i = 0;

for ( i=0; i< foundItems.length; i++ )

{

  if (foundItems[i].rating == max)

  {

  return foundItems[i].host;

  }

}

 

 

...in troubleshooting, I can see by virtue of writing the values of the dataCenter and vm input parameters out to System.log that the objects seem to have changed.  From 7.2 (which works, the id's,names, and urls below are sanitized): 

[2017-05-23 10:16:00.786] [I] The value of dataCenter is DynamicWrapper (Instance) : [VcDatacenter]-[class com.vmware.vmo.plugin.vi4.model.VimDatacenter] -- VALUE : Datacenter<datacenter-999999>'SanitizedDatacenter'

[2017-05-23 10:16:00.790] [I] The value of vm is DynamicWrapper (Instance) : [VcVirtualMachine]-[class com.vmware.vmo.plugin.vi4.model.VimVirtualMachine] -- VALUE : VirtualMachine<vm-888888>'vmSanitized'

and in 7.3 (does not work):

[2017-05-23 10:13:43.850] [I] The value of dataCenter is DynamicWrapper (Instance) : [VcDatacenter]-[class com.vmware.o11n.plugin.vsphere_gen.Datacenter_Wrapper] -- VALUE : Stub: moRef = (ManagedObjectReference: type = Datacenter, value = datacenter-999999, serverGuid = null), binding = https://sanitized.vcenterhere.com:443/sdk

[2017-05-23 10:13:43.852] [I] The value of vm is DynamicWrapper (Instance) : [VcVirtualMachine]-[class com.vmware.o11n.plugin.vsphere_gen.VirtualMachine_Wrapper] -- VALUE : Stub: moRef = (ManagedObjectReference: type = VirtualMachine, value = vm-888888, serverGuid = null), binding = https://sanitized.vcenterhere.com:443/sdk

 

Can anyone give me some pointers as to what I need to do to get this scripting to run in 7.3?  Thank you. 

 

7.2 version is Appliance Version: 7.2.0.19944 Build 4629837

7.3 version is Appliance Version: 7.3.0.21553 Build 5521409

Still not getting correct datastore

$
0
0

I have this script below that is still not returning the correct datastore. It returns HDS-ESXi-UCS-0403 instead of HDS-ESXi-UCS-0408 which has more free space. They are both attached to the Non-Production cluster.

When I look in vSphere I see 0403 as Capacity 2.50TB and Free as 1.10TB and I see 0408 as Capacity 2.50TB and Free as 1.75TB

 

bestFreeSpace = 0;

datastore = null;

dsCapacity = null;

dsFreeSpace = null;

percentFree = null;

Cluster = VcPlugin.getAllClusterComputeResources(null, "Non-Production")[0];

 

for(i in Cluster.datastore){     

     selectedDatastore = Cluster.datastore[i];     

           if ( selectedDatastore.name.toLowerCase().indexOf("hds-esxi-ucs-04") == 0 ) {          

               dsCapacity = selectedDatastore.summary.capacity / 1024 / 1024 / 1024;          

               dsFreeSpace = selectedDatastore.summary.freeSpace / 1024 / 1024 / 1024;          

               percentFree = dsFreeSpace / dsCapacity * 100;                      

                   

               if ( percentFree > 25 ){                                

                     if ( dsFreeSpace > bestFreeSpace ) {                    

                              bestFreeSpace = dsFreeSpace;                     
                              datastore = selectedDatastore;               

                       }          

               }     

           }

}

 

if ( datastore==null ) {       throw "No datastore found which has over 25% free space!";  }

Horizon Plug-in - Create Custom Workflows?

$
0
0

I just installed the Horizon plug-in for Orchestrator. I currently have a workflow for a new employee that creates an AD account, VDI, etc. This workflow is kicked off from HTTP REST call and passes JSON for the variables. I started looking at the Horizon workflows and it doesn't look like I can really clone them or use different actions to integrate into my own workflow. It looks like it is very tightly integrated together and has dynamic values being passed that using JSON or XML for variables won't work. Am I seeing this correctly!?

 

If so, has anyone automated their Horizon so it is customized to what they need? And how? I am so close to having a great workflow for new employees and I just need to add some actions on the end of it that add the VDI to a pool and then entitle the user.

 

Any insight would be appreciated!

Retrieve Windows registry values using vRO

$
0
0

I attempted to search the forum assuming someone had asked this question already, but was unable to find anything. I apologize if this is a duplicate.

 

I am trying to retrieve the value of "ComputerId" under hklm\software\wow6432node\bigfix\enterpriseclient\globaloptions on a Windows 2012R2 server. As you can tell from the Key path, this is a 32bit key. I have tried WOW32, WOW64 and WOWNative without success. I have attempted the code below, even going back to the root of HKLM and recursively listing all Keys. When doing this, ONLY 2 keys are displayed. It almost seems as though it is a permissions issue but I am using a local admin account. Perhaps elevation is needed? If so, how do I elevate using Guest Operations?

 

 

var host = vm.sdkConnection;

//var regex = "~/^ComputerId$/"

 

 

var guestOperationsManager = host.guestOperationsManager;

var guestAuth = new VcNamePasswordAuthentication();

guestAuth.username = vmUsername;

guestAuth.password = vmPassword;

guestAuth.interactiveSession = true

 

 

var guestRegKeySpec = new VcGuestRegKeyNameSpec()

guestRegKeySpec.registryPath = "HKLM"

guestRegKeySpec.wowBitness = regKeyWowSpec;

 

 

var regMgr = guestOperationsManager.guestWindowsRegistryManager;

var regKeyValues = regMgr.listRegistryKeysInGuest(vm , guestAuth , guestRegKeySpec , true , null)

 

 

for each(regKeyValue in regKeyValues){

  System.debug(regKeyValue.key.keyName.registryPath)

  //System.debug(regKeyValue.name)

  }

Viewing all 10285 articles
Browse latest View live


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