{"record":{"id":"59efdc7502b6f1df","repo":"hashicorp/vagrant","slug":"shared-folders-that-chef-requires-are-missing-on-t","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_solo.rb","lineNumber":230,"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":212,"sourceCodeEnd":245,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/chef/provisioner/chef_solo.rb#L212-L245","documentation":"Raised by verify_shared_folders in chef_solo: before running, the provisioner mounts cookbook/roles/nodes/data_bags folders into the guest and checks each with `test -d <folder>` over the communicator (sudo). If any guest path is missing, it aborts with this error and the standard advice: the synced-folder set changed after boot, so `vagrant reload` remounts everything. Chef-solo cannot run without these mounts.","triggerScenarios":"Calling chef_solo provision where any of its folders is absent in the guest: synced folder config changed since the VM booted, mount failed at boot (missing/incorrect guest tools), or a custom `disabled` synced folder overlaps Chef's paths.","commonSituations":"Editing Vagrantfile synced_folders then running `vagrant provision` instead of reload; VirtualBox Guest Additions version mismatch after kernel update (vbguest plugin absent); VMware/OpenBSD folders unsupported; disk full preventing mount.","solutions":["Run `vagrant reload` (or `vagrant reload --provision`) so the new synced-folder set is mounted","If mounts fail at boot, fix guest tools: install/vagrant-vbguest for VirtualBox, open-vm-tools for VMware","Inside the guest, check `mount | grep vagrant` and `dmesg` for mount errors, free disk space","Confirm no `config.vm.synced_folder` entry disables or shadows the Chef paths"],"exampleFix":"# Terminal - before (after changing synced_folder config)\nvagrant provision   # -> missing_shared_folders\n\n# Terminal - after\nvagrant reload --provision   # remounts folders, then provisions","handlingStrategy":"validation","validationCode":"# Host-side pre-flight: every Chef folder must exist before vagrant provision\nrequired = %w[cookbooks roles data_bags]\nmissing = required.reject { |d| Dir.exist?(File.expand_path(d, __dir__)) }\nabort \"Missing Chef folders: #{missing.join(', ')} - run vagrant reload after creating them\" unless missing.empty?","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After any synced_folder or chef *_path change, use `vagrant reload --provision`, never plain provision","Keep guest additions current (vagrant-vbguest) so mounts never silently fail","Check `mount | grep vagrant` inside the guest when provisioning acts weird after boot"],"tags":["chef","chef-solo","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"}