sciurus/vagrant-mutate

kernel panic / logical volumes not found booting vagrant-libvirt after mutate

Closed this issue · 2 comments

I downloaded the CentOS 5.10 box from puppetlabs:
http://puppet-vagrant-boxes.puppetlabs.com/centos-510-x64-virtualbox-puppet.box

vagrant box add ...
vagrant init ...
vagrant mutate ... libvirt
vagrant up

When the image tries to boot, it gets to the point of attempting to find logical volumes / find hard disks, and ends up being unable to find logical volumes.
screenshot from 2014-01-21 14 55 07

Hi Thoraxe,

In the current vagrant-libvirt release, the box format does not include any information on what bus the virtual disk should be attached to. By default, it uses virtio. However, I've seen some virtual machines which will not boot properly if their disk is not attached to the ide bus. It appears this is one of them. In the master branch of vagrant-libvirt I've introduced an option to set the disk bus. I tested booting the VM with it and it worked.

  config.vm.define :test do |test|
    test.vm.box="centos-510-x64-virtualbox-puppet"
    test.vm.provider :libvirt do |domain|
        domain.disk_bus="ide"
    end
  end

I haven't taught vagrant-mutate how to include the disk_bus in the base boxes it creates yet, so to use this you'll have to

  1. build and install vagrant-libvirt from git
  2. manually set the fdisk_bus in your Vagrantfile like demonstrated above

Another potential fix is manually creating a libvirt domain for the disk image, starting it up and logging in, rebuilding the initrd to include the virtio drivers, then recreating the box from the modified disk imge.

As of 0.2.4 vagrant-mutate will set disk_bus for you. Combined with the 0.0.14 vagrant-libvirt release you should not experience this problem anymore.