title: SSMS cannot connect to VM SQL Server instance: Connection Timeout Expired
body: <p>I have a Windows 8.1 desktop box with SQL Server Management Studio 2012 client that hosts a Hyper-V VM (Windows Server 2012 and SQL Server 2012 Enterprise).  I have been using this for development work with no problem for months but some time last week I started getting this error <em>every time</em> I try to connect using SSMS from the desktop machine.</p>
  <blockquote>
  <p>Connection Timeout Expired.</p>
  <p>The timeout period elapsed while
  attempting to consume the  pre-login handshake acknowledgement.  This
  could be because  the pre-login handshake failed or the server was
  unable to  respond back in time.  The duration spent while attempting
  to connect to this server was - [Pre-Login] initialization=21045;
  handshake=0;   (Microsoft SQL Server, Error: -2)</p>
  </blockquote>
  <p>I have seen this article <a href="https://stackoverflow.com/questions/15488922/connection-to-sql-server-works-sometimes">Connection to SQL Server Works Sometimes</a> and it does not resolve my issue.</p>
  <ul>
  <li>SSMS from desktop that hosts VM = Fail with error above</li>
  <li>SSMS from a different windows 8.1 box (on same subnet as desktop) =
  Success</li>
  <li>SSMS from the VM on a remote desktop session = Success</li>
  <li>SSMS from a different Win2012 server = Success</li>
  </ul>
  <p>Again, this was a working setup that has now started failing only on the desktop that hosts the sql server VM.  I have tried using a SQL Server account instead of Windows auth and it still fails.  I have disabled firewalls on both machines (desktop and VM) and it still fails.  Named pipes and TCP/IP are enabled.  Fiddler and SQL Server Profiler gave me nothing to look at.</p>
  <p>Any further troubleshooting pointers?</p>