vagrant-spk icon indicating copy to clipboard operation
vagrant-spk copied to clipboard

vagrant-spk fails if virtualbox not available

Open paulproteus opened this issue 9 years ago • 10 comments

@tdfischer claims to have run into this. Looking into it now to see if I can reproduce it.

paulproteus avatar Jun 24 '15 05:06 paulproteus

FWIW, she's running this on Fedora.

I can reproduce on Debian, with Virtualbox not installed. I get the following msesage:

Calling 'vagrant' 'up' in /home/paulproteus/projects/php-app-to-package-for-sandstorm/.sandstorm
Bringing machine 'default' up with 'libvirt' provider...
==> default: Box 'debian/jessie64' could not be found. Attempting to find and install...
    default: Box Provider: libvirt
    default: Box Version: >= 0
==> default: Loading metadata for box 'debian/jessie64'
    default: URL: https://atlas.hashicorp.com/debian/jessie64
The box you're attempting to add doesn't support the provider
you requested. Please find an alternate box or use an alternate
provider. Double-check your requested provider to verify you didn't
simply misspell it.

If you're adding a box from HashiCorp's Atlas, make sure the box is
released.

Name: debian/jessie64
Address: https://atlas.hashicorp.com/debian/jessie64
Requested provider: [:libvirt]

@zarvox any chance you can ask the nice debian/jessie64 people to create a libvirt box, and/or help them with that? I hope that a libvirt backend won't cause a huge amount of divergence; I'm curious you think that would be a pain to maintain, as an alternate backend for vagrant-spk.

If it won't be a huge pain, it'd be nice to offer this for people who don't like VirtualBox.

paulproteus avatar Jun 24 '15 05:06 paulproteus

Yeah, this is definitely worthwhile and already on my radar. I pinged the #debian-cloud folks a while back, but didn't get a reply, so I should probably follow up via email. If the Debian vagrant box maintainers don't want to write the patches, I can write them.

As for maintenance, I also use Fedora and (almost exclusively) the libvirt provider, by taking the VirtualBox debian/jessie64 box and using vagrant mutate. So I can say with confidence that the libvirt backend works, and is generally quite reliable and stable once you fetch a box. Note that for the folder sharing to work as desired you may need to configure libvirt to run in a less-secure mode; specifically, you'll need qemu to run as root and with CAP_DAC_OVERRIDE; in /etc/libvirt/qemu.conf, set clear_emulator_capabilities = 0.

Sadly, the vagrant plugin installation thing seems to be slightly wonky on Fedora, so I actually debootstrap a Debian root and do the vagrant mutute from within systemd-nspawn then import the .box file.

I'd much rather this all work out of the box, though!

zarvox avatar Jun 24 '15 08:06 zarvox

While we're waiting, Drew, I wonder if it would be reasonable for you to publish your vagrant-mutate base box images somewhere, and check for libvirt, and if using libvirt, configure the Vagrantfile to use your mutated box?

Curious what you think.

paulproteus avatar Jun 24 '15 14:06 paulproteus

I suppose I could try overriding box_url and such based on provider, for the time being. I worry a little that we won't pull in updates from upstream unless I'm rebuilding that box on a regular basis, but it probably makes sense for now.

zarvox avatar Jun 24 '15 17:06 zarvox

For what it's worth, it's not clear to me that we actually particularly need automatic updates from upstream for the boxes. Updates from upstream is what broke vagrant-spk w/r/t the Puppet stuff. But I guess it's nice to have the updates.

paulproteus avatar Jun 24 '15 17:06 paulproteus

Here's a workaround for now:

vagrant box add --provider libvirt --name debian/jessie64 --checksum-type sha256 --checksum e27b8b97f8f87ea5cf79a33bff43a3787f6c33c7ef2f70689b3425329d05c916 http://dl.zarvox.org/debian-jessie64-libvirt-8.1.0.box

zarvox avatar Jun 26 '15 01:06 zarvox

I've just run into this vm:

  • The box 'sandstorm/debian-jessie64' could not be found.

When trying the workaround above I get

An invalid option was specified. The help for this command

[edit] I just installed the deb from https://www.vagrantup.com/downloads.html which seems to have fixed it

samuk avatar Feb 21 '16 16:02 samuk

Interesting - it seems that @samuk had a version of Vagrant in Ubuntu 14.04 that doesn't seem to support the box registry.

paulproteus avatar Feb 21 '16 17:02 paulproteus

I've also just run into this trying to follow the tutorial on Fedora - even with VirtualBox installed, it seems to be defaulting to libvirt and failing. Trying to download @zarvox's alternative box now.

takluyver avatar Mar 04 '16 17:03 takluyver

I couldn't work out how to make it work with @zarvox's box, but I did manage to make it work with the official image by explicitly telling it to use the virtualbox provider:

vagrant-spk vm up --  --provider virtualbox

takluyver avatar Mar 06 '16 15:03 takluyver