From c1d2144ec26b426112012d96dbd7bd5704fa43c4 Mon Sep 17 00:00:00 2001 From: Peter Slootweg Date: Thu, 17 Jan 2019 09:38:34 +0100 Subject: [PATCH] check for 'ssh' service to see if interface is up the 'echo' service is often not available out-of-the-box, so the 'ping' of the ssh interface fails. This results in the wrong ip addresses being used in /etc/exports, which results in the vm not being able to mount the vagrant shares. The 'vagrant ssh interface' will have the service 'ssh' available (you won't be able to login to your vagrant box else), so it makes sense to use that service for the ping. This fixes the vm not being able to mount the shares over nfs after a reload due to the wrong ip addresses being used. --- lib/vagrant-libvirt/action/prepare_nfs_settings.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vagrant-libvirt/action/prepare_nfs_settings.rb b/lib/vagrant-libvirt/action/prepare_nfs_settings.rb index 6390891..b07543e 100644 --- a/lib/vagrant-libvirt/action/prepare_nfs_settings.rb +++ b/lib/vagrant-libvirt/action/prepare_nfs_settings.rb @@ -79,7 +79,7 @@ module VagrantPlugins # Check if we can open a connection to the host def ping(host, timeout = 3) ::Timeout.timeout(timeout) do - s = TCPSocket.new(host, 'echo') + s = TCPSocket.new(host, 'ssh') s.close end true