code: public static VirtualMachine attach(VirtualMachineDescriptor vmd)
        throws AttachNotSupportedException, IOException
     {
        return vmd.provider().attachVirtualMachine(vmd);
     }
docs: Attaches to a Java virtual machine.
  <p/>
  This method first invokes the {@link com.sun.tools.attach.VirtualMachineDescriptor#provider()
  provider()} method of the given virtual machine descriptor to obtain the attach provider.
  It then invokes the attach provider's {@link
  com.sun.tools.attach.spi.AttachProvider#attachVirtualMachine(VirtualMachineDescriptor)
  attachVirtualMachine} to attach to the target VM.
  
  @param   vmd The virtual machine descriptor.
  
  @return A VirtualMachine representing the target VM.
  
  @throws SecurityException
  If a security manager has been installed and it denies
  {@link com.sun.tools.attach.AttachPermission AttachPermission}
  <tt>("attachVirtualMachine")</tt>, or another permission
  required by the implementation.
  
  @throws AttachNotSupportedException
  If the attach provider's {@code attachVirtualmachine}
  throws {@code AttachNotSupportedException}.
  
  @throws IOException If an I/O error occurs
  
  @throws NullPointerException If {@code vmd} is {@code null}.