hashicorp/vagrant · error · Vagrant::Errors.VirtualBoxDisksNoSupportedControllers
Vagrant was unable to detect a disk controller with any of t
Error message
Vagrant was unable to detect a disk controller with any of the
following supported types:
%{supported_types}
Please add one of the supported controller types in order to use the
disk configuration feature. What it means
When managing disks, Vagrant picks the primary (boot) controller by filtering controllers to supported types, sorting by boot priority, and taking the first one that has a hard-disk attachment. If no supported controller carries an HDD, VirtualBoxDisksNoSupportedControllers is raised listing the supported types. This guards the primary-disk detection used by configure_disks (e.g. resizing the primary disk) and only triggers when the disk feature is exercised.
Source
Thrown at plugins/providers/virtualbox/model/storage_controller_array.rb:37
if !controller
raise Vagrant::Errors::VirtualBoxDisksControllerNotFound, name: name
end
controller
end
# Find the controller containing the primary disk (i.e. the boot
# disk). This is used to determine which controller virtual disks
# should be attached to.
#
# Raises an exception if no supported controllers are found.
#
# @return [VagrantPlugins::ProviderVirtualBox::Model::StorageController]
def get_primary_controller
ordered = find_all(&:supported?).sort_by(&:boot_priority)
controller = ordered.detect { |c| c.attachments.any? { |a| hdd?(a) } }
if !controller
raise Vagrant::Errors::VirtualBoxDisksNoSupportedControllers,
supported_types: supported_types.join(", ")
end
controller
end
# Find the attachment representing the primary disk (i.e. the boot
# disk). We can't rely on the order of #list_hdds, as they will not
# always come in port order, but primary is always Port 0 Device 0.
#
# @return [Hash] attachment - Primary disk attachment information
def get_primary_attachment
attachment = nil
controller = get_primary_controller
attachment = controller.get_attachment(port: "0", device: "0")
if !attachment
raise Vagrant::Errors::VirtualBoxDisksPrimaryNotFoundView on GitHub (pinned to 35f3160f4a)
Solutions
- Check the VM storage layout: `VBoxManage showvminfo <uuid>` — confirm the boot disk is attached to a controller of a supported type (e.g. SATA/IDE/SCSI per the error's list)
- Reattach/move the hard disk to a supported controller in the VirtualBox GUI
- Use a standard box (default bento/ubuntu etc.) known to work with the disk feature
- Remove the `config.vm.disk` blocks if you do not need disk management on this VM
Defensive patterns
Strategy: validation
Validate before calling
info = `VBoxManage showvminfo #{uuid} --machinereadable`
supported = %w[IDE SATA SCSI VirtIO SCSI LsiLogic SAS] # per the error's supported_types list
has_hdd = info.match?(/^"#{uuid}".*|^\S+\.vdi$/m) && info.lines.any? { |l| l.include?('.vdi') || l.include?('.vhd') }
warn 'primary disk not on a supported controller' unless has_hdd Type guard
def primary_disk_on_supported_controller?(uuid)
info = `VBoxManage showvminfo #{uuid} --machinereadable`
controller_types = info.scan(/^storagecontrollertype\d+="(.+)"/).flatten
disks = info.scan(/^"([^"]+\.(?:vdi|vhd|vmdk))"=/).flatten
!disks.empty? && controller_types.any? { |t| t =~ /IDE|SATA|SCSI|SAS/i }
end Prevention
- Use stock boxes with standard SATA/IDE layouts when relying on config.vm.disk
- Keep the boot disk attached to a mainstream controller type
- Test disk configs on a scratch VM before applying them to shared environments
When it happens
Trigger: get_primary_controller during `vagrant up` with `config.vm.disk` present: `find_all(&:supported?).sort_by(&:boot_priority)` yields controllers, but none of them has an attachment where hdd?(a) is true — or there are no supported controllers at all.
Common situations: Box whose boot disk sits on an unsupported controller type; VM imported with disks detached; custom storage topology created in the VirtualBox GUI (all disks on USB/NVMe-style controllers outside the supported set); disk config applied to a VM template that has no hard disk yet.
Related errors
- Vagrant expected to find a storage controller called '%{name
- VirtualBox only allows up to %{limit} disks to be attached t
- No synced folder implementation is available for your synced
- The guest machine entered an invalid state while waiting for
- The snapshot name `%{snapshot_name}` was not found for the v
AI-assisted analysis of hashicorp/vagrant@35f3160f4a (2026-08-21).
Data as JSON: /api/errors/f0d30c569902fdd0.
Report an issue: GitHub.