sciurus / vagrant-mutate

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

Cannot Boot Mutated Ubuntu 16.04 Box #84

Closed ericpulvino closed 8 years ago

ericpulvino commented 8 years ago

Host OS:

Ubuntu 16.04

Guest OS:

boxcutter/ubuntu1604

Type of Mutation:

vagrant mutate boxcutter/ubuntu1604 libvirt

Vagrant Mutate Debug Log Output:

https://gist.github.com/ericpulvino/3767141e6030af1ad35e2662edf97d00

Issue:

The box converts without any issues however it does not boot. Box boots with the default Virtualbox provider without issue.

The mutated VM sits here during the boot process:

(eric@xenial1)-(10:29 PM Mon May 30)-> -(14 files, 116Kb)--> vagrant up server1 --provider=libvirt Bringing machine 'server1' up with 'libvirt' provider... ==> server1: Creating image (snapshot of base box volume). ==> server1: Creating domain with the following settings... ==> server1: -- Name: topology_converter_public_server1 ==> server1: -- Domain type: kvm ==> server1: -- Cpus: 1 ==> server1: -- Memory: 400M ==> server1: -- Management MAC:
==> server1: -- Loader:
==> server1: -- Base box: boxcutter/ubuntu1604 ==> server1: -- Storage pool: default ==> server1: -- Image: /var/lib/libvirt/images/topology_converter_public_server1.img (64G) ==> server1: -- Volume Cache: default ==> server1: -- Kernel:
==> server1: -- Initrd:
==> server1: -- Graphics Type: vnc ==> server1: -- Graphics Port: 5900 ==> server1: -- Graphics IP: 127.0.0.1 ==> server1: -- Graphics Password: Not defined ==> server1: -- Video Type: cirrus ==> server1: -- Video VRAM: 9216 ==> server1: -- Keymap: en-us ==> server1: -- TPM Path:
==> server1: -- INPUT: type=mouse, bus=ps2 ==> server1: -- Command line : ==> server1: Creating shared folders metadata... ==> server1: Starting domain. ==> server1: Waiting for domain to get an IP address... ^C==> server1: Waiting for cleanup before exiting... ==> server1: Removing domain... Vagrant exited after cleanup due to external interrupt.

The mutated VM Console Output during boot:

It just waits here (seemingly) forever I gave it probably 10 minutes before I killed it and remutated etc same results. image

sciurus commented 8 years ago

Thanks for the detailed report. I'm not confident that this is the issue since the screenshot suggests your VMs storage is mounted, but can you try mutating with the --force-virtio option to see if that helps?

ericpulvino commented 8 years ago

Unfortunately that did not work. Gets stuck at the same place.

sciurus commented 8 years ago

I'm going to close this in favor of the issue you opened with vagrant-librit.

ericpulvino commented 8 years ago

Ironically it actually turned out to be an issue related to mutation. Not sure who's purvue this falls under, essentially the issue was that the VM was using the new style of predictable interface naming that is not presently supported by libvirt. So the machine would boot but never get DHCP. Might be worthwhile to check for that... as the mutation appeared successful.

sciurus commented 8 years ago

Keep in mind that 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. That said, is there something that vagrant-mutate can do to make this work? Based on this, maybe having an option that would add

libvirt.cmd_line = 'net.ifnames=0 biosdevname=0'

to the box's Vagrantfile?