How do I change network settings in Vagrant?

Asked 2 years ago, Updated 2 years ago, 99 views

Building a Ruby on Rails Development Environment - Qiita

I tried installing VirtualBox and Vagrant using the above page.

commit.vm.network is not recognized as an internal or external command, an operational program, or a batch file

said he.What should I do?

This is the actual screen

vagrant virtualbox

2022-09-30 15:30

2 Answers

The config.vm.network... part is what you want to write in the configuration file instead of running it with the command.

After executing vargrant init, Vagrantfile appears to be created in the folder where you executed the command, so open it in any editor and rewrite the required parts (follow the instructions on the referenced page).

Note:
Vagrantfile-Vagrant by HashiCorp
Summary of frequently used Vagrantfile settings


2022-09-30 15:30

As far as the screenshot goes, what you're running at the command prompt is a command that doesn't even have config.vm.network.That's why I got an error.

The command to execute after vagrant init is usually vagrant up.

When vagrant up runs, as Cubick said, the contents of the Vagrantfile are loaded and the vagrant works with the virtualbox accordingly.


2022-09-30 15:30

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.