{"record":{"id":"c909e8cec8864641","repo":"hashicorp/vagrant","slug":"the-guest-does-not-provide-extraction-capability-f","errorCode":null,"errorMessage":"The guest does not provide extraction capability for the requested\ncompression type (`%{type}`). Try a different compression type or\nupload without compression.","messagePattern":"The guest does not provide extraction capability for the requested\ncompression type \\(`%(.+?)`\\)\\. Try a different compression type or\nupload without compression\\.","errorType":"exception","errorClass":"Vagrant::Errors::UploadMissingExtractCapability","httpStatus":null,"severity":"error","filePath":"plugins/commands/upload/command.rb","lineNumber":150,"sourceCode":"      #\n      # @param [Vagrant::Machine] machine Vagrant guest machine\n      # @param [Hash] options Command options\n      def compression_setup!(machine, options)\n        if !options[:compression_type]\n          if machine.guest.capability_host_chain.first[0] == :windows\n            options[:compression_type] = :zip\n          else\n            options[:compression_type] = :tgz\n          end\n        end\n        if !VALID_COMPRESS_TYPES.include?(options[:compression_type])\n          raise Vagrant::Errors::UploadInvalidCompressionType,\n            type: options[:compression_type],\n            valid_types: VALID_COMPRESS_TYPES.join(\", \")\n        end\n        options[:decompression_method] = \"decompress_#{options[:compression_type]}\".to_sym\n        if !machine.guest.capability?(options[:decompression_method])\n          raise Vagrant::Errors::UploadMissingExtractCapability,\n            type: options[:compression_type]\n        end\n      end\n\n      # Compress path using zip into temporary file\n      #\n      # @param [String] path Path to compress\n      # @return [String] path to compressed file\n      def compress_source_zip(path)\n        require \"zip\"\n        zipfile = Tempfile.create([\"vagrant\", \".zip\"])\n        zipfile.close\n        if File.file?(path)\n          source_items = [path]\n        else\n          source_items = Dir.glob(File.join(path, \"**\", \"**\", \"*\"))\n        end\n        c_dir = nil","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/upload/command.rb#L132-L168","documentation":"When compression is enabled, `vagrant upload` requires the GUEST to be able to unpack the chosen format: it checks the guest capability `decompress_tgz` or `decompress_zip`. UploadMissingExtractCapability fires when the guest's capability chain does not implement the decompress method matching the compression type. The upload never starts; this is a guest-support check.","triggerScenarios":"`--compress`/`-C tgz` against a minimal guest whose detected guest plugin lacks `decompress_tgz`; forcing `-C zip` on a Linux guest without the zip decompression capability; guest OS detection falling through to a generic fallback host with few capabilities.","commonSituations":"Tiny containers or custom base boxes where guest detection fails; uploading .zip archives to Linux guests because the file happens to be a zip; old Vagrant versions missing newer guest implementations.","solutions":["Retry without compression: drop `-c/--compress` and `-C`","Switch to the type the guest can extract: Windows-flavored guests support `zip`, common Linux guests support `tgz`","Use a more standard box whose guest OS is detected correctly (check via `vagrant ssh` and `cat /etc/os-release`) so capabilities resolve"],"exampleFix":"# before\nvagrant upload -c -C tgz ./site/ /var/www   # guest cannot decompress_tgz\n\n# after\nvagrant upload ./site/ /var/www             # uncompressed upload succeeds","handlingStrategy":"fallback","validationCode":"cap = \"decompress_#{type}\".to_sym\nabort \"guest lacks #{cap}; retry without --compress\" unless machine.guest.capability?(cap)","typeGuard":null,"tryCatchPattern":"begin\n  command.execute\nrescue Vagrant::Errors::UploadMissingExtractCapability\n  system('vagrant', 'upload', src, dst)  # fallback: uncompressed upload\nend","preventionTips":["Skip --compress for minimal or appliance-like guests","Match compression type to the guest platform (zip on Windows guests, tgz on Linux)","Smoke-test uploads against new boxes before adding compression to pipelines"],"tags":["vagrant","upload","guest-capability","compression","missing-capability"],"backgroundTag":"missing-capability","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}