Currently the VirtualMachine.list method is implemented to enumerate all 1.4.2+ VMs. The method is not a general purpose enumeration API so this should be changed to return only 6.0+ VMs that we can attach too.
In addition, the AttachProvider.listVirtualMachines methods has wording to allow for non-attachable VMs to be included in the list. This wording should be tweaked to avoiding tools being concerned that the returned lists includes other VMs. The revised wording cannot of course provide a guarantee that the attach will succeed.
Also the current signature of the list method is this:
public static List<? extends VirtualMachineDescriptor> list()
which forces the user of the API to use the wildcard too. It would be simpler if this were changed to:
public static List<VirtualMachineDescriptor> list()
Finally, as the current implementation of the listVirtualMachines is based on jvmstat is means that an empty list is returned on Windows when the temporary file system is FAT. An alternative implementation should be provided to avoid this issue.