我在vagrant中创建了一个盒子。在Vagrantfile中,我已经指定了网络为
Create a private network, which allows host-only access to the machine
# using a specific IP.
# config.vm.network :private_network, ip: "192.168.33.10"
# Create a public network, which generally matched to bridged network.
# Bridged networks make the machine appear as another physical device on
# your network.
config.vm.network :public_network
我无法在VLAN外访问VagrantBox。我需要在公共网络中访问Vagrant Box。如何配置vagrantfile以便我可以在公共网络中访问?
ssh vagrant@<guest_ip>
。 - Ricardo Garcíaconfig.vm.network "public_network", :bridge => "eth0", auto_config: false
才能正常工作,然后使用shell
provisioners 手动添加 eth1 的设置。任何包含config.vm.network
中的 'ip' 的组合在这里都不起作用。 - Nikos Alexandris