Microsoft is removing support for SMBv1 from Windows.
Currently, though Vagrant will only attempt a mount with SMBv1, as this is the default behavior with mount -t cifs
. Going forward, on newer versions of Windows, this will always fail by default.
The fix is to specify a minimum protocol version of 2.0 when mounting. SMBv2 is supported in Windows Vista Service Pack 1, and Windows Server 2008 or higher. If backwards compatibility with earlier versions of Windows is important, Vagrant could attempt mounting with protocol version 2.0 first, dropping back to 1.0 if support is not present.
Vagrant 2.0.0
Windows 10 - Version 1703 (OS Build 16251.0)
Debian Stretch (generic/debian9)
Vagrant.configure("2") do |config|
config.vm.box = "generic/debian9"
config.vm.synced_folder ".", "/vagrant"
# Note: A successful mount can be achieved by specifying:
# config.vm.synced_folder ".", "/vagrant", mount_options: ["vers=2.0"]
end
https://gist.github.com/rhencke/5e58e291607d0f0bf6544342ba349cb8
(For comparison, here is a log showing how a successful mount can be achieved with the additional mount options described above: https://gist.github.com/rhencke/11f8dff86d719e9386941dd653e8a117 )
The mount was successfully achieved when running mount -t cifs
.
The mount failed when running mount -t cifs
, claiming mount error(112): Host is down
. However, the actual error is due to use of an unsupported protocol.
vagrant up
This issue seems strongly related:
Got into the same issue for which a solution is as simple as adding smb version in the mount options. See provided example:
config.vm.synced_folder '.', '/vagrant', disabled: false, type: "smb", smb_host: <hostname/ip>, mount_options: ['vers=3.0']
Thanks @ghousseyn, your solution of adding vers=3.0
made things working for us. We no longer see the random Host is down
issue.
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Got into the same issue for which a solution is as simple as adding smb version in the mount options. See provided example:
config.vm.synced_folder '.', '/vagrant', disabled: false, type: "smb", smb_host: <hostname/ip>, mount_options: ['vers=3.0']