lhoreis's Posts

Hi,  you can use move-vm along with the parameter -Network <Network[]> and replace Network[] with your target network(s).  Regards,   Lars  
Hello Illian, thank you for the quick response, but it isn't that easy ... Using files.vmPathName = ""; is not working. That's what I've tried first, the space between the "" from m... See more...
Hello Illian, thank you for the quick response, but it isn't that easy ... Using files.vmPathName = ""; is not working. That's what I've tried first, the space between the "" from my initial posting was an error which resulted from editing the code to often Not setting vmPathName leads to this error item: 'Create VM - SP/item4', state: 'failed', business state: 'Create the VM', exception: 'Task 'createVm' error: A specified parameter was not correct: config.files.vmpathname (Dynamic Script Module name : vim3WaitTaskEnd#20)' workflow: 'Create VM - SP' (85860245-6211-435a-b23b-2b50f205dde1) Completing commenting out /* var files = new VcVirtualMachineFileInfo();    files.vmPathName = ""; */ throws this error [2019-02-11 11:02:29.826] [E] (com.vmware.library.vc.basic/vim3WaitTaskEnd) Error in (Dynamic Script Module name : vim3WaitTaskEnd#20) Task 'createVm' error: A specified parameter was not correct: config.files [2019-02-11 11:02:29.834] [E] Workflow execution stack: Regards, Lars
Hello everybody, I'm currently trying to write a scriptable task which creates an empty VM, which should be placed in a storagePod aka datastore cluster. I played around a lot and I'm not r... See more...
Hello everybody, I'm currently trying to write a scriptable task which creates an empty VM, which should be placed in a storagePod aka datastore cluster. I played around a lot and I'm not really able to achieve the result which I want to achieve due to the fact that I have a problem with initial placement of the VM files using VcVirtualMachineFileInfo. var files = new VcVirtualMachineFileInfo(); files.vmPathName = " "; According to https://www.vmware.com/support/orchestrator/doc/vro-vsphere60-api/html/VcStorageResourceManager.html#recommendDatastores this should work as it says: For CreateVm and AddDisk, the manually selected datastore must be specified in ConfigSpec.files or ConfigSpec.deviceChange.device.backing.datastore, the fields should will be unset if the user wants SDRS to recommend the datastore. Looking at https://github.com/lamw/vghetto-scripts/blob/master/perl/datastoreClusterVMProvisioning.pl this also gives the impression that this should work as William uses files    => VirtualMachineFileInfo->new(                      vmPathName => ""                   ) When I try to use files.vmPathName = " "; I receive an error, which looks as follows DynamicWrapper (Instance) : [VcVirtualMachineFileInfo]-[class com.vmware.o11n.plugin.vsphere_gen.FileInfo_2Wrapper] -- VALUE : (vim.vm.FileInfo) {    dynamicType = null,    dynamicProperty = null,    vmPathName =  ,    snapshotDirectory = null,    suspendDirectory = null,    logDirectory = null,    ftMetadataDirectory = null } Workflow execution stack: item: 'Create VM - SP/item4', state: 'failed', business state: 'Create the VM', exception: 'Task 'createVm' error: Invalid datastore path ' '. (Dynamic Script Module name : vim3WaitTaskEnd#20)' workflow: 'Create VM - SP' (85860245-6211-435a-b23b-2b50f205dde1) At the moment I'm only able to create the empty VM by using var files = new VcVirtualMachineFileInfo(); files.vmPathName = "[" + vmStoragePod.childEntity[0].info.name + "]"; where vmStoragePod is the storagePod I've selected for the deployment. Would be nice if somebody can bring me on the right track which lets me pick files.vmPathName = " "; Thank you very much, Lars
Hello Ilian, thank you for your quick response. I already feared, that there will be no painless solution. So I'll  follow your proposal and check whether it will work for me. Regards, L... See more...
Hello Ilian, thank you for your quick response. I already feared, that there will be no painless solution. So I'll  follow your proposal and check whether it will work for me. Regards, Lars
Hello, for my workflow I am using an input parameter of type Properties. The key/value pairs are coming from another workflow. In case of an error I want to use an user interaction in my work... See more...
Hello, for my workflow I am using an input parameter of type Properties. The key/value pairs are coming from another workflow. In case of an error I want to use an user interaction in my workflow which should enable the user to review the input and make changes to the input by changing one or more values in order to let the workflow continue. Let say I have something like this: itemProperty = new Properties(); itemProperty.put("os","windows"); itemProperty.put("backup","yes"); [...] itemProperty.put("application","mssql"); During the execution of the workflow it might happen, that an error occurs which for example could be fixed by changing one or more of the given values, for example by setting "backup" to "no". What is the best and safest way to achieve this in means of preserving the relationship between keys and values? I Any input is highly appreciated! Thanks in advance, Lars
Hello Ilian, thank you very much for your quick response. That was the way I tried it long time ago, but for some reason I discarded it. The values I retrieve now look way better. Regards, ... See more...
Hello Ilian, thank you very much for your quick response. That was the way I tried it long time ago, but for some reason I discarded it. The values I retrieve now look way better. Regards, Lars
Hello, when looking at the "Summary" tab of a Cluster in vSphere Web Client there is a graph showing Capacity Used and Free for CPU Memory and Storage I would like ... See more...
Hello, when looking at the "Summary" tab of a Cluster in vSphere Web Client there is a graph showing Capacity Used and Free for CPU Memory and Storage I would like to know how to access these values behind the graph from vRealize Orchestrator and how they are calculated!? Reason is, that I want to use the values  for CPU and Memory for the selection of the least used cluster when deploying a new VM. Currently I'm playing around with figures which I extracted from  VcComputeResourceSummary() VcClusterComputeResourceSummary() VcResourcePoolRuntimeInfo() and extract stuff like resourcePool.runtime.cpu.unreservedForVm resourcePool.runtime.memory.unreservedForVm and also resourceSummary.UsageSummary.totalCpuCapacityMhz resourceSummary.UsageSummary.cpuDemandMhz etc. So far, I wasn't able to get any values which are close enough to the values which are shown in the vSphere Web Client. Any input is highly appreciated. I already searched the community, but I wasn't able to find something. Regards, Lars
Hello Ilian, thank you very much for you quick response. It's working ... now I have to understand it. Regards, Lars
Hello all, I'm a total novice in matters  vRealize Orchestrator and JavaScript and I hope that somebody can provide some initial aid. While I have quite a lot of working experience with VM... See more...
Hello all, I'm a total novice in matters  vRealize Orchestrator and JavaScript and I hope that somebody can provide some initial aid. While I have quite a lot of working experience with VMware vSphere the API stuff is pretty new to me. In vRealize Orchestrator I want to create a workflow or maybe an action which uses a datastore cluster of type VC:StoragePod as input and I want to retrieve some basic information about the give datastore cluster. For example I want to know whether  SDRS is enabled or something like that. For storage DRS  I found that in  VcStorageDrsPodConfigSpec there is the attribute "enabled" and there also is a method called isEnabled. VcStorageDrsPodConfigInfo also has  "enabled" as an attribute. My problem is that I currently have no clue how to access the attribute "enabled" for a given VC:StoragePod as I don't know where to start. It would be great if someone can enlighten me how everything is related and connected and how to use it. Kind regards, Lars