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"

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

Leave a Reply

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