Behavior: Vagrant silent fallback to VirtualBox shared folders when NFS/SMB dependencies missing
0 reputation · 11 Sept 2025, 00:05 UTC
0 reputation · 11 Sept 2025, 00:05 UTC
Goal: Ensure that Vagrant notifies users when the automatically selected synced folder implementation cannot be used because required host‑side dependencies (e.g., NFS client, SMB services) are absent, causing a silent fallback to VirtualBox shared folders and potential performance loss.
Constraints: Vagrant’s built‑in selection chooses NFS on macOS/Linux, SMB on Windows, or VirtualBox shared folders otherwise, and only version 2.x onward exposes an explicit type: option to override this behavior. The fallback occurs without any log message, leaving users unaware of the performance impact, and it is unclear at which stage of Vagrant’s initialization a warning should be emitted or what verbosity level would be appropriate.
vagrant up or vagrant reload) should this notification be displayed?35275 reputation · 11 Sept 2025, 08:16 UTC
Yes – Vagrant should emit a warning when the automatically selected synced‑folder type cannot be satisfied because the required host‑side dependency (NFS client on macOS/Linux or SMB services on Windows) is missing.
vagrant up or vagrant reload).type: option and provide the UI.warn method for user‑visible messages.Because Vagrant does not check for the presence of the host dependency before choosing NFS/SMB, it proceeds to the fallback without informing the user, which can lead to unexpected performance degradation.
UI.warn with a message such as:[WARN] NFS client not found; falling back to VirtualBox shared folders. Install NFS or set config.vm.synced_folder.type explicitly.-v flag needed) so the warning appears in normal output; users who want more detail can still enable -v or -vvv for additional debug logs.To confirm whether the warning is applicable, we need to know the Vagrant version in use. If you are running a version prior to 2.x, the explicit type: override is unavailable and the warning would only inform about the fallback without offering a way to change it.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.