<p>It seems ther reason for this was that the SMB connections would disconnect.
using </p>

<pre><code>net config server /autodisconnect:-1
</code></pre>

<p>in a "run as administrator" command window fixed it.</p>

<p>as explained here:
<a href="https://www.vagrantup.com/docs/synced-folders/smb.html#preventing-idle-disconnects" rel="nofollow noreferrer">https://www.vagrantup.com/docs/synced-folders/smb.html#preventing-idle-disconnects</a></p>

CC BY-SA 3.0
2018-01-09T10:17:16.730Z
2018-01-09T10:17:16.730Z
epeleg
<p>I have a vagrant box running on windows 10 hyper-v</p>

<p>config.vm.box = "kmm/ubuntu-xenial64" #A standard Ubuntu 16.04 LTS (x64).<br>
config.vm.provider "hyperv"  </p>

<p>Just after provisioning it, it seems to be running o.k.
but then if I exit and ssh back to it then trivial actions such as pressing tab after typing <code>cd /vag</code> would take tons of time (e.g 30 sec or more)
and after that a <code>cd /vagrant</code> worked o.k.
then ls -la worked o.k.
and another <code>ls -la</code> took something like 3 minutes or so.</p>

<p>During that time hyper-v is showing the virtual machine at 0% CPU.</p>

<p>Any suggestions on where I should look to try and figure out why is this happening?</p>

<vagrant>
Vagrant box take long time to access shared /vagrant folder
epeleg
# Vagrant box take long time to access shared /vagrant folder

(Asked by: username_0 on 2018-01-08)

I have a vagrant box running on windows 10 hyper-v

config.vm.box = "kmm/ubuntu-xenial64" #A standard Ubuntu 16.04 LTS (x64).  
config.vm.provider "hyperv"

Just after provisioning it, it seems to be running o.k.
but then if I exit and ssh back to it then trivial actions such as pressing tab after typing `cd /vag` would take tons of time (e.g 30 sec or more)
and after that a `cd /vagrant` worked o.k.
then ls -la worked o.k.
and another `ls -la` took something like 3 minutes or so.

During that time hyper-v is showing the virtual machine at 0% CPU.

Any suggestions on where I should look to try and figure out why is this happening?

**Tags:** vagrant


---

## 1 answers

### Answer by username_0 on 2018-01-09. Score: 1

It seems ther reason for this was that the SMB connections would disconnect.
using 
net config server /autodisconnect:-1

in a "run as administrator" command window fixed it.
as explained here:
https://www.vagrantup.com/docs/synced-folders/smb.html#preventing-idle-disconnects


---

