hashicorp/vagrant · error

DVD '#{d["name"]}' no longer exists in Vagrant config. Remov

Error message

DVD '#{d["name"]}' no longer exists in Vagrant config. Removing medium from guest...

What it means

Error "DVD '#{d["name"]}' no longer exists in Vagrant config. Removing medium from guest..." thrown in hashicorp/vagrant.

Source

Thrown at plugins/providers/virtualbox/cap/cleanup_disks.rb:69

              end

              machine.provider.driver.close_medium(d["uuid"])
            end
          end
        end

        # @param [Vagrant::Machine] machine
        # @param [VagrantPlugins::Kernel_V2::VagrantConfigDisk] defined_dvds
        # @param [Array<Hash>] dvd_meta - An array of all the previously defined dvds from the last configure_disk action
        def self.handle_cleanup_dvd(machine, defined_dvds, dvd_meta)
          raise TypeError, "Expected `Array` but received `#{dvd_meta.class}`" if !dvd_meta.is_a?(Array)
          dvd_meta.each do |d|
            dsk = defined_dvds.select { |dk| dk.name == d["name"] }
            if !dsk.empty?
              next
            else
              LOGGER.warn("Found dvd not in Vagrantfile config: '#{d["name"]}'. Removing dvd from guest #{machine.name}")
              machine.ui.warn("DVD '#{d["name"]}' no longer exists in Vagrant config. Removing medium from guest...", prefix: true)

              storage_controllers = machine.provider.driver.read_storage_controllers
              controller = storage_controllers.get_controller(d["controller"])
              attachment = controller.get_attachment(uuid: d["uuid"])

              if !attachment
                LOGGER.warn("DVD '#{d["name"]}' not attached to guest, but still exists.")
              else
                machine.provider.driver.remove_disk(controller.name, attachment[:port], attachment[:device])
              end
            end
          end
        end
      end
    end
  end
end

View on GitHub (pinned to 35f3160f4a)

When it happens

Trigger: Thrown at plugins/providers/virtualbox/cap/cleanup_disks.rb:69 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/066076652988b0c7. Report an issue: GitHub.