I
I
Ilia Malashko2021-01-14 15:46:34
virtual box
Ilia Malashko, 2021-01-14 15:46:34

How to run Vagrant server on VirtualBox?

Hello.

I'm trying to deploy a local server on mac os to work with php.

According to the instructions, I installed VirtualBox, Vagrant and connected to the local server.

After that, I decided to add an IP address to Vagrantfile so that I could access the local site from the browser

config.vm.network "public_network", ip: "192.168.33.33"

After this addition, when restarting (or starting), Vagran asks me to select a network interface, no matter what I choose, the connection always resets.
60003d0fedc31998110120.png

What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rst0, 2021-01-22
@Rst0

need to see ifconfig
result from macos terminal what subnet is en0 adapter ? and preferably a complete Vagrantfile - the problem is most likely in it.

config.vm.network "public_network", auto_config: false
config.vm.network "public_network", bridge: 'en0', ip: "192.168.33.33"
inline: "route add default gw 192.168.33.1"

provided that on real en0: Wi-Fi (Wireless)'
ip 192.168.33.*(except 33)
mask 255.255.255.0
geteway 192.168.33.1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question