{"record":{"id":"ff5e7ca6d0d0b828","repo":"hashicorp/vagrant","slug":"no-host-ip-was-given-to-the-vagrant-core-nfs-helpe","errorCode":null,"errorMessage":"No host IP was given to the Vagrant core NFS helper. This is\nan internal error that should be reported as a bug.","messagePattern":"No host IP was given to the Vagrant core NFS helper\\. This is\nan internal error that should be reported as a bug\\.","errorType":"exception","errorClass":"Vagrant::Errors::NFSNoHostIP","httpStatus":null,"severity":"error","filePath":"plugins/synced_folders/nfs/synced_folder.rb","lineNumber":48,"sourceCode":"      def usable?(machine, raise_error=false)\n        # If the machine explicitly said NFS is not supported, then\n        # it isn't supported.\n        if !machine.config.nfs.functional\n          return false\n        end\n        if machine.env.host.capability?(:nfs_installed)\n          return true if machine.env.host.capability(:nfs_installed)\n        end\n        return false if !raise_error\n        raise Vagrant::Errors::NFSNotSupported\n      end\n\n      def prepare(machine, folders, opts)\n        # Nothing is necessary to do before VM boot.\n      end\n\n      def enable(machine, folders, nfsopts)\n        raise Vagrant::Errors::NFSNoHostIP if !nfsopts[:nfs_host_ip]\n        raise Vagrant::Errors::NFSNoGuestIP if !nfsopts[:nfs_machine_ip]\n\n        if machine.config.nfs.verify_installed\n          if machine.guest.capability?(:nfs_client_installed)\n            installed = machine.guest.capability(:nfs_client_installed)\n            if !installed\n              can_install = machine.guest.capability?(:nfs_client_install)\n              raise Vagrant::Errors::NFSClientNotInstalledInGuest if !can_install\n              machine.ui.info I18n.t(\"vagrant.actions.vm.nfs.installing\")\n              machine.guest.capability(:nfs_client_install)\n            end\n          end\n        end\n\n        machine_ip = nfsopts[:nfs_machine_ip]\n        machine_ip = [machine_ip] if !machine_ip.is_a?(Array)\n\n        # Prepare the folder, this means setting up various options","sourceCodeStart":30,"sourceCodeEnd":66,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/synced_folders/nfs/synced_folder.rb#L30-L66","documentation":"The NFS synced folder's enable step requires the caller (Vagrant's synced-folder action middleware) to pass nfsopts[:nfs_host_ip]. When that key is missing it raises Vagrant::Errors::NFSNoHostIP, and the message itself labels it an internal error to report as a bug — user config alone is not supposed to reach this raise.","triggerScenarios":"Vagrant's action stack failing to compute/propagate the host IP before enabling NFS (hosts with unusual/many network interfaces after VPN or docker bridge changes), or third-party plugins/scripts calling SyncedFolderNFS#enable directly without supplying nfs_host_ip.","commonSituations":"Host network topology changes confusing host-IP detection; custom provider plugins orchestrating synced folders manually; version mismatches between core Vagrant and provider plugins.","solutions":["Update Vagrant — host-IP resolution bugs in the NFS middleware have been fixed over releases","Reduce host-interface ambiguity (disconnect stale VPN adapters/bridges) and retry","If you call enable() from plugin code, pass nfsopts[:nfs_host_ip] explicitly","File a Vagrant issue with --debug output, as the message directs"],"exampleFix":"# plugin code calling NFS enable directly\n# before\nplugin.enable(machine, folders, {})\n\n# after\nplugin.enable(machine, folders, { nfs_host_ip: host_ip, nfs_machine_ip: guest_ip })","handlingStrategy":"try-catch","validationCode":"# plugin authors: never call NFS enable without host/guest IPs\nraise ArgumentError, \"nfs_host_ip required\" if nfsopts[:nfs_host_ip].nil?","typeGuard":"def nfs_opts_complete?(nfsopts)\n  !nfsopts[:nfs_host_ip].nil? && !nfsopts[:nfs_machine_ip].nil?\nend","tryCatchPattern":"begin\n  action_runner.run(...)  # action that enables synced folders\nrescue Vagrant::Errors::NFSNoHostIP => e\n  # message says: internal bug - capture debug log and file an issue\n  report_vagrant_bug(\"NFSNoHostIP\", e)\nend","preventionTips":["Keep Vagrant and provider plugins updated together","Prefer stable host networking (avoid many transient VPN/bridge adapters) when using NFS","Plugin code: always pass nfs_host_ip/nfs_machine_ip into enable()"],"tags":["nfs","synced-folders","internal-error","host-network"],"backgroundTag":"internal-invariant-violated","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}