--- libvirt-3.1.0/src/rpc/virnetlibsshsession.c.orig	2017-03-06 11:21:02.669718200 +0300
+++ libvirt-3.1.0/src/rpc/virnetlibsshsession.c	2017-03-06 11:39:52.801358100 +0300
@@ -863,6 +863,7 @@
             ret = virNetLibsshAuthenticateKeyboardInteractive(sess, auth);
             break;
         case VIR_NET_LIBSSH_AUTH_AGENT:
+#ifndef _WIN32
             /* try to authenticate using ssh-agent */
             ret = ssh_userauth_agent(sess->session, NULL);
             if (ret == SSH_AUTH_ERROR) {
@@ -871,6 +872,12 @@
                                _("failed to authenticate using agent: %s"),
                                errmsg);
             }
+#else
+            /* Windows doesn't support authenticate using ssh-agent */
+            ret = SSH_AUTH_ERROR;
+            errmsg = ssh_get_error(sess->session);
+            virReportError(VIR_ERR_LIBSSH, _("Libssh not support authenticate via ssh-agent on Windows"));
+#endif
             break;
         case VIR_NET_LIBSSH_AUTH_PRIVKEY:
             /* try to authenticate using the provided ssh key */
