-1

I have two installed vargrant boxes up and running. I want to change their configuration settings. Where can I do that? Specifically, I want to give each vagrant box some additional settings.

config.vm.network :private_network, ip: "10.0.0.10"
config.vm.hostname = "alpha"

The above code is from this following question: Allow two or more vagrant VMs to communicate on their own network

That code is normally put in the Vagrantfile. I want to make changes to an existing vagrant virtual machine. If I modify that machine's Vagrantfile, are the changes applied automatically, or do I need to do some other steps?

I just want to change the network and hostname settings on both virtual machines. I do not want to reinstall these virtual machines from scratch again. I do not want to have to redownload the base image for both virtual machines again.

Galaxy
  • 2,363
  • 2
  • 25
  • 59

1 Answers1

0

I modified the Vagrantfiles for both existing Vagrant boxes. Then I ran the command

vagrant up

Apparently, if a Vagrantfile has been changed since the last time a vagrant virtual machine was started, this command goes ahead and modifies the settings for that vagrant virtual machine. In my case, it added the networking settings successfully.

Galaxy
  • 2,363
  • 2
  • 25
  • 59