sciurus / vagrant-mutate

Convert vagrant boxes to work with different providers
MIT License
281 stars 41 forks source link

broken VM when mutating ubuntu/xenial64 into libvirt #87

Closed doudou closed 8 years ago

doudou commented 8 years ago

I've been trying to get the ubuntu/xenial64 VM from the atlas to run under vagrant-libvirt.

The first problem I had was with the kernel, but it seems to be a problem with KVM (I had to have KVM not advertise the avx CPU feature)

The second one, I really don't know whether it's a mutation or KVM/QEMU/libvirt issue. The root filesystem just does not show up. I end up in an initramfs, but no block devices are shown. I really don't know where to start looking, so I would be glad if I could get any pointers.

sciurus commented 8 years ago

Hi @doudou ,

Thanks for using vagrantl-libvirt, and sorry you are having trouble. Unfortunately, I only have time to debug issues with the box mutation process itself. I can't help if the mutation succeeded but the OS does not boot. The operating system itself is opaque to vagrant-mutate. It doesn't inspect or alter the machine's filesystem, it just converts the disk image format and writes the appropriate vagrant box configuration.

If you are able to figure out why it does not boot, and it turns out that there is something vagrant-mutate could do differently to make it boot, please reopen this issue to let me know.

bjne commented 8 years ago

The problem with ending up in initramfs is solved by setting disk_bus = "virtio", somehow mutate is defauling to:

      libvirt.disk_bus = 'scsi'

Another problem I am experiencing with ubuntu/xenial64 is that cloud-init is not able to complete, even tho the machine gets a valid ip address. I do not understand why this works with virtualbox and not with a mutated box.

sciurus commented 8 years ago

There is actually no default. What vagrant-mutate does is look at the disk interface your VM is using in virtualbox, and configure it the same way in libvirt. See https://github.com/sciurus/vagrant-mutate/blob/master/lib/vagrant-mutate/box/virtualbox.rb#L81-L103

It's a funny situation. I used to always use virtio, but that broke things for someone so in #21 they implemented the detection logic. Then that broke things for someone else in #80 so we added the --force-virtio flag as a workaround in #82.

Sorry to hear cloud-init is failing. If you figure that out an there is something we could change in vagrant-mutate, let me know.

bjne commented 8 years ago

2016-08-25 17:49 GMT+02:00 Brian Pitts notifications@github.com:

There is actually no default. What vagrant-mutate does is look at the disk interface your VM is using in virtualbox, and configure it the same way in libvirt. See https://github.com/sciurus/vagrant-mutate/blob/master/ lib/vagrant-mutate/box/virtualbox.rb#L81-L103

It's a funny situation. I used to always use virtio, but that broke things for someone so in #21 https://github.com/sciurus/vagrant-mutate/pull/21 they implemented the detection logic. Then that broke things for someone else in #80 https://github.com/sciurus/vagrant-mutate/pull/80 so we added the --force-virtio flag as a workaround in #82 https://github.com/sciurus/vagrant-mutate/pull/82.

Sorry to hear cloud-init is failing. If you figure that out an there is something we could change in vagrant-mutate, let me know.

The problem here is about multiple disks, and for example ubuntu/xenial using configdrive as the 2nd disk. This problem is reported to https://github.com/vagrant-libvirt/vagrant-libvirt/issues/602 and vagrant-libvirt must support multiple disks before vagrant-mutate can..

Bj(/)rnar