{"record":{"id":"834f9423856f601b","repo":"hashicorp/vagrant","slug":"vagrant-cap-configure-disks-recovery-attached-disk","errorCode":null,"errorMessage":"vagrant.cap.configure_disks.recovery_attached_disks","messagePattern":"vagrant\\.cap\\.configure_disks\\.recovery_attached_disks","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/providers/virtualbox/cap/configure_disks.rb","lineNumber":432,"sourceCode":"        # @param [VagrantPlugins::ProviderVirtualBox::Model::StorageController] controller - the storage controller to use\n        def self.recover_from_resize(machine, disk_info, backup_disk_location, original_disk, vdi_disk_file, controller)\n          begin\n            # move backup to original name\n            FileUtils.mv(backup_disk_location, original_disk[:location], force: true)\n            # Attach disk\n            machine.provider.driver.attach_disk(controller.name,\n                                                disk_info[:port],\n                                                disk_info[:device],\n                                                \"hdd\",\n                                                original_disk[:location])\n\n            # Remove cloned disk if still hanging around\n            if vdi_disk_file\n              machine.provider.driver.close_medium(vdi_disk_file)\n            end\n\n            # We recovered!\n            machine.ui.warn(I18n.t(\"vagrant.cap.configure_disks.recovery_attached_disks\"))\n          rescue => e\n            LOGGER.error(\"Vagrant encountered an error while trying to recover. It will now show the original error and continue...\")\n            LOGGER.error(e)\n          end\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":414,"sourceCodeEnd":442,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/providers/virtualbox/cap/configure_disks.rb#L414-L442","documentation":"Error \"vagrant.cap.configure_disks.recovery_attached_disks\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/providers/virtualbox/cap/configure_disks.rb:432 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}