{"record":{"id":"def53ca2911e3b77","repo":"hashicorp/vagrant","slug":"vagrant-attempted-to-execute-the-capability-cap-def53c","errorCode":null,"errorMessage":"Vagrant attempted to execute the capability '%{cap}'\non the detect guest OS '%{guest}', but the guest doesn't\nsupport that capability. This capability is required for your\nconfiguration of Vagrant. Please either reconfigure Vagrant to\navoid this capability or fix the issue by creating the capability.","messagePattern":"Vagrant attempted to execute the capability '%(.+?)'\non the detect guest OS '%(.+?)', but the guest doesn't\nsupport that capability\\. This capability is required for your\nconfiguration of Vagrant\\. Please either reconfigure Vagrant to\navoid this capability or fix the issue by creating the capability\\.","errorType":"exception","errorClass":"Vagrant::Errors::GuestCapabilityNotFound","httpStatus":null,"severity":"error","filePath":"plugins/synced_folders/smb/synced_folder.rb","lineNumber":111,"sourceCode":"            data[:smb_username] = smb_username\n          else\n            data[:smb_username] ||= smb_username\n          end\n          data[:smb_password] ||= smb_password\n\n          # Register password as sensitive\n          Vagrant::Util::CredentialScrubber.sensitive(data[:smb_password])\n        end\n\n        machine.env.host.capability(:smb_prepare, machine, folders, opts)\n      end\n\n      def enable(machine, folders, opts)\n        machine.ui.output(I18n.t(\"vagrant_sf_smb.mounting\"))\n\n        # Make sure that this machine knows this dance\n        if !machine.guest.capability?(:mount_smb_shared_folder)\n          raise Vagrant::Errors::GuestCapabilityNotFound,\n            cap: \"mount_smb_shared_folder\",\n            guest: machine.guest.name.to_s\n        end\n\n        # Setup if we have it\n        if machine.guest.capability?(:smb_install)\n          machine.guest.capability(:smb_install)\n        end\n\n        # Detect the host IP for this guest if one wasn't specified\n        # for every folder.\n        host_ip = nil\n        need_host_ip = false\n        folders.each do |id, data|\n          if !data[:smb_host]\n            need_host_ip = true\n            break\n          end","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/synced_folders/smb/synced_folder.rb#L93-L129","documentation":"The SMB synced folder's enable step first verifies the guest supports mount_smb_shared_folder; if machine.guest.capability?(:mount_smb_shared_folder) is false it raises GuestCapabilityNotFound with cap and guest name interpolated. SMB folders target Windows guests, so attaching one to a guest whose plugin lacks the mount capability aborts before mounting.","triggerScenarios":"config.vm.synced_folder ... type: \"smb\" on a Linux/other guest whose guest plugin does not register mount_smb_shared_folder (core Linux guests expect nfs/rsync/virtualbox, not SMB mounts).","commonSituations":"Porting a Windows-oriented Vagrantfile (with smb_username/smb_password) to a Linux box; choosing smb for host performance without checking guest support.","solutions":["Use smb folders only with Windows guests; for Linux use nfs or virtualbox/rsync","Change the folder type: config.vm.synced_folder \"src\", \"/srv\", type: \"nfs\"","Install a guest plugin that provides the SMB/CIFS mount capability for your distro","Contribute the capability to the guest plugin, as the message suggests"],"exampleFix":"# before\nconfig.vm.synced_folder \"src\", \"/srv\", type: \"smb\",\n  smb_username: \"...\", smb_password: \"...\"   # linux guest -> capability missing\n\n# after\nconfig.vm.synced_folder \"src\", \"/srv\", type: \"nfs\"","handlingStrategy":"validation","validationCode":"# only use smb folders when the guest can mount them\nreturn unless machine.guest.capability?(:mount_smb_shared_folder)","typeGuard":"def smb_mountable?(machine)\n  machine.guest.capability?(:mount_smb_shared_folder)\nend","tryCatchPattern":"begin\n  env.cli(%w(up))\nrescue Vagrant::Errors::GuestCapabilityNotFound => e\n  d = e.extra_data\n  abort \"#{d[:guest]} guest lacks #{d[:cap]} - use nfs/virtualbox folders\"\nend","preventionTips":["Reserve type: \"smb\" for Windows guests","Pick synced folder types per guest OS instead of one global setting","Install guest plugins that provide SMB/CIFS capabilities when needed"],"tags":["smb","synced-folders","windows","guest","capability"],"backgroundTag":"guest-capability-unsupported","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}