public static int getVMId() {
    return DUnitEnv.get().getId();
  }
Returns the {@code VM} identity. For {@link StandAloneDUnitEnv} the number returned is a
zero-based sequence representing the order in with the DUnit {@code VM}s were launched.

@return the id of the VM
geode-dunit/src/main/java/org/apache/geode/test/dunit/VM.java