2
respostas

Vagrant - Which interface should the network bridge to?

Rodei no terminal o comando

vagrant up

Em seguida apareceu isso no terminal:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/bionic64'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/bionic64' version '20190828.0.0' is up to date...
==> default: Setting the name of the VM: bionic_default_1567355833904_35092
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) wlp2s0
2) enp1s0
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
    default: Which interface should the network bridge to?

Que entrada eu devo digitar?

Meu Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"
  config.vm.network "forwarded_port", guest: 80, host: 8089
  config.vm.network "public_network", ip: "192.168.1.24"
end
2 respostas

Oi, Charles, tudo bem?

Acredito que você tenha mais de uma interface de rede disponível. O que vagrant tá fazendo é pedir para que você escolha uma e possa subir a VM. Veja aqui na documentação: https://www.vagrantup.com/docs/networking/public_network.html#default-network-interface

Certo, onde eu poderia descobrir quais interfaces de rede estão disponíveis, há algum comando ou interface gráfica para isso?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software