Vagrant use different host machine
Asked Answered
A

2

7

I want to use Vagrant but not pollute my machine which I'm working on with n+ VirtualBox machines.

I searched the web but found nothing. What I really want is working on my Laptop and invoking vagrant up there but the it should start the guest on another e.g. Linux computer on my network which have VirtualBox installed.

Is that possible at this time, because it's not much different then the aws-provider which does exactly that with EC2.

Would also be nice if it would use NTFS instead of the aws-provider which uses rsync.

Thanks for your answers in advance. Daniel

Angkor answered 16/3, 2013 at 18:59 Comment(1)
I don't think it is possible, especially not with Vagrant before version 1.1 (no provider abstraction) - I really want to have that feature too for the same reasons, maybe there is a chance to implement a special provider for itEccles
W
1

Since vagrant doesn't support this directly, I'd do something like this.

First, keep all your Vagrantfiles in subdirectories of the same directory on the host server. Then create a vagrant_runner script on your host machine looking something like this:

#!/bin/bash
VAGRANT_HOME='/home/bar/vagrant'

cd ${VAGRANT_HOME}/$1
# Strip off the subdir name so we can pass all the rest of our
# arguments to vagrant
shift
vagrant $@

Then on your laptop you would have a rvagrant script:

#!/bin/bash
VAGRANT_HOST=dnsname_of_vagrant_host
VAGRANT_USER=vagrant_user

ssh ${VAGRANT_USER}@${VAGRANT_HOST} vagrant_runner $@

Then you could do rvagrant foo up to kick off the vms defined in /home/bar/vagrant/foo/Vagrantfile, or rvagrant foo destroy -f to destroy it.

Wellchosen answered 29/6, 2013 at 22:8 Comment(0)
G
0

At the moment this is not possible. There was an issue on GitHub regarding this topic, but it was closed. Within a comment the author says:

This is something I'm not going to even look at building into Vagrant itself at least until post 1.0 :) I've marked this as a feature request, but don't plan on looking at it again for a bit unless there are immediate compelling reasons.

About one year and then about two months ago two people asked on the state of this issue as we're now post 1.0, but there has not been any reaction on this yet, unfortunately :-(

Geocentric answered 26/3, 2013 at 19:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.