OSBN/Ubuntuusers Planet SUSE XING / LinkedIn / Amazon

Vagrant + libvirt + openSUSE Leap = /dev/sda not found

Recently, I stumbled upon the following issue when creating new openSUSE Leap 15.1 Vagrantboxes from the generic and roboxes projects:

[ TIME ] Timed out waiting for device dev-sda2.device.
[DEPEND] Dependency failed for Resume from hibernation using device /dev/sda2.
[  OK  ] Reached target Local File System (Pre).
[  137.377508] dracut-initqueue[242] Warning: dracut-initqueue timeout - starting timeout scripts
...

Beside openSUSE, also some versions of Fedora, RHEL and CentOS were affected.

The background is that the Symbios Logic SCSI driver (sym53c8xx) used by the Vagrantfile repositories was removed from the kernel for the affected distributions.

As a result, the storage controller virtio was selected but unfortunately not every Linux distribution seems to fully support this. The main reason is that device names change from /dev/sda to /dev/vda – and in some files (e.g. /etc/fstab) these values are hard-coded.

The solution should be to manually set the storage controller to scsi which did not work for me – I had to choose sata instead.

Additional details can be found in the appropriate GitHub issue.

The solution is to append the provider directive libvirt.disk_bus to the Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "generic/opensuse15"
  config.vm.box_version = "3.0.18"

  config.vm.provider :libvirt do |libvirt|
    libvirt.disk_bus = "sata"
  end
end

Afterwards, starting the box worked like a charm.

SATA controller has been configured

I was able to reproduce the issue for the following Vagrantboxes:

Sharing is caring

2 Comments Add New Comment

  1. John says:

    Hot damn, thanks for posting this, it fixed my problems right off the bat. Appreciate it!

    Vagrant is a neat tech, but god is it picky at times. Don’t even ask me about my trials getting it to work with both a NAT’d br0 interface and virbr0 interface on the same box.

    1. Christian says:

      Hey John,

      happy to help! 🙂

      You’re absolutely right – sometimes Vagrant just bails out without any helpful message..

      Best wishes – stay healthy,
      Christian.

Leave a Reply

Your email address will not be published. Required fields are marked *