vSphere CreateContainerView/RetrievePropertiesEx is only returning 100 Objects
<p>I am using nodejs and  the node code is fairly simple (using some of folktale here, but a task is similar to a promise):</p>

<pre><code>const connect = (vcenter) =&gt; {
    return new Task( (reject, resolve) =&gt; {
        const Vsphere = require('vsphere');
        const vc = new Vsphere.Client(vcenter, 'me', 'myPass', false);

        vc.once('ready', () =&gt; resolve(vc));
        vc.once('error', reject);
    })
}
const getVirtualMachines = (vc) =&gt; {
    return new Task( (reject, resolve) =&gt; {
        const rootFolder = vc.serviceContent.rootFolder;
        const vms =  vc.getMORefsInContainerByType( rootFolder, 'VirtualMachine');
        vms.once('result', resolve)
        vms.once('error', reject)
    })
}

connect(vcenterIp).
    chain(getVirtualMachines).
    // SNIP (this isn't significant)
    fork(e2,f2)
</code></pre>

<p>and results in sending these requests</p>

<pre><code>CreateContainerView
{
   "_this": {
      "attributes": {
         "type": "ViewManager"
      },
      "$value": "ViewManager"
   },
   "container": {
      "attributes": {
         "type": "Folder"
      },
      "$value": "group-d1"
   },
   "type": "VirtualMachine",
   "recursive": true
}



RetrievePropertiesEx
{
   "_this": {
      "attributes": {
         "type": "PropertyCollector"
      },
      "$value": "propertyCollector"
   },
   "specSet": [
      {
         "attributes": {
            "xsi:type": "PropertyFilterSpec"
         },
         "propSet": [
            {
               "attributes": {
                  "xsi:type": "PropertySpec"
               },
               "type": "VirtualMachine",
               "all": true
            }
         ],
         "objectSet": [
            {
               "attributes": {
                  "xsi:type": "ObjectSpec"
               },
               "obj": {
                  "attributes": {
                     "type": "ContainerView"
                  },
                  "$value": "session[520e031b-3c15-9c1d-408a-45ab98bde1dc]52dfe626-a128-c94f-8c4c-df52a68d97c0"
               },
               "skip": true,
               "selectSet": [
                  {
                     "attributes": {
                        "xsi:type": "TraversalSpec"
                     },
                     "type": "ContainerView",
                     "path": "view",
                     "skip": false
                  }
               ]
            }
         ]
      }
   ],
   "options": {}
}
</code></pre>

<p>Which returns </p>

<pre><code>{ returnval: 
   { token: '0',
     objects: 
      [ [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        [Object] ] } }
</code></pre>

<p>The problem i am seeing is that the API is only returning 100 items, while there are more than 100VMs in my environment.</p>

<p>I really want the query to return all of my VMs</p>

<hr>

<p>update 1: </p>

<blockquote>
  <p>To invoke a single property collection operation, call the
  RetrievePropertiesEx method. The example application passes the
  populated PropertyFilterSpec and an empty options structure to the
  method. The default for the RetrieveOptions.maxObjects specifies that
  no maximum for the number of objects that can be returned is set. The
  PropertyCollector can impose a maximum. If the number of collected
  objects is greater than the maximum, the PropertyCollector returns a
  token value in the RetrieveResult data object and this token is used
  to retrieve the remaining properties using the
  ContinueRetrievePropertiesEx API method</p>
</blockquote>

<p><a href="https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc_50%2FPG_Ch5_PropertyCollector.7.5.html" rel="nofollow">https://pubs.vmware.com/vsphere-50/index.jsp?topic=%2Fcom.vmware.wssdk.pg.doc_50%2FPG_Ch5_PropertyCollector.7.5.html</a></p>

<hr>

<p>update 2</p>

<p>OK looking at the returned results vSPehere is returning me a token code.  and the node-vsphere library isn't to retrieve all of the results.  I need to figure out a way to get all the results in one step.</p>