hashicorp/vagrant · error
vagrant.cap.configure_disks.recovery_from_resize
Error message
vagrant.cap.configure_disks.recovery_from_resize
What it means
Error "vagrant.cap.configure_disks.recovery_from_resize" thrown in hashicorp/vagrant.
Source
Thrown at plugins/providers/virtualbox/cap/configure_disks.rb:375
machine.provider.driver.remove_disk(controller.name, defined_disk[:port], defined_disk[:device])
# Create a backup of the original disk if something goes wrong
LOGGER.warn("Making a backup of the original disk at #{defined_disk[:location]}")
FileUtils.mv(defined_disk[:location], backup_disk_location)
# we have to close here, otherwise we can't re-clone after
# resizing the vdi disk
machine.provider.driver.close_medium(defined_disk[:uuid])
# clone back to original vmdk format and attach resized disk
vmdk_disk_file = machine.provider.driver.vdi_to_vmdk(vdi_disk_file)
machine.provider.driver.attach_disk(controller.name,
defined_disk[:port],
defined_disk[:device],
"hdd",
vmdk_disk_file)
rescue ScriptError, SignalException, StandardError
LOGGER.warn("Vagrant encountered an error while trying to resize a disk. Vagrant will now attempt to reattach and preserve the original disk...")
machine.ui.error(I18n.t("vagrant.cap.configure_disks.recovery_from_resize",
location: original_disk[:location],
name: machine.name))
recover_from_resize(machine, defined_disk, backup_disk_location, original_disk, vdi_disk_file, controller)
raise
ensure
# Remove backup disk file if all goes well
FileUtils.remove(backup_disk_location, force: true)
end
# Remove cloned resized volume format
machine.provider.driver.close_medium(vdi_disk_file)
# Get new updated disk UUID for vagrant disk_meta file
storage_controllers = machine.provider.driver.read_storage_controllers
updated_controller = storage_controllers.get_controller(controller.name)
new_disk_info = updated_controller.attachments.detect { |h| h[:location] == defined_disk[:location] }
defined_disk = new_disk_infoView on GitHub (pinned to 35f3160f4a)
When it happens
Trigger: Thrown at plugins/providers/virtualbox/cap/configure_disks.rb:375 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/37c9af6d633dcc34.
Report an issue: GitHub.