{"record":{"id":"d8d942156cb49526","repo":"hashicorp/vagrant","slug":"shared-folders-that-chef-requires-are-missing-on-t-d8d942","errorCode":null,"errorMessage":"Shared folders that Chef requires are missing on the virtual machine.\nThis is usually due to configuration changing after already booting the\nmachine. The fix is to run a `vagrant reload` so that the proper shared\nfolders will be prepared and mounted on the VM.","messagePattern":"Shared folders that Chef requires are missing on the virtual machine\\.\nThis is usually due to configuration changing after already booting the\nmachine\\. The fix is to run a `vagrant reload` so that the proper shared\nfolders will be prepared and mounted on the VM\\.","errorType":"exception","errorClass":"VagrantPlugins::Chef::Provisioner::Base::ChefError","httpStatus":null,"severity":"error","filePath":"plugins/provisioners/chef/provisioner/chef_zero.rb","lineNumber":109,"sourceCode":"                next if data.empty?\n\n                @machine.ui.info(data, color: color)\n              end\n\n              # There is no need to run Chef again if it converges\n              return if exit_status == 0\n            end\n          end\n\n          # If we reached this point then Chef never converged! Error.\n          raise ChefError, :no_convergence\n        end\n\n        def verify_shared_folders(folders)\n          folders.each do |folder|\n            @logger.debug(\"Checking for shared folder: #{folder}\")\n            if !@machine.communicate.test(\"test -d #{folder}\", sudo: true)\n              raise ChefError, :missing_shared_folders\n            end\n          end\n        end\n\n        protected\n\n        # Extracts only the remote paths from a list of folders\n        def guest_paths(folders)\n          folders.map { |parts| parts[2] }\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":91,"sourceCodeEnd":124,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/chef/provisioner/chef_zero.rb#L91-L124","documentation":"Raised by verify_shared_folders in the chef_zero provisioner: every host folder Chef needs (cookbooks, roles, nodes, data bags, environments) is mounted into the guest and probed with `test -d <path>` over sudo. Any missing guest path aborts provisioning with the canonical fix: `vagrant reload` re-prepares the mounts. chef_zero serves those mounted files from a local server, so absence is fatal before any chef run starts.","triggerScenarios":"Running chef_zero provisioning when the synced folder set changed after the machine booted, or when mounting failed at boot (guest tools missing/mismatched), so one or more Chef folders do not exist inside the guest.","commonSituations":"Added/renamed `chef.data_bags_path` then used `vagrant provision` instead of reload; Guest Additions broken after guest kernel upgrade; long path or special characters breaking the mount; config.vm.synced_folder disabling /vagrant.","solutions":["Run `vagrant reload --provision` to rebuild and remount the synced folders","Repair guest additions (vagrant-vbguest plugin or matching open-vm-tools) if mounts fail every boot","Verify inside the guest that each configured path exists: `vagrant ssh -c 'ls /tmp/vagrant-chef-*/'`","Simplify/shorten host-side folder paths if the mount itself is failing"],"exampleFix":"# Terminal - before (changed chef.*_path settings)\nvagrant provision   # -> missing_shared_folders\n\n# Terminal - after\nvagrant reload --provision","handlingStrategy":"validation","validationCode":"# Pre-flight on the host: all chef_zero paths must exist and be shareable\n%w[cookbooks data_bags roles environments].each do |dir|\n  warn \"#{dir} missing - chef_zero mount will fail\" unless Dir.exist?(dir)\nend","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use `vagrant reload --provision` after changing any chef path or synced folder entry","Pin guest-tools versions that match your provider (vagrant-vbguest, open-vm-tools) to keep mounts healthy","Avoid deeply nested or symlinked cookbook paths that hosts share incorrectly"],"tags":["chef","chef-zero","provisioning","vagrant","synced-folders"],"backgroundTag":"shared-folder-not-mounted","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}