How to have multiple boxes of the same operating system?

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

How to have multiple boxes of the same operating system?

Vaxobot
Hello everyone.

I have a box with the ubuntu/trusty64 system, but i have a question.

When i put the vagrant up command it starts downloading the box with the operating system, i natively have the ubuntu distribution on my pc and in the path of my files, more specifically, in .vagrant/box the path is created with the box of the operating system that downloads (ubuntu/trusty64), then the path remains as .vagrant/box/name-of-box.

And what I want to do is have multiple boxes with ubuntu/trusty64 to have different development environments in each. For example in one having LAMP and another having LEMP, both with ubuntu/trusty64.

How can I have this structure of several boxes with the same operating system, but with different environments?

Note: In a folder I put a Vagrant file and in another folder I put another Vagrant file, specifying the type of boxes, having the following structure in each Vagrant file:

AGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config
.vm.box = "ubuntu/xenial64"
  config
.vm.define "nginx_ubuntu" do |nginx_ubuntu|
 
end
  config
.vm.provider :virtualbox do |vb|
       vb
.name = "nginx_ubuntu"
 
end
  config
.vm.network "forwarded_port", guest: 80, host: 8080
  config
.vm.network "private_network", ip: "192.168.33.10"
  config
.vm.synced_folder "htdocs", "/var/www/html"
end


In a Vagrant file I have nginx and in another I want to have apache.

I thank you in advance.

Regards!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c8f2cb9a-ff19-46a3-8329-ce9c2cd080b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to have multiple boxes of the same operating system?

Alvaro Miranda Aguilera

On Thu, Jul 13, 2017 at 7:45 AM, Vaxobot <[hidden email]> wrote:
Hello everyone.

I have a box with the ubuntu/trusty64 system, but i have a question.

When i put the vagrant up command it starts downloading the box with the operating system, i natively have the ubuntu distribution on my pc and in the path of my files, more specifically, in .vagrant/box the path is created with the box of the operating system that downloads (ubuntu/trusty64), then the path remains as .vagrant/box/name-of-box.

And what I want to do is have multiple boxes with ubuntu/trusty64 to have different development environments in each. For example in one having LAMP and another having LEMP, both with ubuntu/trusty64.

How can I have this structure of several boxes with the same operating system, but with different environments?

Note: In a folder I put a Vagrant file and in another folder I put another Vagrant file, specifying the type of boxes, having the following structure in each Vagrant file:

AGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config
.vm.box = "ubuntu/xenial64"
  config
.vm.define "nginx_ubuntu" do |nginx_ubuntu|
 
end
  config
.vm.provider :virtualbox do |vb|
       vb
.name = "nginx_ubuntu"
 
end
  config
.vm.network "forwarded_port", guest: 80, host: 8080
  config
.vm.network "private_network", ip: "192.168.33.10"
  config
.vm.synced_folder "htdocs", "/var/www/html"
end


In a Vagrant file I have nginx and in another I want to have apache.

I thank you in advance.

Regards!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/c8f2cb9a-ff19-46a3-8329-ce9c2cd080b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Alvaro

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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].
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/CAHqq0ewAwh_yXtPyiz3tm12e7R_QAnYEfpBXmAHWSsGv%3Db-H1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.