hashicorp/vagrant · error · Vagrant::Errors::BoxChecksumInvalidType
The specified checksum type is not supported by Vagrant: %{t
Error message
The specified checksum type is not supported by Vagrant: %{type}.
Vagrant supports the following checksum types:
%{types} What it means
Vagrant::Util::FileChecksum#load_digest looks the requested checksum type up in the frozen CHECKSUM_MAP (:md5, :sha1, :sha256, :sha384, :sha512, compared after downcasing); an unknown type raises BoxChecksumInvalidType and the message lists the supported set. It fires whenever a box download specifies a checksum algorithm Vagrant cannot compute.
Source
Thrown at lib/vagrant/util/file_checksum.rb:73
f.readpartial(BUFFER_SIZE, buf)
digest.update(buf)
rescue EOFError
# Although we check for EOF earlier, this seems to happen
# sometimes anyways [GH-2716].
break
end
end
end
digest.hexdigest
end
private
def load_digest(type)
digest = CHECKSUM_MAP[type.to_s.downcase.to_sym]
if digest.nil?
raise Vagrant::Errors::BoxChecksumInvalidType,
type: type.to_s,
types: CHECKSUM_MAP.keys.join(', ')
end
digest
end
end
end
end
# NOTE: This class was not originally namespaced
# with the Util module so this is left for backwards
# compatibility.
FileChecksum = Vagrant::Util::FileChecksum
View on GitHub (pinned to 35f3160f4a)
Solutions
- Switch to a supported algorithm — prefer sha256 — and supply its digest from the vendor's release page
- Drop box_download_checksum and box_download_checksum_type entirely if integrity is handled out-of-band
- If the bad type comes from box metadata you host, fix the metadata file
Example fix
# before config.vm.box_download_checksum_type = "crc32" config.vm.box_download_checksum = "a1b2c3d4" # after config.vm.box_download_checksum_type = "sha256" config.vm.box_download_checksum = "9f2c8b...e81"
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED = Vagrant::Util::FileChecksum::CHECKSUM_MAP.keys.map(&:to_s) # md5, sha1, sha256, sha384, sha512
unless SUPPORTED.include?(type.to_s.downcase)
abort "checksum type must be one of: #{SUPPORTED.join(', ')}"
end Try / catch
begin Vagrant::Util::FileChecksum.new(path, digest_klass).checksum rescue Vagrant::Errors::BoxChecksumInvalidType => e warn e.message # lists the supported types type = 'sha256'; digest_klass = Digest::SHA256 retry end
Prevention
- Standardize templates on sha256
- Lint generated Vagrantfiles/metadata with a supported-type check
- Remember the accepted set is exactly md5, sha1, sha256, sha384, sha512
When it happens
Trigger: config.vm.box_download_checksum_type set to anything outside md5/sha1/sha256/sha384/sha512 (e.g. 'crc32', 'blake2b', 'sha224', or a typo like 'sha2566'); hosted box metadata carrying an unsupported checksum type. Uppercase input is fine — the lookup downcases first.
Common situations: Copy-pasting a vendor checksum of a kind Vagrant does not implement; hand-written box metadata.json with invented types; templated Vagrantfiles with typos in the type field.
Related errors
- There are errors in the configuration of this machine. Pleas
- Network settings specified in your Vagrantfile define an inv
- The checksum of the downloaded box did not match the expecte
- cloud-init is not found. Please ensure that cloud-init is in
- The specified Vagrantfile to clone from was not found. Pleas
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/f636dbf75fe704f4.
Report an issue: GitHub.