code: public VirtualMachine attachVirtualMachine(VirtualMachineDescriptor vmd)
          throws AttachNotSupportedException, IOException {
          if (vmd.provider() != this) {
              throw new AttachNotSupportedException("provider mismatch");
          }
          
          return attachVirtualMachine(vmd.id());
      }
docs: <p>
  Attaches to a Java virtual machine.
  <p/>
  <p>
  A Java virtual machine can be described using a {@link
  com.sun.tools.attach.VirtualMachineDescriptor VirtualMachineDescriptor}.
  This method invokes the descriptor's {@link
  com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
  to check that it is equal to this provider. It then attempts to attach to the
  Java virtual machine.
  </p>
  
  @param vmd The virtual machine descriptor
  @return VirtualMachine representing the target virtual machine.
  @throws SecurityException           If a security manager has been installed and it denies
  {@link com.sun.tools.attach.AttachPermission AttachPermission}
  <tt>("attachVirtualMachine")</tt>, or other permission
  required by the implementation.
  @throws AttachNotSupportedException If the descriptor's {@link
  com.sun.tools.attach.VirtualMachineDescriptor#provider() provider()} method
  returns a provider that is not this provider, or it does not correspond
  to a Java virtual machine to which this provider can attach.
  @throws IOException                 If some other I/O error occurs
  @throws NullPointerException        If <code>vmd</code> is <code>null</code>