code: public void createNetworkAdapter(VirtualNetworkAdapterType type, String networkName, String macAddress, boolean wakeOnLan, boolean startConnected) throws InvalidProperty, RuntimeFault, RemoteException, InterruptedException {
          VirtualMachinePowerState powerState = vm.getRuntime().getPowerState();
          String vmVerStr = vm.getConfig().getVersion();
          int vmVer = Integer.parseInt(vmVerStr.substring(vmVerStr.length() - 2));
  
          if ((powerState == VirtualMachinePowerState.suspended)) {
              throw new InvalidPowerState();
          }
  
          HostSystem host = new HostSystem(vm.getServerConnection(), vm.getRuntime().getHost());
          ComputeResource cr = (ComputeResource) host.getParent();
          EnvironmentBrowser envBrowser = cr.getEnvironmentBrowser();
          ConfigTarget configTarget = envBrowser.queryConfigTarget(host);
          VirtualMachineConfigOption vmCfgOpt = envBrowser.queryConfigOption(null, host);
  
          type = validateNicType(vmCfgOpt.getGuestOSDescriptor(), vm.getConfig().getGuestId(), type);
  
          VirtualDeviceConfigSpec nicSpec = createNicSpec(type, networkName, macAddress, wakeOnLan, startConnected, configTarget);
  
          VirtualMachineConfigSpec vmConfigSpec = new VirtualMachineConfigSpec();
          vmConfigSpec.setDeviceChange(new VirtualDeviceConfigSpec[]{nicSpec});
          Task task = vm.reconfigVM_Task(vmConfigSpec);
  
          task.waitForTask(200, 100);
      }
docs: Create a new virtual network adapter on the VM
  Your MAC address should start with 00:50:56