Can vagrant up not default to launching multiple VMs?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Can vagrant up not default to launching multiple VMs?

David Hodnett
I have a Vagrantfile with multiple vms defined. I see that if I execute "vagrant up" without specifying a vm configuration such as "web", Vagrant will launch all of the configs it finds in that file. This is not ideal on my dev machine; I find that I occasionally accidentally leave off the "web" portion and have to control-C the job before spinning up too many VMs.

Is there a workaround such that "vagrant up" returns an error message when multiple VMs are defined?

For example, if there's a --no-all flag, I can alias that to the vagrant command.

I've already tried an (otherwise) empty Vagrantfile that simply prints a "Use --vagrantfile" message but Vagrant still continues loading the other files and attempts to boot a machine if one isn't already running.

I'm using version 1.0.6.

Thank you,

- David

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can vagrant up not default to launching multiple VMs?

Jimmy Cuadra
I asked the same question in a GitHub issue on the project: https://github.com/mitchellh/vagrant/issues/1546

On Thursday, April 11, 2013 5:27:21 PM UTC-7, David Hodnett wrote:
I have a Vagrantfile with multiple vms defined. I see that if I execute "vagrant up" without specifying a vm configuration such as "web", Vagrant will launch all of the configs it finds in that file. This is not ideal on my dev machine; I find that I occasionally accidentally leave off the "web" portion and have to control-C the job before spinning up too many VMs.

Is there a workaround such that "vagrant up" returns an error message when multiple VMs are defined?

For example, if there's a --no-all flag, I can alias that to the vagrant command.

I've already tried an (otherwise) empty Vagrantfile that simply prints a "Use --vagrantfile" message but Vagrant still continues loading the other files and attempts to boot a machine if one isn't already running.

I'm using version 1.0.6.

Thank you,

- David

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can vagrant up not default to launching multiple VMs?

Jimmy Cuadra
I started working on a branch that adds a Vagrantfile config option for defining which machines should be affected by the CLI by default. If you'd like to keep an eye on it, it can be found here: https://github.com/jimmycuadra/vagrant/tree/default-machines

J

On Friday, April 12, 2013 3:05:26 AM UTC-7, Jimmy Cuadra wrote:
I asked the same question in a GitHub issue on the project: https://github.com/mitchellh/vagrant/issues/1546

On Thursday, April 11, 2013 5:27:21 PM UTC-7, David Hodnett wrote:
I have a Vagrantfile with multiple vms defined. I see that if I execute "vagrant up" without specifying a vm configuration such as "web", Vagrant will launch all of the configs it finds in that file. This is not ideal on my dev machine; I find that I occasionally accidentally leave off the "web" portion and have to control-C the job before spinning up too many VMs.

Is there a workaround such that "vagrant up" returns an error message when multiple VMs are defined?

For example, if there's a --no-all flag, I can alias that to the vagrant command.

I've already tried an (otherwise) empty Vagrantfile that simply prints a "Use --vagrantfile" message but Vagrant still continues loading the other files and attempts to boot a machine if one isn't already running.

I'm using version 1.0.6.

Thank you,

- David

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: Can vagrant up not default to launching multiple VMs?

Jimmy Cuadra
Pull request is now open on the main repo: https://github.com/mitchellh/vagrant/pull/1546

On Friday, April 12, 2013 4:29:18 PM UTC-7, Jimmy Cuadra wrote:
I started working on a branch that adds a Vagrantfile config option for defining which machines should be affected by the CLI by default. If you'd like to keep an eye on it, it can be found here: https://github.com/jimmycuadra/vagrant/tree/default-machines

J

On Friday, April 12, 2013 3:05:26 AM UTC-7, Jimmy Cuadra wrote:
I asked the same question in a GitHub issue on the project: https://github.com/mitchellh/vagrant/issues/1546

On Thursday, April 11, 2013 5:27:21 PM UTC-7, David Hodnett wrote:
I have a Vagrantfile with multiple vms defined. I see that if I execute "vagrant up" without specifying a vm configuration such as "web", Vagrant will launch all of the configs it finds in that file. This is not ideal on my dev machine; I find that I occasionally accidentally leave off the "web" portion and have to control-C the job before spinning up too many VMs.

Is there a workaround such that "vagrant up" returns an error message when multiple VMs are defined?

For example, if there's a --no-all flag, I can alias that to the vagrant command.

I've already tried an (otherwise) empty Vagrantfile that simply prints a "Use --vagrantfile" message but Vagrant still continues loading the other files and attempts to boot a machine if one isn't already running.

I'm using version 1.0.6.

Thank you,

- David

--
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.