@NotNull
  public static VirtualMachine attachVirtualMachine(String id) throws IOException, AttachNotSupportedException {
    // avoid attaching to the 3rd party vms
    if (VirtualMachine.list().stream().map(VirtualMachineDescriptor::id).noneMatch(id::equals)) {
      throw new AttachNotSupportedException("AttachProvider for the vm is not found");
    }
    return VirtualMachine.attach(id);
  }
@NotNull
  public static VirtualMachine attachVirtualMachine(String id)