hashicorp/vagrant · error · Vagrant::Errors::SnapshotNotFound
The snapshot name `%{snapshot_name}` was not found for the v
Error message
The snapshot name `%{snapshot_name}` was not found for the
virtual machine `%{machine}`. What it means
`vagrant snapshot restore [vm-name] <name>` could not find the snapshot: the provider's `snapshot_list` capability does not include the given name. As with delete, Vagrant checks membership before dispatching the snapshot_restore action and raises SnapshotNotFound naming the machine and the missing snapshot.
Source
Thrown at plugins/commands/snapshot/command/restore.rb:55
end
# Validate the provisioners
validate_provisioner_flags!(options, argv)
name = argv.pop
options[:snapshot_name] = name
with_target_vms(argv) do |vm|
if !vm.provider.capability?(:snapshot_list)
raise Vagrant::Errors::SnapshotNotSupported
end
snapshot_list = vm.provider.capability(:snapshot_list)
if snapshot_list.include? name
vm.action(:snapshot_restore, options)
else
raise Vagrant::Errors::SnapshotNotFound,
snapshot_name: name,
machine: vm.name.to_s
end
end
# Success, exit status 0
0
end
end
end
end
end
View on GitHub (pinned to 35f3160f4a)
Solutions
- Run `vagrant snapshot list` (optionally with the vm-name) and copy the exact name
- Confirm you are targeting the machine that owns the snapshot by passing the vm-name
- Re-save the snapshot with `vagrant snapshot save <name>` if it should exist
Example fix
# before vagrant snapshot restore db clean-db # snapshot lives on 'web' machine # after vagrant snapshot restore web clean-db
Defensive patterns
Strategy: validation
Validate before calling
existing = `vagrant snapshot list`.split
abort "snapshot #{name} not found; have: #{existing.join(', ')}" unless existing.include?(name)
system("vagrant snapshot restore #{name}") Try / catch
begin
command.execute
rescue Vagrant::Errors::SnapshotNotFound => e
warn "missing #{e.extra_data[:snapshot_name]} on #{e.extra_data[:machine]}"
exit 1
end Prevention
- List snapshots before restoring in automation
- Do not rename snapshots outside Vagrant (provider GUI) if scripts reference them
- Target the exact machine with the vm-name argument in multi-machine setups
When it happens
Trigger: Restoring a snapshot that was never saved on that machine, was deleted, or differs by case/whitespace; targeting the wrong vm in a multi-machine environment.
Common situations: Rollback scripts referencing snapshots a teammate already deleted; renaming snapshots outside Vagrant (via the provider GUI) so the list no longer matches; case-sensitive name mismatches.
Related errors
- The snapshot name `%{snapshot_name}` was not found for the v
- You requested to remove the box '%{name}' version '%{version
- No synced folder implementation is available for your synced
- The clone environment hasn't been created yet. To clone from
- The guest machine entered an invalid state while waiting for
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/0417db6a4236e05c.
Report an issue: GitHub.