9 Replies Latest reply on Jul 8, 2019 3:42 PM by mstefani77

    getAllVirtualMachines problems

    filosmith Hot Shot

      In troubleshooting another workflow that takes hours to complete, I created a simple workflow that takes an sdkConnection as an input, and does a getAllVirtualMachines().


      VMs is an Array/VC:VirtualMachine here, output to an attribute:

      VMs = sdk.getAllVirtualMachines();
      System.debug(VMs.length + " VMs found.");


      This logs the length of the array in a second or two, but then the VMs attribute remains undefined, with the vco server load average ramping up, and server.log spamming this for seemingly every VM:


      2018-06-15 11:36:05.434-0500 [taskExecutor-8] ERROR {} [ObjectUpdateParser] assign disabledMethod -> VirtualMachine::vm-54649
      2018-06-15 11:36:05.434-0500 [taskExecutor-8] ERROR {} [ObjectUpdateParser] Ignore error and continue with others updates
      java.lang.RuntimeException: java.lang.IllegalStateException: Cannot find managedMethod with name: MountToolsInstallerImage
              at com.vmware.o11n.plugin.vsphere.pc.ObjectUpdateParser.applyProperyChange(ObjectUpdateParser.java:65)
              at com.vmware.o11n.plugin.vsphere.pc.ObjectUpdateParser.processObjectUpdate(ObjectUpdateParser.java:112)
              at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate.processUpdateSet(CacheUpdate.java:110)
              at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate$UpdateSetHandler.nextUpdateSet(CacheUpdate.java:171)
              at com.vmware.o11n.plugin.vsphere.pc.CacheUpdate.run(CacheUpdate.java:66)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:748)


      It eventually threw this in the vco client:


      [2018-06-15 10:56:06.041] [D] 2541 VMs found.

      [2018-06-15 11:00:28.113] [E] Workflow:Get all virtual machines / Scriptable task (item1) : ch.dunes.model.type.ConvertorException: Unable to convert object, 'Stub: moRef = (ManagedObjectReference: type = VirtualMachine, value = vm-704346, serverGuid = null), binding =https://fqdn.com/sdk' plugin exception reason : convertToResult() --> Finder 'VC:VirtualMachine' : unexpected error 'ch.dunes.model.sdk.SDKFinderException: convertToResult() --> Finder 'VC:VirtualMachine' : unable to invoke read method : 'name''


      Is this supposed to work? I think the error in the client is because a VM was deleted mid-way through the run?



      vSphere Version Build 7119157

      VC Plugin