Coder Social home page Coder Social logo

Comments (5)

mrc0mmand avatar mrc0mmand commented on May 22, 2024 3

Okay, thanks to the rubber duck debugging I just did, I realized I haven't tried other disk_bus methods. And, it, of course, works.

The generic/centos7 works with the sata bus, i.e.:

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

Similarly, the generic/arch box successfully boots up with the ide bus:

  config.vm.provider "libvirt" do |libvirt|
    libvirt.disk_bus="ide"
  end

I'm not sure what's different on my system that the default disk bus doesn't work, but at least there's some easy solution.

from robox.

jerrac avatar jerrac commented on May 22, 2024

Thanks @mrc0mmand , I just ran into this (or something very similar) issue with generic/centos7 and generic/oraclelinux7. Setting it to use sata made it work.

Interestingly, generic/ubuntu1604 and generic/debian9 worked just fine without me having to make any changes.

I'm on Ubuntu 18.04, a 2016 Dell XPS 13 laptop.

Just in case it helps someone down the road, here's my Vagrantfile.

Vagrant.configure("2") do |config|

  config.vm.define :xenial do |xenial|
    xenial.vm.box = "generic/ubuntu1604"
    xenial.vm.network :private_network, ip: "192.168.222.2"
    xenial.vm.hostname = "aspectsxenial"
  end

  config.vm.define :centos7 do |centos7|
    centos7.vm.box = "generic/centos7"
    centos7.vm.network :private_network, ip: "192.168.222.4"
    centos7.vm.hostname = "aspectscentos7"
    config.vm.provider "libvirt" do |libvirt|
      libvirt.disk_bus="sata"
    end
  end


  config.vm.define :stretch do |stretch|
    stretch.vm.box = "generic/debian9"
    stretch.vm.network :private_network, ip: "192.168.222.5"
    stretch.vm.hostname = "aspectsstretch"
  end

  config.vm.define :oraclelinux7 do |oraclelinux7|
    oraclelinux7.vm.box = "generic/oracle7"
    oraclelinux7.vm.network :private_network, ip: "192.168.222.7"
    oraclelinux7.vm.hostname = "aspectsoraclelinux7"
    config.vm.provider "libvirt" do |libvirt|
      libvirt.disk_bus="sata"
    end
  end
  config.vm.provider "virtualbox" do | oraclelinux7|
    oraclelinux7.customize ["modifyvm", :id, "--memory", "2048"]
  end

  config.vm.define :bionic do |bionic|
    bionic.vm.box = "generic/ubuntu1804"
    bionic.vm.network :private_network, ip: "192.168.222.9"
    bionic.vm.hostname = "aspectsbionic"
    bionic.vm.provision "shell", inline: "apt-get -y install python-apt"
  end

end

from robox.

gorshunovr avatar gorshunovr commented on May 22, 2024

Got the same issue, solved. Thank you!

from robox.

ladar avatar ladar commented on May 22, 2024

I've run into this issue before, I tried to add mitigations when I hit it, but sadly, I don't have the resources to test every image on every possible host.

It seems the images failing to find the rootfs aren't finding the right driver in the kernel image. And that all depends on what's bundled by default with the kernel for that distro.

If we want to add support for alt controllers to the RHEL/CentOS 7 images, we'd need to update the dracut config, and rebuild the kernel image. I'd accept a patch, if someone wanted to put the time into making that happen.

With Arch, it would involve updating the /etc/mkinitcpio.conf config file, and rebuilding the kernel image.

That being said, I've added default directives to the Vagrantfile bundled with the some of the boxes, to help mitigate this issue. For example CentOS 7 has disk_bus = "scsi" by default, inside the libvirt config block. But I suspect the problem is that the scsi disk bus is actually a different emulation on your Fedora system, than the default scsi disk bus on older libvirt/qemu systems like CentOS 7.

On my CentOS 7 host I see:

[ladar@host ~]# /usr/libexec/qemu-kvm -device help 2>&1 | grep scsi
name "scsi-block", bus SCSI, desc "SCSI block device passthrough"
name "scsi-cd", bus SCSI, desc "virtual SCSI CD-ROM"
name "scsi-disk", bus SCSI, desc "virtual SCSI disk or CD-ROM (legacy)"
name "scsi-generic", bus SCSI, desc "pass through generic scsi device (/dev/sg*)"
name "scsi-hd", bus SCSI, desc "virtual SCSI disk"
name "virtio-scsi-device", bus virtio-bus
name "virtio-scsi-pci", bus PCI, alias "virtio-scsi"

from robox.

jerrac avatar jerrac commented on May 22, 2024

Just FYI, with version 1.9.16 of the CentOS7 box, I had to change 'sata' to 'ide' for it to work. I also tried just commenting the entire centos7.vm.provider "libvirt" do |domain| section out, but it didn't help.

from robox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.