private void forEachVm(SerializableCallable call, boolean local, int maxNodes) throws Exception {
    Host host = Host.getHost(0);
    int vms = Math.min(host.getVMCount(), maxNodes);

    for (int i = 0; i < vms; ++i) {
      host.getVM(i).invoke(call);
    }

    if (local) {
      call.call();
    }
  }
This test ensures that parallel import succeeds even when each node does not have a file to
import (import cluster larger than export one)
geode-core/src/distributedTest/java/org/apache/geode/cache/snapshot/ParallelSnapshotDUnitTest.java